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.
Product Version: NetBeans IDE Dev (Build 200808130201) Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b14 System: Windows Vista version 6.0 running on x86; Cp1250; cs_CZ (nb) Observed: I experienced deadlock at startup of NB. From the thread dump it seems that org.netbeans.modules.db.mysql.impl.ServerNodeProvider might be responsible - please see the attached threaddump. This may be in relation with fixing of Issue #129573 and Issue #143048.
Created attachment 67227 [details] threaddump generated via VisualVM
This deadlock occurs every time NB starts with empty userdir.
info from issue 143730 : Product Version = NetBeans IDE Dev (Build 200808130201) Operating System = Linux version 2.6.24-19-generic running on amd64 Java; VM; Vendor = 1.6.0_10-rc; Java HotSpot(TM) 64-Bit Server VM 11.0-b13; Sun Microsystems Inc. Runtime = Java(TM) SE Runtime Environment 1.6.0_10-rc-b26 - download full zip distro - unzip and run with Userdir & JDK switches - after start the whole IDE is frozen forever .. with "Registering the Java DB databases" in progress line. It happened for me 3 from 4 times I started IDE. I haven\t seen such problems before (with Beta...). can't reproduce with previous daily build (200808121401)
*** Issue 143730 has been marked as a duplicate of this issue. ***
*** Issue 143749 has been marked as a duplicate of this issue. ***
I'm on it.
Thanks for the thread dump. It looks as though the problem is that one thread is doing a lookup that ultimately wants to initialize ServerNodeProvider "Asynch children creator org.openide.nodes.AsynchChildren@19431dc" daemon prio=2 tid=0x04181400 nid=0xf18 waiting for monitor entry [0x301cf000..0x301cfd80] java.lang.Thread.State: BLOCKED (on object monitor) at org.netbeans.modules.db.mysql.impl.ServerNodeProvider.getDefault(ServerNodeProvider.java:79) - waiting to lock <0x1fc9b160> (a java.lang.Class for org.netbeans.modules.db.mysql.impl.ServerNodeProvider) The problem is another thread in the midst of a lookup is in the initializer for ServerNodeProvider, and this initializer is *also* doing a Lookup (to get the list of Installation implementations): "Asynch children creator org.openide.nodes.AsynchChildren@19431dc" daemon prio=2 tid=0x0417e800 nid=0xc70 in Object.wait() [0x2d07e000..0x2d07fb80] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x07cbdce0> (a org.openide.util.RequestProcessor$Task) at java.lang.Object.wait(Object.java:485) at org.openide.util.Task.waitFinished(Task.java:130) - locked <0x07cbdce0> (a org.openide.util.RequestProcessor$Task) at org.openide.util.RequestProcessor$Task.waitFinished(RequestProcessor.java:756) at org.openide.loaders.FolderLookup$Dispatch.waitFinished(FolderLookup.java:295) at org.openide.loaders.FolderLookup$ProxyLkp.beforeLookup(FolderLookup.java:411) at org.openide.util.lookup.ProxyLookup$R.myBeforeLookup(ProxyLookup.java:645) at org.openide.util.lookup.ProxyLookup$R.beforeLookup(ProxyLookup.java:664) at org.openide.util.lookup.ProxyLookup$R.myBeforeLookup(ProxyLookup.java:653) at org.openide.util.lookup.ProxyLookup$R.computeResult(ProxyLookup.java:518) at org.openide.util.lookup.ProxyLookup$R.allInstances(ProxyLookup.java:489) at org.openide.util.Lookup.lookupAll(Lookup.java:245) at org.netbeans.modules.db.mysql.impl.InstallationManager.getInstallations(InstallationManager.java:79) at org.netbeans.modules.db.mysql.impl.InstallationManager.detectInstallation(InstallationManager.java:115) at org.netbeans.modules.db.mysql.impl.ServerNodeProvider.findAndRegisterInstallation(ServerNodeProvider.java:113) at org.netbeans.modules.db.mysql.impl.ServerNodeProvider.findAndRegisterMySQL(ServerNodeProvider.java:102) at org.netbeans.modules.db.mysql.impl.ServerNodeProvider.<init>(ServerNodeProvider.java:86) at org.netbeans.modules.db.mysql.impl.ServerNodeProvider.getDefault(ServerNodeProvider.java:80) - locked <0x1fc9b160> (a java.lang.Class for org.netbeans.modules.db.mysql.impl.ServerNodeProvider) So I guess the lesson is, don't do a lookup in a class initializer that is also invoked by Lookup.
Fixed with changeset 1852c8e203e1
*** Issue 143738 has been marked as a duplicate of this issue. ***
reproduced with NetBeans IDE Dev (Build 200808170243)
Created attachment 67690 [details] tread dump
To me it seems it is different deadlock - the threaddump seems to be almost the same as in Issue #144233
This is a different stack trace, and I agree it looks like Issue 144233. Closing this issue again, please add your vote/cc to 144233.
verified on: Product Version: NetBeans IDE Dev (Build 200808210201) Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b14 System: Windows Vista version 6.0 running on x86; Cp1250; cs_CZ (nb)