Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2043225 | 1.4.0 | James Holmlund | P3 | Resolved | Fixed | beta2 |
Name: el35337 Date: 05/03/2001
-------------------------------------
I've recently run into a bug that only seems to occur on Windows 2000. I'm running jdk1.3.0_01. This bug appears to be timing related and has not been seen on windows NT (or win95 for that matter).
I don't have source code to reproduce this, but I'll sketch out what I was doing and where the problem seems to be.
I'm debugging a simple program and am stopped at a breakpoint. I issue a quit in my debugger which eventually calls VirtualMachine.exit(0). Some of the time (30-50% maybe) I get a crash with the following traceback (I used a slightly backlevel source (1.3.0) for this when I compiled it myself):
waitForData(SharedMemoryConnection * 0x0703a5d8, Stream * 0x0703a62c) line 233 + 11 bytes
receiveBytes(SharedMemoryConnection * 0x0703a5d8, void * 0x0c7ffe40, long 4) line 860 + 11 bytes
shmemBase_receivePacket(SharedMemoryConnection * 0x0703a5d8, Packet * 0x0c7ffe40) line 890 + 17 bytes
Java_com_sun_tools_jdi_SharedMemoryConnection_receivePacket0(const JNINativeInterface_ * * 0x0b64c5b0, _jobject * 0x0b69ca8c, __int64 117679576, _jobject * 0x0b69ca98) line 219 + 12 bytes
_sysInvokeNative() line 163
invokeJNINativeMethod(Hjava_lang_Object * 0x02fe3e80, methodblock * 0x0b6472d8, int 4, execenv * 0x0b64c5b0) line 494 + 23 bytes
_ExecuteJava() line 14452
02fe3d28()
0b645000()
The crash is in the debugger, not the debuggee (and I hope I haven't switched those again). It appears that occasionally the freeConnection() function in shmembase.c gets called while another thread is in waitForData() using the same connection structure. freeConnection() writes dummy data into the structure, which causes waitForData() to crash (with an access violation) when it uses the connection structure again. I'm creating the debugger using a shared memory connector.
This bug appears similar to Bug #4409562, which apparently deals with intermittent crashes during debugging. However, my crashes only occur on exit, and I've tried running with the RemoteDebugger (but not the debuggee) under the Hotspot vm and I still get the crash.
One other wrinkle which makes it hard for me to create a reproducible test case is that I am creating the RemoteDebugger object from a VM that was started from inside another C++ process (i.e. our IDE). I don't believe this has any bearing on the problem I'm having. I tried to recreate the problem with jdb, but I couldn't get it to happen.
(Review ID: 123705)
======================================================================
- backported by
-
JDK-2043225 crash in shmembase.c exiting debugger
- Resolved