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.
Created attachment 124577 [details] Thread dump. Profiler cannot connect to target VM if you run profiling several times in row. To reproduce: - run IDE with empty userdir - create new Java project - wait until scanning finishes - right-click project node and choose Profile - click Run to start profiling - click OK when profiling finishes - again right-click project node and choose Profile - click Run to start profiling - click OK when profiling finishes - repeat until progress dialog appears with message "Connecting to the target VM..." and it is up forever - it happens in less than 10 attempts Product Version: NetBeans IDE Dev (Build 201209190001) Java: 1.7.0_07; Java HotSpot(TM) 64-Bit Server VM 23.3-b01 System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Reproducible.
Profiled app hangs on startup: Thread 8: (state = BLOCKED) - org.netbeans.lib.profiler.server.ProfilerRuntime.waitEntry() @bci=98, line=350 (Interpreted frame) - java.lang.Object.wait(long) @bci=0 (Interpreted frame) - java.lang.ref.ReferenceQueue.remove(long) @bci=44, line=135 (Interpreted frame) - java.lang.ref.ReferenceQueue.remove() @bci=2, line=151 (Interpreted frame) - java.lang.ref.Finalizer$FinalizerThread.run() @bci=3, line=177 (Interpreted frame) Thread 7: (state = BLOCKED) - sun.misc.VM.<clinit>() @bci=24, line=241 (Interpreted frame) - sun.misc.Hashing.randomHashSeed(java.lang.Object) @bci=0, line=253 (Interpreted frame) - java.util.HashMap.<init>(int, float) @bci=6, line=255 (Interpreted frame) - java.util.HashMap.<init>() @bci=5, line=305 (Interpreted frame) - sun.reflect.Reflection.<clinit>() @bci=4, line=46 (Interpreted frame) - java.lang.ClassLoader.getCallerClassLoader() @bci=1, line=1531 (Interpreted frame) - java.lang.Class.forName(java.lang.String) @bci=2, line=186 (Interpreted frame) - org.netbeans.lib.profiler.server.Monitors.class$(java.lang.String) @bci=1, line=670 (Interpreted frame) - org.netbeans.lib.profiler.server.Monitors$ActiveServerState.<clinit>() @bci=8, line=670 (Interpreted frame) - org.netbeans.lib.profiler.server.Monitors.<clinit>() @bci=8, line=753 (Interpreted frame) - org.netbeans.lib.profiler.server.ProfilerRuntime.waitEntry() @bci=98, line=350 (Interpreted frame) - java.lang.Object.wait(long) @bci=0 (Interpreted frame) - java.lang.Object.wait() @bci=2, line=503 (Interpreted frame) - java.lang.ref.Reference$ReferenceHandler.run() @bci=46, line=133 (Interpreted frame) Thread 1: (state = BLOCKED) - sun.misc.Unsafe.<clinit>() @bci=15, line=46 (Interpreted frame) - java.util.Hashtable.<clinit>() @bci=0, line=234 (Interpreted frame) - java.lang.System.initializeSystemClass() @bci=0, line=1114 (Interpreted frame)
It looks like this is caused by new hashing algorithm introduced in JDK 7u6.
This is regression caused by 113926b00f26.
Fixed in profiler-main changeset: 234947:c3a5916b4107 user: Tomas Hurka <thurka@netbeans.org> date: Thu Oct 04 14:12:48 2012 +0200 summary: bugfix #218611, ActiveServerState instance is initialized too early and it collides with ProfilerRuntime.waitEntry()
Integrated into 'main-golden', will be available in build *201210050002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/c3a5916b4107 User: Tomas Hurka <thurka@netbeans.org> Log: bugfix #218611, ActiveServerState instance is initialized too early and it collides with ProfilerRuntime.waitEntry()