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 221502 - Livelock in PasteAction because blocked in Mutex.isReadAccess!?
Summary: Livelock in PasteAction because blocked in Mutex.isReadAccess!?
Status: RESOLVED DUPLICATE of bug 221279
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 7.3
Hardware: PC Linux
: P2 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
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
Exception Reporter:


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 ***