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 25725 - Deadlock when disabling java module
Summary: Deadlock when disabling java module
Status: VERIFIED DUPLICATE of bug 30907
Alias: None
Product: contrib
Classification: Unclassified
Component: Looks (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Petr Hrebejk
URL:
Keywords: THREAD
Depends on:
Blocks:
 
Reported: 2002-07-17 10:21 UTC by Svata Dedic
Modified: 2008-11-18 11:32 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump (20.21 KB, text/plain)
2002-07-17 10:28 UTC, Svata Dedic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Svata Dedic 2002-07-17 10:21:32 UTC
The deadlock occured when I disabled reloadable
java module; attaching thread dump.
Although I tried hard, I could not find who holds
openide.nodes.Children.MUTEX, which seems to stop
FolderRecognizer and then most of other threads.
Comment 1 Svata Dedic 2002-07-17 10:28:25 UTC
Created attachment 6743 [details]
Thread dump
Comment 2 Petr Nejedly 2002-07-17 10:56:56 UTC
LookNode in OpenIDE-request-processor-0 holds the MUTEX:
it queries for shortDescription which goes through naming
to folderList (imho OK) and waits for it (OK)

FolderList (in "Folder recognizer") recognizes some BrokenDataShadow,
calls infamous DO.setValid(false) which tries to destroy its Node
trying to enter the MUTEX and never finish.
Comment 3 Svata Dedic 2002-07-17 11:31:55 UTC
I don't think so. Each LookNode instance has its own mutex.
FilterNode.destroy run in FolderRecognizer uses Children.MUTEX - a
different instance. Correct ?
Comment 4 Petr Nejedly 2002-07-17 12:53:58 UTC
Correct, the deadlock is a bit lower, there are two Mutexes:
at o.o.util.Mutex.readAccess(Mutex.java:172) inststance LookNode.MUTEX
at o.n.api.looks.LookNode.getShortDescription(LookNode.java:412)
at o.o.nodes.FilterNode.changeOriginal(FilterNode.java:257) Ch.MUTEX

changeOriginal uses Mutex.Privileged, 4 lines above 257 is:
            Children.PR.enterWriteAccess();
which means ORP-0 holds write access to Children.MUTEX,
the rest is the same.

But you've alerted me with tha fact that *each* LookNode has its own
Mutex, the worst thing I've ever heard about Looks.

Looks were meant to be memory friendly but each Mutex consists of 6
objects, costing it total 160Bytes.

Moreover, naming an instance field "MUTEX" is not much readable.
Comment 5 David Strupl 2002-07-19 13:51:27 UTC
Either looks or nodes --> changing to looks for now.
Comment 6 Marian Mirilovic 2003-01-29 12:54:28 UTC
added keyword PROJECTS, because we need to distinguish 
issues against NB4.0 and S1Sx.y
Comment 7 Petr Hrebejk 2003-05-06 15:25:13 UTC

*** This issue has been marked as a duplicate of 30907 ***
Comment 8 Marian Mirilovic 2003-07-22 10:24:15 UTC
verified - it's duplicate.