Bug 704455

Summary: [icedtea-web] Java applets exhibit huge latencies or do not work at all
Product: [Fedora] Fedora Reporter: Joachim Frieben <jfrieben>
Component: icedtea-webAssignee: Deepak Bhole <dbhole>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: dbhole
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-13 14:06:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Joachim Frieben 2011-05-13 08:26:48 UTC
Description of problem:
When checking the version of the current Java setup by running

  http://www.java.com/en/download/installed.jsp?detect=jre&try=1 ,

no results is returned, not even after a second attempt after exceeding the time-out of 60 seconds. The following URL

  http://www.java.com/en/download/installed.jsp?detect=jre&try=2

then is superseded by
  
  http://www.java.com/en/download/installed.jsp?jreinit=no ,

and instead of a Java version info an empty text field appears. Only minutes later, the correct info appears in said browser window, namely

"Verifying Java Version
Oops! You don't have the recommended Java installed.

Your Java version is Version 6 Update 22. Please click the button below to get the recommended Java for your computer.

NOTE: If you recently completed your Java software installation, you may need to restart your browser (close all browser windows and re-open) before verifying your installation.
Download Free Java Software
Version 6 Update 25"

Having run firefox from the command line, the following related feedback is returned to the shell:

"java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.1) (fedora-57.1.10.1.fc15-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
Exception in thread "Thread-12" java.lang.NullPointerException
	at sun.applet.PluginAppletViewer$5.run(PluginAppletViewer.java:1650)
	at java.lang.Thread.run(Thread.java:679)
Exception in thread "Thread-17" java.lang.NullPointerException
	at sun.applet.PluginAppletViewer$5.run(PluginAppletViewer.java:1650)
	at java.lang.Thread.run(Thread.java:679)
Error: Unable to fetch applet instance id from Java side.
Exception in thread "Thread-20" java.lang.NullPointerException
	at sun.applet.PluginAppletViewer$5.run(PluginAppletViewer.java:1650)
	at java.lang.Thread.run(Thread.java:679)
Your Java configuration is as follows:<br/> <br/>Vendor: <b><a href="http://java.com">Sun Microsystems Inc.</a></b><br/>Version: <b>Java SE 6 Update 22</b><br/>Operating System: <b>Linux 2.6.38.5-24.fc15.x86_64</b><br/>Architecture:  <b>amd64</b>
Obj:1.6.0_25
Exit worker loop
Exception in thread "TimerQueue" java.lang.IllegalMonitorStateException
	at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:155)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1262)
	at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:459)
	at java.util.concurrent.DelayQueue.take(DelayQueue.java:205)
	at javax.swing.TimerQueue.run(TimerQueue.java:167)
	at java.lang.Thread.run(Thread.java:679)
Exception in thread "Thread-37" java.lang.NullPointerException
	at sun.applet.PluginAppletViewer$5.run(PluginAppletViewer.java:1650)
	at java.lang.Thread.run(Thread.java:679)
Exception in thread "Thread-38" java.lang.NullPointerException
	at sun.applet.PluginAppletViewer$5.run(PluginAppletViewer.java:1650)
	at java.lang.Thread.run(Thread.java:679)
Error: Unable to fetch applet instance id from Java side."

Version-Release number of selected component (if applicable):
icedtea-web-1.0.2-2.fc15.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Open http://www.java.com/en/download/installed.jsp?detect=jre&try=1 in firefox.
  
Actual results:
After two failed attempts, the applet calims that no Java is available on the system. Then after a few minutes, the version info eventually shows up.

Expected results:
Version info is returned without delay.

Additional info:
- Other Java applets also take a long time to execute leading the user to believe that Java is not working at all.
- Java appears to be completely unusable whith epiphany.
- This might also be an issue with nspluginwrapper.

Comment 1 Deepak Bhole 2011-05-13 14:06:57 UTC
That applet assumes that it is always being run with the Oracle plugin. We have addressed its need for a specific (Oracle) update by setting the IcedTea plugin's update version to 99. When Fedora imports IcedTea-Web 1.1 (F16 most likely), it will inherit this fix.

w.r.t load time -- that is all upto the applet, not the plugin.

As for the epiphany crash, I added a fix a while ago:
http://icedtea.classpath.org/hg/release/icedtea-web-1.0/rev/4169f6296ed7

The next 1.0.x update for icedtea-web should have it.