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.
While object liveness instrumentation is used: If NetBeans are detached from the profiled application before the profiling initialization is done the InitiateProfilingThread is left waiting on NetBeans response. Not stopped thread stack trace: "*** Profiler Agent Special Execution Thread 2" daemon prio=10 tid=0x00007ff5d4008800 nid=0x16f4 in Object.wait() [0x00007ff61e725000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000000d21828d8> (a java.lang.Object) at java.lang.Object.wait(Object.java:485) at org.netbeans.lib.profiler.server.ProfilerServer.getLastResponse(ProfilerServer.java:452) - locked <0x00000000d21828d8> (a java.lang.Object) - locked <0x00000000bb0dd698> (a java.lang.Class for org.netbeans.lib.profiler.server.ProfilerServer) at org.netbeans.lib.profiler.server.ProfilerInterface.getAndInstrumentClasses(ProfilerInterface.java:651) at org.netbeans.lib.profiler.server.ProfilerInterface.access$900(ProfilerInterface.java:70) at org.netbeans.lib.profiler.server.ProfilerInterface$InitiateProfilingThread.initiateInstrumentation(ProfilerInterface.java:226) at org.netbeans.lib.profiler.server.ProfilerInterface$InitiateProfilingThread.run(ProfilerInterface.java:136)
Created attachment 121933 [details] fix PREPARE_DETACH message added to wireprotocol. This message tries to lock transaction in server and reports results. It also sets flag in profiler interface which is used by profiling initialization thread to stop. The client on detech request repeatedly calls PREPARE_DETACH until the mcall succeeds. Then the detach sequence continues as before.
Created attachment 122361 [details] Updated patch Reviewed patch attached with minor changes
changeset: http://hg.netbeans.org/profiler-main/rev/8da1a3e6b5da
Integrated into 'main-golden', will be available in build *201208010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/8da1a3e6b5da User: Jan Taus <jtau8042@netbeans.org> Log: #213973: Detach immediately after attach lefts profiled application in inconsistent state
verified