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 184500 - Deadlock: EntityMappingsMetadataModelHelper vs. ProjectManager.mutex
Summary: Deadlock: EntityMappingsMetadataModelHelper vs. ProjectManager.mutex
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords: RANDOM, THREAD
Depends on:
Blocks:
 
Reported: 2010-04-19 20:26 UTC by Jesse Glick
Modified: 2010-04-23 04:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Deadlock (21.56 KB, text/plain)
2010-04-19 20:27 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2010-04-19 20:26:38 UTC
100417, randomly when opening a recent project.
Comment 1 Jesse Glick 2010-04-19 20:27:07 UTC
Created attachment 97666 [details]
Deadlock
Comment 2 Sergey Petrov 2010-04-20 13:13:08 UTC
Is UI locked? How often it can happens?
I can't reproduce it with about 10 reopening.
Comment 3 Jesse Glick 2010-04-20 18:14:50 UTC
(In reply to comment #2)
> Is UI locked?

Yes, as you can see AWT-EventQueue-1 is blocked.

> How often it can happens?

Just this once that I know of. But I believe it is clear from the thread dump that there is a lock ordering problem with EntityMappingsMetadataModelHelper, which should be fixable without necessarily being able to reproduce.
Comment 4 Sergey Petrov 2010-04-22 08:06:26 UTC
ok, unfortunately I don't have enough experience in deadlocks, but I don't see any reasons to have the same monitor for both methods as there is no interception between, separate monitor is added for getDefaultModel, should fix possible deadlocks change..Xml vs getDef.. even if some invocation order isn't good enough.
http://hg.netbeans.org/web-main/rev/a389dfd24a6d
Comment 5 Quality Engineering 2010-04-23 04:28:14 UTC
Integrated into 'main-golden', will be available in build *201004230200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a389dfd24a6d
User: Sergey B. Petrov <sj-nb@netbeans.org>
Log: #184500 persistence.xml and model are independent and can use different monitors, should fix posible deadlock changePersistenceXLM/getDefaultModel