JDWP exist error

I'm getting an exist error with jdk 1.5.0_07-b03 when the JVM shuts down. The error is below. Should I create a bug ticket for this?

JDWP exit error JVMTI_ERROR_WRONG_PHASE(112): on getting class statusFATAL ERROR in native method: JDWP on getting class status, jvmtiError=JVMTI_ERROR_WRONG_PHASE(112)

#

# An unexpected error has been detected by HotSpot Virtual Machine:

#

# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d40919d, pid=448, tid=3184

#

# Java VM: Java HotSpot(TM) Server VM (1.5.0_07-b03 mixed mode)

# Problematic frame:

# C [jdwp.dll+0x1919d]

#

# An error report file with more information is saved as hs_err_pid448.log

The contents of the file is:

#

# An unexpected error has been detected by HotSpot Virtual Machine:

#

# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d40919d, pid=448, tid=3184

#

# Java VM: Java HotSpot(TM) Server VM (1.5.0_07-b03 mixed mode)

# Problematic frame:

# C [jdwp.dll+0x1919d]

#

T H R E A D

Current thread (0x00839a40): JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=3184]

siginfo: ExceptionCode=0xc0000005, reading address 0x00000000

Registers:

EAX=0x00000000, EBX=0x00839000, ECX=0x17ebfc74, EDX=0x00000001

ESP=0x17ebfc58, EBP=0x17ebfc84, ESI=0x00839a40, EDI=0x00000000

EIP=0x6d40919d, EFLAGS=0x00010246

Top of Stack: (sp=0x17ebfc58)

0x17ebfc58:00000000 00838030 00839a40 6d3faed5

0x17ebfc68:00838030 6d3fad7b 00839030 00000000

0x17ebfc78:00001800 00020100 1c3d8120 17ebff80

0x17ebfc88:6daaac34 00823e98 00839b00 00000000

0x17ebfc98:00839a40 6db60c52 00839a40 00839a40

0x17ebfca8:00839a40 00839a40 00839620 00839220

0x17ebfcb8:00839228 00839614 00839200 6db60c1b

0x17ebfcc8:00839a40 6dafb3d2 00000000 00000000

Instructions: (pc=0x6d40919d)

0x6d40918d:ff 00 c3 56 a1 e0 05 42 6d ff 74 24 08 8b 00 50

0x6d40919d:8b 08 ff 91 80 00 00 00 50 e8 74 00 00 00 8b f0

Stack: [0x17e80000,0x17ec0000), sp=0x17ebfc58, free space=255k

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)

C [jdwp.dll+0x1919d]

V [jvm.dll+0x1dac34]

C [MSVCRT.dll+0x2a3b0]

C [kernel32.dll+0xb50b]

P R O C E S S

Java Threads: ( => current thread )

0x1c3ad6d0 JavaThread "RMI ConnectionExpiration-[10.2.10.2:4444]" daemon [_thread_blocked, id=2684]

0x1c3a76e0 JavaThread "RMI TCP Connection(4)-10.2.10.2" daemon [_thread_in_native, id=3256]

0x1c8b3260 JavaThread "JBoss Shutdown Hook" daemon [_thread_in_native, id=2972]

0x1c8b2820 JavaThread "Thread-44" daemon [_thread_blocked, id=3076]

0x1c8a6b60 JavaThread "JBoss System Threads(1)-3" daemon [_thread_blocked, id=2940]

0x1c8a4e70 JavaThread "http-0.0.0.0-8080-3" daemon [_thread_blocked, id=512]

0x1c882ca0 JavaThread "http-0.0.0.0-8080-2" daemon [_thread_blocked, id=252]

0x1c871e70 JavaThread "IdleRemover" daemon [_thread_blocked, id=1312]

0x1c86e810 JavaThread "RMI LeaseChecker" daemon [_thread_blocked, id=2084]

0x1c82bc70 JavaThread "http-0.0.0.0-443-Processor24" daemon [_thread_blocked, id=804]

0x1c811350 JavaThread "TP-Processor4" daemon [_thread_blocked, id=2792]

0x1c40fa90 JavaThread "http-0.0.0.0-8080-1" daemon [_thread_blocked, id=3856]

0x1c40b780 JavaThread "http-0.0.0.0-8080" daemon [_thread_blocked, id=3112]

0x1c409580 JavaThread "JBossLifeThread" [_thread_blocked, id=3580]

0x1c3a0190 JavaThread "Tasks:Thread-7" daemon [_thread_blocked, id=3644]

0x1c31d4f0 JavaThread "Timer-3" daemon [_thread_blocked, id=2612]

0x1c346710 JavaThread "JCA PoolFiller" [_thread_blocked, id=3020]

