Bug 221502 - Livelock in PasteAction because blocked in Mutex.isReadAccess!?
Livelock in PasteAction because blocked in Mutex.isReadAccess!?
Status: RESOLVED DUPLICATE of bug 221279
Product: platform
Classification: Unclassified
Component: Data Systems
7.3
PC Linux
: P2 (vote)
: TBD
Assigned To: Jaroslav Tulach
issues@platform
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-05 16:10 UTC by Milutin Kristofic
Modified: 2012-11-06 11:33 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
Thread Dump (20.91 KB, application/octet-stream)
2012-11-05 16:10 UTC, Milutin Kristofic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milutin Kristofic 2012-11-05 16:10:59 UTC
Created attachment 127163 [details]
Thread Dump

Product Version: NetBeans IDE Dev (Build 201210310001)
Updates: Updates available
Java: 1.6.0_33; Java HotSpot(TM) 64-Bit Server VM 20.8-b03
Comment 1 Jaroslav Tulach 2012-11-05 16:16:08 UTC
	at org.openide.util.Mutex.isReadAccess(Mutex.java:509)
	- locked <0x00000000d11a0fa8> (a org.openide.util.Mutex$InternalLock)
	at org.openide.util.Mutex.isReadAccess(Mutex.java:503)
Comment 2 Antonin Nebuzelsky 2012-11-05 21:40:46 UTC
Two threads are fighting repeatedly for the Mutex, org.netbeans.modules.project.ui.ProjectTab and AWT-EventQueue-1.

This is not a real deadlock (only one of the two threads is BLOCKED at a time), but starvation caused by the repeated attempts to acquire the mutex and then wait in both threads as they go node by node through a long list of nodes.

The culprit is the code at

at org.openide.util.Mutex.isReadAccess(Mutex.java:509)
- locked <0x00000000d11a0fa8> (a org.openide.util.Mutex$InternalLock)
at org.openide.util.Mutex.isReadAccess(Mutex.java:503)
at org.openide.loaders.FolderChildren.checkChildrenMutex(FolderChildren.java:317)
at org.openide.loaders.FolderChildren.getNodes(FolderChildren.java:269)

If a list of nodes is very long, this back and forth between the two threads can take very long and seem like a deadlock.

-> platform / nodes
Comment 3 Antonin Nebuzelsky 2012-11-05 21:43:44 UTC
See also issue 221279 which is a result of the same root cause.
Comment 4 Jaroslav Tulach 2012-11-06 11:33:36 UTC

*** This bug has been marked as a duplicate of bug 221279 ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo