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.
Summary: | [70cat] Deadlock in project.ui.support.NodeFactorySupport$DelegateChildren | ||
---|---|---|---|
Product: | projects | Reporter: | jmborer <jmborer> |
Component: | Generic Projects UI | Assignee: | Jesse Glick <jglick> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexismp, jglick, jtulach, mkleint, mmirilovic |
Priority: | P3 | Keywords: | RANDOM, THREAD |
Version: | 7.0 | ||
Hardware: | Macintosh (x86) | ||
OS: | Mac OS X | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 130354, 135572 |
Description
jmborer
2010-12-08 19:44:35 UTC
I forgot to say that it is NB 7.0beta. I don't know if it is related to http://netbeans.org/bugzilla/show_bug.cgi?id=187697 I have some doubts... Don't see the cause of the deadlock yet. Various threads are waiting to enter Children.MUTEX but I can't see any code which is already in it and blocked...? There are also some threads waiting on EntrySupport.Something.LOCK which I do not know about. BTW reporter - in the future please click "Add an attachment" for thread dumps. They get reformatted and are hard to read when pasted into the description/comment area. The code in "Active Reference Queue Daemon" is the problem. the callRemoveNotify is called under Children.PR.enterWriteAccess(). The code then requires some other lock from projects. Please avoid that. *** Bug 202072 has been marked as a duplicate of this bug. *** Overzealous synchronization, it seems. Calling DependenciesChildren.regenerateKeys is definitely wrong here; NodeList.keys() should not be acquiring Children.MUTEX. That is why it only happens on Maven projects. This I will fix. NodeFactorySupport also looks much too complicated and has multiple locks it is synchronizing on, under some of which it is calling into foreign code. Could probably be rewritten to ChildFactory and made much simpler. Not going to try that now. core-main #656ac8d0890b Integrated into 'main-golden', will be available in build *201204140400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/656ac8d0890b User: Jesse Glick <jglick@netbeans.org> Log: #193065: [70cat] Deadlock in project.ui.support.NodeFactorySupport$DelegateChildren Removed weird pattern of having a Children subclass as a key type. Factoring the actual list of dependencies into a proper model class, and making the Children be a pure view. Should prevent call to Children.Keys.setKeys from inside a NFS.DC lock, which was a contributor to the deadlock. |