0x1c343190 JavaThread "Timer-2" daemon [_thread_blocked, id=3356]

0x1c33b3a0 JavaThread "HSQLDB Timer @a40787" daemon [_thread_blocked, id=168]

0x1c332cd0 JavaThread "WorkManager(3)-1" daemon [_thread_blocked, id=2516]

0x00917640 JavaThread "SubscriptionWatchDog" [_thread_blocked, id=2872]

0x008b9320 JavaThread "RMI TCP Accept-4444" daemon [_thread_in_native, id=3512]

0x008b8b60 JavaThread "TimeoutFactory-0" daemon [_thread_blocked, id=2916]

0x008aec60 JavaThread "JBoss System Threads(1)-2" daemon [_thread_blocked, id=984]

0x008a90d0 JavaThread "GC Daemon" daemon [_thread_blocked, id=3424]

0x008a9e70 JavaThread "RMI Reaper" [_thread_blocked, id=3232]

0x008a8430 JavaThread "Timer-1" daemon [_thread_blocked, id=1032]

0x008a8c50 JavaThread "RMI TCP Accept-1098" daemon [_thread_in_native, id=180]

0x008a5d50 JavaThread "JBoss System Threads(1)-1" daemon [_thread_blocked, id=3604]

0x0088e090 JavaThread "Timer-0" daemon [_thread_blocked, id=2620]

0x008460c0 JavaThread "DestroyJavaVM" [_thread_blocked, id=3092]

0x00840d20 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=848]

0x0083fb90 JavaThread "CompilerThread1" daemon [_thread_blocked, id=2668]

0x0083ed50 JavaThread "CompilerThread0" daemon [_thread_blocked, id=2432]

0x0083c260 JavaThread "AdapterThread" daemon [_thread_blocked, id=3772]

=>0x00839a40 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=3184]

0x008371b0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=3324]

0x00836c20 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_in_vm, id=3284]

0x0082fd30

[5578 byte] By [damana] at [2007-10-3 0:11:23]
# 1
Obviously you started this java process with the JDWP agent, was a debugger in use here? And had you supplied any debugger commands before this happened?And do you know how the VM was being shutdown?-kto
kellyohaira at 2007-7-14 17:01:04 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2

I started JBoss up inside of eclipse which probably starts it up in debugger mode by default.I didn't supply any debugger commands explicitely. If eclipse 3.1.2 adds them I'm not sure.The VM was being shutdown through eclipse. It is configured to run JBoss 'shutdown -S' command.

I've tried to reproduce the problem outside of eclipse and have not been able to do so. Probably because I'm not starting up in debug mode outside of the tool.

damana at 2007-7-14 17:01:04 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 3

I did upgrade to Eclipse 3.2 and I still get a similiar error but slightly different. The error message is below. Is it possible that the Eclipse debugging component is not working with the JVMTI properly?

JDWP exit error JVMTI_ERROR_WRONG_PHASE(112): on getting class statusJDWP exit error JVMTI_ERROR_INVALID_ENVIRONMENT(116): Can't allocate jvmti memoryERROR: JDWP unable to dispose of JVMTI environment: JVMTI_ERROR_INVALID_ENVIRONMENT(116) ["debugInit.c",L388]

FATAL ERROR in native method: JDWP Can't allocate jvmti memory, jvmtiError=JVMTI_ERROR_INVALID_ENVIRONMENT(116)

FATAL ERROR in native method: JDWP on getting class status, jvmtiError=JVMTI_ERROR_WRONG_PHASE(112)

damana at 2007-7-14 17:01:04 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 4

The wrong phase error indicates that the debugger JVM TI agent (or sometimes called the debugger backend, a native library that implements the JDWP protocol) has made a request of JVM TI when the VM is in a state where it cannot accept the request. The phases represent things like 'has the VM started', 'is the VM fully initialized', or I suspect in this case 'has the VM shutdown'. The backend should know when the VM has shutdown (it gets an event callback when this happens), and shouldn't be making JVM TI calls after it has processed the 'VM shutdown' event. Unless, it never got that event.

I'm not an eclipse user and I don't know where they get their debugger JVM TI agent from. If it's the JVM TI agent that comes with the JDK, I'd try to use a newer 1.5.0, maybe update 6? In the meantime I will do a bit of searching and see if I find anything that might indicate we had a problem with update 3.

Do you know if this ever worked with eclipse and jdk 1.5.0, in any jdk update?

-kto

kellyohaira at 2007-7-14 17:01:04 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 5
I am using the update 11 of jdk 1.5.0 with eclipse in a maven project and get the same error after successful build.
Tuno85a at 2007-7-14 17:01:04 > top of Java-index,Java HotSpot Virtual Machine,Specifications...