Error: JVMTI_ERROR_WRONG_PHASE when program finishes

Questions about YourKit Java Profiler
Post Reply
JGutenberg
Posts: 3
Joined: Wed Apr 20, 2005 10:38 pm

Error: JVMTI_ERROR_WRONG_PHASE when program finishes

Post by JGutenberg »

I get the error in my JVM console (1.5): JVMTI_ERROR_WRONG_PHASE
when my application finishes. Because of this I cannot take snapshots from the yourKit profiler application (Says 'connection reset').

Has anyone else had this error? I believe it has something to do with a synchronization issue in the main application (see Sun's webiste: http://java.sun.com/developer/technical ... ransition/ )...

I have tried it first with terminating the program w/ System.exit(0)
I have since commented that out but it didn't change the error.

The full error is below:

[YourKit Java Profiler 4.0.8] Using JVMTI
[YourKit Java Profiler 4.0.8] Listening on port 1235...
Enter Test Number: <-- my console output
[YourKit Java Profiler 4.0.8] Request from 127.0.0.1: Garbage collected. Size of objects in heap: before=942480 bytes, after=398392 bytes
[YourKit Java Profiler 4.0.8] Request from 127.0.0.1: Allocation recording is started
[YourKit Java Profiler 4.0.8] Request from 127.0.0.1: CPU tracing is started
2 <-- my console output
Done. <-- my console output. program is done.
ERROR: JVMTI error err=112(JVMTI_ERROR_WRONG_PHASE) in Allocations.cpp:54
ERROR: JVMTI error err=112(JVMTI_ERROR_WRONG_PHASE) in Allocations.cpp:54
ERROR: JVMTI error err=112(JVMTI_ERROR_WRONG_PHASE) in Allocations.cpp:54
Picked up JAVA_TOOL_OPTIONS: -agentlib:yjpagent=sessionname=YJPQUOTED50617273657254657374657220286c61756e636865642066726f6d2045636c6970736529


Thanks ahead of time for your help - it's very much appreciated

-JG
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

Hi,

Sorry for the delayed answer.

We are investigation the issue, and will publish a fix as soon as it is ready.

As a workaround, could you please before termination of the program (before e.g. System.exit()) stop allocation recording via the profiler API.

Best regards,
Anton
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

The bug is fixed in upcoming 4.0.11, as well as in 4.5 early access that will be available on May 12.

Best regards,
Anton
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

The bug is fixed in 4.0.11 (http://www.yourkit.com/download )
Post Reply