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 218611 - Profiler connecting forever when run repeatedly
Summary: Profiler connecting forever when run repeatedly
Status: VERIFIED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Engine (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: Tomas Hurka
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2012-09-19 12:13 UTC by Jiri Skrivanek
Modified: 2012-10-05 09:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump. (30.63 KB, text/plain)
2012-09-19 12:13 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2012-09-19 12:13:41 UTC
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)
Comment 1 Jiri Sedlacek 2012-10-03 12:13:26 UTC
Reproducible.
Comment 2 Jiri Sedlacek 2012-10-03 12:46:02 UTC
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)
Comment 3 Tomas Hurka 2012-10-03 13:22:16 UTC
It looks like this is caused by new hashing algorithm introduced in JDK 7u6.
Comment 4 Tomas Hurka 2012-10-04 12:06:51 UTC
This is regression caused by 113926b00f26.
Comment 5 Tomas Hurka 2012-10-04 12:14:37 UTC
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()
Comment 6 Quality Engineering 2012-10-05 02:01:26 UTC
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()