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

JWS download classes from the network server instead of using cached jar files

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      other

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_91"
      Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Windows 10

      A DESCRIPTION OF THE PROBLEM :
      When launching our application with webstart, it tooks an enormous amount of time.

      When investigating, I've printed the thread stack in the console before any of our log was printed (which normally is immediate, but here after one minute still no lof)

      And I've seen the following:

      "javawsApplicationMain" #33 prio=5 os_prio=0 tid=0x0000000015b73800 nid=0x3190 runnable [0x0000000018019000]
         java.lang.Thread.State: RUNNABLE
      at java.net.SocketInputStream.socketRead0(Native Method)
      at java.net.SocketInputStream.socketRead(Unknown Source)
      at java.net.SocketInputStream.read(Unknown Source)
      at java.net.SocketInputStream.read(Unknown Source)
      at java.io.BufferedInputStream.fill(Unknown Source)
      at java.io.BufferedInputStream.read1(Unknown Source)
      at java.io.BufferedInputStream.read(Unknown Source)
      - locked <0x00000000f848eb60> (a java.io.BufferedInputStream)
      at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
      at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
      - locked <0x00000000f847bee0> (a sun.net.www.protocol.http.HttpURLConnection)
      at sun.net.www.protocol.http.HttpURLConnection.access$200(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.AccessController.doPrivilegedWithCombiner(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
      - locked <0x00000000f847bee0> (a sun.net.www.protocol.http.HttpURLConnection)
      at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
      at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
      at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
      at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
      at com.sun.jnlp.JNLPCachedJarURLConnection.connect(Unknown Source)
      at com.sun.jnlp.JNLPCachedJarURLConnection.getJarFile(Unknown Source)
      at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
      at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$800(Unknown Source)
      at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
      at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)
      at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
      at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
      - locked <0x00000000f9064110> (a com.sun.deploy.security.DeployURLClassPath)
      at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      - locked <0x00000000f9063e70> (a com.sun.jnlp.JNLPClassLoader)
      at com.sun.jnlp.JNLPClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      - locked <0x00000000f9063df8> (a com.sun.jnlp.JNLPClassLoader)
      at com.sun.jnlp.JNLPClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
      at java.lang.Class.privateGetMethodRecursive(Unknown Source)
      at java.lang.Class.getMethod0(Unknown Source)
      at java.lang.Class.getMethod(Unknown Source)
      at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
      at com.sun.javaws.Launcher.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)


      Instead of loading the classes from local jar file in the cache, it seems to load classes from the jar on the remote server (and doing that for every loaded classes).

      Before 1.8.0_91; everything is normal and the application is launched immediately, in 1.8.0_91 (and 1.8.0_92), it takes 6 minutes to just show the screen... (and approximately one minute for the first log which is in the first line of the main class).

      REGRESSION. Last worked in version 8u77

      ADDITIONAL REGRESSION INFORMATION:
      java version "1.8.0_77"
      Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
      Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Launch our application with webstart:

      javaws http://path/to/jnlp

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The application launch immediately (or relatively quick like maximum 15 seconds)
      ACTUAL -
      10 minutes to have the first screen, one minute to have the first logging statement on the java console.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      "javawsApplicationMain" #33 prio=5 os_prio=0 tid=0x0000000015b73800 nid=0x3190 runnable [0x0000000018019000]
         java.lang.Thread.State: RUNNABLE
      at java.net.SocketInputStream.socketRead0(Native Method)
      at java.net.SocketInputStream.socketRead(Unknown Source)
      at java.net.SocketInputStream.read(Unknown Source)
      at java.net.SocketInputStream.read(Unknown Source)
      at java.io.BufferedInputStream.fill(Unknown Source)
      at java.io.BufferedInputStream.read1(Unknown Source)
      at java.io.BufferedInputStream.read(Unknown Source)
      - locked <0x00000000f848eb60> (a java.io.BufferedInputStream)
      at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
      at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
      - locked <0x00000000f847bee0> (a sun.net.www.protocol.http.HttpURLConnection)
      at sun.net.www.protocol.http.HttpURLConnection.access$200(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.AccessController.doPrivilegedWithCombiner(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
      - locked <0x00000000f847bee0> (a sun.net.www.protocol.http.HttpURLConnection)
      at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
      at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
      at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
      at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
      at com.sun.jnlp.JNLPCachedJarURLConnection.connect(Unknown Source)
      at com.sun.jnlp.JNLPCachedJarURLConnection.getJarFile(Unknown Source)
      at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
      at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$800(Unknown Source)
      at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
      at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)
      at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
      at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
      - locked <0x00000000f9064110> (a com.sun.deploy.security.DeployURLClassPath)
      at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      - locked <0x00000000f9063e70> (a com.sun.jnlp.JNLPClassLoader)
      at com.sun.jnlp.JNLPClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      - locked <0x00000000f9063df8> (a com.sun.jnlp.JNLPClassLoader)
      at com.sun.jnlp.JNLPClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
      at java.lang.Class.privateGetMethodRecursive(Unknown Source)
      at java.lang.Class.getMethod0(Unknown Source)
      at java.lang.Class.getMethod(Unknown Source)
      at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
      at com.sun.javaws.Launcher.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)


      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Only workaround, downgrade to java 8u77

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              mcherkas Mikhail Cherkasov (Inactive)
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: