This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 10855 - Reproducible deadlock on parser db update of lib/ext jar
Summary: Reproducible deadlock on parser db update of lib/ext jar
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-03-30 03:38 UTC by Scott Stark
Modified: 2003-06-30 16:43 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump (22.25 KB, text/plain)
2001-07-20 20:40 UTC, Scott Stark
Details
system/ide.log (3.77 KB, text/plain)
2001-07-20 20:40 UTC, Scott Stark
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Stark 2001-03-30 03:38:06 UTC
I am seeing NB3.2build15 hang every time I attempt to invoke
the parser database update tool on the JCE1.2.1 jar in the
jre/lib/ext directory. The steps:

1. Mount the jce1_2_1.jar in the VM jre/lib/ext directory
2. Select the jar in the Explorer and Choose Tools->Update parser database

This is resulting in a hung application every time. See the
attached thread dump.
Comment 1 Scott Stark 2001-03-30 03:38:36 UTC
Created attachment 920 [details]
Thread dump
Comment 2 Scott Stark 2001-03-30 03:39:18 UTC
Created attachment 921 [details]
system/ide.log
Comment 3 Martin Roskanin 2001-04-06 17:15:10 UTC
It should be a problem of openide. Feel free to re-assign to editor if
I am wrong.
Comment 4 Jesse Glick 2001-04-09 16:59:15 UTC
Note that two threads are deadlocked holding both the app and the extension
classloaders. Not sure what we are supposed to do about this.
Comment 5 Jaroslav Tulach 2001-04-12 16:09:15 UTC
Could CompileDataObject not call unknown code from its constructor => not call
initCookies or at least isJavaBean?
Comment 6 Svata Dedic 2001-04-17 10:16:28 UTC
It could, but I doubt that it would solve the real cause of this problem:

    sun.misc.Launcher$ExtClassLoader@1C44FB0/1C9A440: owner "Folder 
recognizer"(0xc48ac60) 1 entry
        Waiting to enter:
            "AWT-EventQueue-0" (0x71e95c8)

    sun.misc.Launcher$AppClassLoader@1C46708/1C9D358: owner "AWT-EventQueue-0" 
(0x71e95c8) 4 entries
        Waiting to enter:
            "Folder recognizer" (0xc48ac60)
            "OpenIDE Request Processor-0" (0x730afc0)

java.lang.ClassLoader holds a lock on itself during its call to 
parent.loadClass(). Virtually any two calls to loadClass() with 
initialize=true could deadlock the VM this way.


Comment 7 Svata Dedic 2001-04-17 10:26:54 UTC
BTW the problem is, that the JAR is (or seems to be) signed. So during class 
loading, the URLClassLoader (ExClassLoader instance) constructs some object 
instances - WHILE holding a lock - and those instances use another 
URLClassLoader (AppClassLoader).
The AWT thread first tries AppClassLoader.loadClass() and acquires a lock on 
it, then the class loader delegates to the parent - ExClassLoader.

Comment 8 Svata Dedic 2001-04-17 16:50:36 UTC
The deadlock is really between two JDK-provided class loaders. It can occur 
when some thread is trying to load signed class and another one is loading 
normal class at the same time.
I've changed initialization of the CompiledDataObject as Yarda suggested - it 
will probably help, but it does not remove the real cause.
Comment 9 Svata Dedic 2001-04-18 15:51:16 UTC
Merged to 3.2
Comment 10 Svata Dedic 2001-04-18 15:59:26 UTC
Merged to 3.2
Comment 11 Jan Becicka 2001-05-03 15:02:29 UTC
[NB3.2.39] Verified
If this bug still lives, please reopen.
Comment 12 Jan Chalupa 2001-05-05 20:19:08 UTC
Target milestone -> 3.2
Comment 13 Quality Engineering 2003-06-30 16:43:44 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.