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 65947 - Profiler blocks a finishing profiled application
Summary: Profiler blocks a finishing profiled application
Status: CLOSED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: iformanek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-05 10:46 UTC by ehucka
Modified: 2006-10-09 10:49 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
threaddump (12.59 KB, text/plain)
2005-10-12 12:23 UTC, ehucka
Details
application's threaddump (15.07 KB, text/plain)
2005-10-12 12:28 UTC, ehucka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ehucka 2005-10-05 10:46:00 UTC
The exception is thrown during 'get snapshot' of finished application.


Profiler Engine: connection with agent closed
Profiler Engine: connection with agent closed
Profiler Engine: exception when trying to send response or command to client:
java.net.SocketException: Socket closed
java.net.SocketException: Socket closed
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:105)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:137)
        at
java.io.ObjectOutputStream$BlockDataOutputStream.writeBlockHeader(ObjectOutputStream.java:1691)
        at
java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1676)
        at
java.io.ObjectOutputStream$BlockDataOutputStream.flush(ObjectOutputStream.java:1622)
        at java.io.ObjectOutputStream.flush(ObjectOutputStream.java:656)
        at
com.sun.tools.profiler.wireprotocol.WireIO.sendComplexCommand(WireIO.java:55)
        at
com.sun.tools.profiler.server.ProfilerServer.sendComplexCmdToClient(ProfilerServer.java:513)
        at
com.sun.tools.profiler.server.ProfilerInterface.firstTimeMethodInvokeHook(ProfilerInterface.java:754)
        at
com.sun.tools.profiler.server.ProfilerInterface.access$000(ProfilerInterface.java:25)
        at
com.sun.tools.profiler.server.ProfilerInterface$1.handleFirstTimeMethodInvoke(ProfilerInterface.java:91)
        at
com.sun.tools.profiler.server.ProfilerRuntimeCPUFullInstr.methodEntry(ProfilerRuntimeCPUFullInstr.java:95)
        at java.lang.Shutdown.halt(Shutdown.java:144)
        at java.lang.Shutdown.exit(Shutdown.java:220)
        at java.lang.Runtime.exit(Runtime.java:91)
        at java.lang.System.exit(System.java:869)
        at
org.netbeans.test4u.tests.request.TestRequestProcessor.responseRequest(TestRequestProcessor.java:67)
        at
org.ehucka.core.api.request.RequestServer$DispatchThread.run(RequestServer.java:144)
Profiler Engine: connection with agent closed
Comment 1 iformanek 2005-10-10 16:11:54 UTC
How often does this happen, is it reproducible?
Comment 2 ehucka 2005-10-12 12:23:03 UTC
I found it is thrown when the profiled application is frozen. The profiler than
get to state 'NOT RUNNING' (Detach button is disabled) but the port 5140 is
still bound. The application is still present in Runtime|Processes node.
Comment 3 ehucka 2005-10-12 12:23:52 UTC
Created attachment 25856 [details]
threaddump
Comment 4 ehucka 2005-10-12 12:28:56 UTC
Created attachment 25857 [details]
application's threaddump
Comment 5 ehucka 2005-10-12 14:06:10 UTC
Another reproduction:

The exception is thrown after taking snapshot of a finished uni test too.
Comment 6 ehucka 2005-10-13 12:30:04 UTC
Profiler probably tries to instrument Shutdown methods:

event thread of blocked application:

"AWT-EventQueue-0" prio=1 tid=0x081d3448 nid=0x4777 in Object.wait()
[0xa9a70000..0xa9a71030]
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:474)
        at
com.sun.tools.profiler.server.ProfilerServer.getLastResponse(ProfilerServer.java:931)
        - locked <0xaad279c8> (a java.lang.Object)
        - locked <0xae8b6528> (a java.lang.Class)
        at
com.sun.tools.profiler.server.ProfilerInterface.getAndInstrumentClasses(ProfilerInterface.java:402)
        at
com.sun.tools.profiler.server.ProfilerInterface.firstTimeMethodInvokeHook(ProfilerInterface.java:755)
        - locked <0xaad26850> (a java.lang.Object)
        at
com.sun.tools.profiler.server.ProfilerInterface.access$000(ProfilerInterface.java:25)
        at
com.sun.tools.profiler.server.ProfilerInterface$1.handleFirstTimeMethodInvoke(ProfilerInterface.java:91)
        at
com.sun.tools.profiler.server.ProfilerRuntimeCPUFullInstr.methodEntry(ProfilerRuntimeCPUFullInstr.java:95)
        at java.lang.Shutdown.halt(Shutdown.java:144)
        at java.lang.Shutdown.exit(Shutdown.java:220)
        - locked <0xae964b60> (a java.lang.Class)
        at java.lang.Runtime.exit(Runtime.java:91)
        at java.lang.System.exit(System.java:869)
...
Comment 7 iformanek 2005-10-18 17:27:33 UTC
Fixed
Comment 8 ehucka 2005-11-08 14:07:39 UTC
v