Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8092577

Webstart: deadlock when downloading application

    Details

      Backports

        Description

        Steps to reproduce:
        1. In 32 bit Firefox, click on JNLP download link (references the jnlp file directly without any javascript).
        2. The JNLP is downloaded to a local temp file by the browser (download window flashes shortly).
        3. a) An empty Java console window is displayed forever, or
          b) There is not even the console window, just a new javaw process.

        Everything works fine, however, if javaws is started directly: "C:\Program Files\Oracle\JavaFX 2.2 Runtime\bin\javaws.exe" https://....jnlp
        This is our current workaround.

        Please find attached a thread dump showing a deadlock:

        Found one Java-level deadlock:
        =============================
        "javawsApplicationMain":
          waiting to lock monitor 0x00000000064227e8 (object 0x00000000db145cb8, a java.lang.Class),
          which is held by "QuantumRenderer-0"
        "QuantumRenderer-0":
          waiting to lock monitor 0x0000000007693030 (object 0x00000000f7b0cdf8, a com.sun.deploy.cache.CacheEntry),
          which is held by "javawsApplicationMain"

        Java stack information for the threads listed above:
        ===================================================
        "javawsApplicationMain":
        at com.sun.deploy.cache.MemoryCache.addResourceReference(Unknown Source)
        - waiting to lock <0x00000000db145cb8> (a java.lang.Class for com.sun.deploy.cache.MemoryCache)
        at com.sun.deploy.cache.CachedJarFile.<init>(Unknown Source)
        at com.sun.deploy.cache.CachedJarFile.<init>(Unknown Source)
        at com.sun.deploy.cache.CacheEntry$5.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.deploy.cache.CacheEntry.getJarFile(Unknown Source)
        - locked <0x00000000f7b0cdf8> (a com.sun.deploy.cache.CacheEntry)
        at com.sun.deploy.model.ResourceProvider.getCachedJarFile(Unknown Source)
        ...
        "QuantumRenderer-0":
        at com.sun.deploy.cache.CacheEntry.storageFilesExist(Unknown Source)
        - waiting to lock <0x00000000f7b0cdf8> (a com.sun.deploy.cache.CacheEntry)
        at com.sun.deploy.cache.MemoryCache.validateResource(Unknown Source)
        at com.sun.deploy.cache.MemoryCache.getLoadedResource(Unknown Source)
        - locked <0x00000000db145cb8> (a java.lang.Class for com.sun.deploy.cache.MemoryCache)
        at com.sun.deploy.net.DownloadEngine.getKnownRedirectFinalURL(Unknown Source)
        ...
        Found 1 deadlock.


        This is the command line of the hanging javaw process:

        "C:\\Program Files\\Java\\jre6\\bin\\javaw.exe" -classpath "C:\\Program Files\\Oracle\\JavaFX 2.2 Runtime\\lib\\deploy.jar" "-Djava.security.policy=file:C:\\Program Files\\Oracle\\JavaFX 2.2 Runtime\\lib\\security\\javaws.policy" -DtrustProxy=true -Xverify:remote "-Djnlpx.home=C:\\Program Files\\Oracle\\JavaFX 2.2 Runtime\\bin" "-Djnlpx.origFilenameArg=C:\\Users\\LEHMAN~1.MIN\\AppData\\Local\\Temp\\WebAssistant-7.jnlp" -Djnlpx.remove=true -Djnlp.fx=2.2.0 "-Xbootclasspath/a:C:\\Program Files\\Oracle\\JavaFX 2.2 Runtime\\lib\\javaws.jar;C:\\Program Files\\Oracle\\JavaFX 2.2 Runtime\\lib\\deploy.jar;C:\\Program Files\\Oracle\\JavaFX 2.2 Runtime\\lib\\plugin.jar" -Xmx512m -Djnlpx.heapsize=NULL,512m -Djnlpx.splashport=63338 "-Djnlpx.jvm=C:\\Program Files\\Java\\jre6\\bin\\javaw.exe" com.sun.javaws.Main "C:\\Users\\LEHMAN~1.MIN\\AppData\\Local\\Temp\\javaws2"

        This is the command line of the working javaw process (started outside of browser):

        "C:\\Program Files\\Java\\jre6\\bin\\javaw.exe" -classpath "C:\\Program Files\\Oracle\\JavaFX 2.2 Runtime\\lib\\deploy.jar" "-Djava.security.policy=file:C:\\Program Files\\Oracle\\JavaFX 2.2 Runtime\\lib\\security\\javaws.policy" -DtrustProxy=true -Xverify:remote "-Djnlpx.home=C:\\Program Files\\Oracle\\JavaFX 2.2 Runtime\\bin" -Djnlpx.origFilenameArg=https://[...]/WebAssistant.jnlp -Djnlpx.remove=false -Dsun.awt.warmup=true "-Xbootclasspath/a:C:\\Program Files\\Oracle\\JavaFX 2.2 Runtime\\lib\\javaws.jar;C:\\Program Files\\Oracle\\JavaFX 2.2 Runtime\\lib\\deploy.jar;C:\\Program Files\\Oracle\\JavaFX 2.2 Runtime\\lib\\plugin.jar" -Djnlpx.splashport=64489 "-Djnlpx.jvm=C:\\Program Files\\Java\\jre6\\bin\\javaw.exe" com.sun.javaws.Main https://[...]/WebAssistant.jnlp

        FWIW, I have also attached a trace from Sub\Deployment\log.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  nam Nam Nguyen (Inactive)
                  Reporter:
                  wlehmann Werner Lehmann
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported: