JDK-7153298 : webstart start 2 background update threads resulted in double downloads of same jars
  • Type: Bug
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-03-13
  • Updated: 2013-09-12
  • Resolved: 2012-04-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u4Fixed 8 b31Fixed
Description
- Turn on tracing level all.
- Run webstart an application with applet-desc having <update check='background'/> with lazy jars that would not be downloaded until after the application started.
- Update the lazy jar, make sure to touch it so timestamp change.
- Observe in tracing file double starting of LDUpdater and double downloading of same lazy jar:
network: LDUpdater: started background update check
...
network: LDUpdater: started background update check
...
network: Background Update Thread: update cache: http://javaweb/~ntnguyen/tests/check-always-lazy-update/lib/MyUtil.jar
...
network: Background Update Thread: update cache: http://javaweb/~ntnguyen/tests/check-always-lazy-update/lib/MyUtil.jar
...

Comments
EVALUATION LDUpdate threads were created by the following stacks: 1) at com.sun.javaws.jnl.LDUpdater.startBackgroundUpdate(LDUpdater.java:340) at com.sun.javaws.jnl.LDUpdater.startBackgroundUpdate(LDUpdater.java:336) at com.sun.javaws.jnl.LDUpdater.startBackgroundUpdateOpt(LDUpdater.java:270) at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:262) at com.sun.javaws.Launcher.launch(Launcher.java:169) at com.sun.javaws.Main.launchApp(Main.java:529) at com.sun.javaws.Main.continueInSecureThread(Main.java:337) at com.sun.javaws.Main$1.run(Main.java:189) 2) at com.sun.javaws.jnl.LDUpdater.startBackgroundUpdate(LDUpdater.java:340) at com.sun.javaws.jnl.LDUpdater.startBackgroundUpdate(LDUpdater.java:336) at com.sun.javaws.jnl.LDUpdater.startBackgroundUpdateOpt(LDUpdater.java:270) at sun.plugin2.applet.JNLP2Manager.loadJarFiles(JNLP2Manager.java:463) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1563) We need to make sure LDUpdater remember the "already started" state to skip starting a second background thread. Also, check other tasks JNLP2Manager might duplicate other tasks already started by webstart Main/Launcher.
2012-03-13