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.
I pressed Ctrl+Shift+O and IDE became frozen. I see blocked Watcher.register in EDT
Created attachment 149048 [details] threads dump Product Version = NetBeans IDE Dev (Build 20140905-ecb25fa5bd60) (#ecb25fa5bd60) Operating System = SunOS version 5.11 running on amd64 Java; VM; Vendor = 1.7.0_67; Java HotSpot(TM) 64-Bit Server VM 24.65-b04; Oracle Corporation Runtime = Java(TM) SE Runtime Environment 1.7.0_67-b01 Java Home = /usr/jdk/instances/jdk1.7.0_67/jre
there is no deadlock, but VCSFileProxy should definitely not trying to add listeners in EDT
Unfortunately, I think there is a deadlock involving Watcher and FileChangedManager. Thread "Refresh-After-WindowActivated" wants to perform some low-priority I/O operation using "FileChangedManager.idleIO". In this operation, it needs to register a listener, so it takes Watcher's lock, but it is then blocked in FileChangedManager because it is waiting for some (just started) hi-priority operation to complete. Thread "org.netbeans.modules.jumpto.symbol.ContentProviderImpl" performs the high-priority operation (FileChangedManager.priorityIO), but it cannot complete it as it has to wait forever to get the Watcher's lock (meanwhile retrieved by "Refresh-After-WindowActivated"). This deadlock can occur only with NIO2 Notifier (currently used probably only on Solaris OS) which invokes Java SecurityManager when registering a watch. (FileChangedManager is set as SecurityManager in NetBeans.)
ok, then. Fix the deadlock and then reassign back to me, because the I/O in EDT should be avoided as well.
Created attachment 149065 [details] Proposed Patch Patch that fixes the problem. Reviews are welcome. I'll integrate it at the end of this week, unless there are any objections.
Fixed - http://hg.netbeans.org/core-main/rev/8908192d8d66 If you want to integrate the fix in the patch (801patch1-candidate), please verify if carefully (especially on Solaris). If the change breaks something, the impact can be quite large. Thank you.
(In reply to Ondrej Vrabec from comment #4) > ok, then. Fix the deadlock and then reassign back to me, because the I/O in > EDT should be avoided as well. Reported as separate bug 247030.
Integrated into 'main-silver', will be available in build *201409130001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/8908192d8d66 User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #246893: Deadlock during Go To Symbol FileChangedManager's "lock" has to be always taken before Watcher's lock.
*** Bug 252393 has been marked as a duplicate of this bug. ***