United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6617263 : cannot start java control panel while initial background downloader is running

Details
Type:
Bug
Submit Date:
2007-10-15
Status:
Closed
Updated Date:
2010-09-08
Project Name:
JDK
Resolved Date:
2008-01-31
Component:
deploy
OS:
windows
Sub-Component:
deployment_toolkit
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u5
Fixed Versions:
6u10 (b06)

Related Reports

Sub Tasks

Description
While the initial background downloader is running (background downloader launched by java installer), Launching control panel gives "Main Class Not Found.Program Will exit".(KernelDownloadUrl is used) 
This error is coming in XP also.(129.158.229.123, vnc password :vnc )

I can reproduce the problem in my XP machine too.  It seems like it's caused by:

java.lang.IllegalStateException: error acquiring mutex
       at sun.jkernel.Mutex.acquire(Native Method)
       at sun.jkernel.Bundle.loadReceipts(Unknown Source)
       at sun.jkernel.Bundle.updateState(Unknown Source)
       at sun.jkernel.Bundle.isInstalled(Unknown Source)
       at sun.jkernel.DownloadManager.doGetBootClassPathEntryForResource(Unknow
n Source)
       at sun.jkernel.DownloadManager.access$500(Unknown Source)
       at sun.jkernel.DownloadManager$3.run(Unknown Source)
       at java.security.AccessController.doPrivileged(Native Method)
       at sun.jkernel.DownloadManager.getBootClassPathEntryForResource(Unknown
Source)
       at sun.jkernel.DownloadManager.getBootClassPathEntryForClass(Unknown Sou
rce)
       at java.lang.ClassLoader.findBootstrapClass(Native Method)
       at java.lang.ClassLoader.findBootstrapClass0(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at java.lang.ClassLoader.loadClassInternal(Unknown Source)

                                    

Comments
SUGGESTED FIX

Create the native mutex with a NULL DACL security attribute, which will allows all access to the mutex object.

Testcase:  http://web-east.east.sun.com/deployment/www/tests/1.6.0_05/6617263/


================================
webrev:
http://sa.sfbay.sun.com/projects/deployment_data/6u5/6617263.0
                                     
2007-10-15
EVALUATION

This is caused by the java control panel process cannot create the native mutex for bundle install.

The background downloader launched by the java installer is running as SYSTEM user.  It will create native mutex while installing bundles.

Now while the downloader is running, and we invoke the java control panel or any other java process, it needs to download and install bundle as well.  If it happens that it tries to create a mutex that is current held by the background downloader process, the native CreateMutex call will fail with ERROR_ACCESS_DENIED, because it does not have priviledge to access the mutex object created by SYSTEM.  Therefore we failed to install the necessary bundle, and fail to launch java control panel.
                                     
2007-10-15



Hardware and Software, Engineered to Work Together