-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b83
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2138851 | 5.0u10 | James Holmlund | P3 | Resolved | Fixed | b01 |
See example in attached zip file.
It has a debugger that starts a debuggee with two bkpts
set. The debuggee starts two threads. When
a thread hits a bkpt, an invokeMethod is done.
I have seen two failure modes:
1.
- main thread just starts the two debuggee threads
and then completes. It issues a thread death
event and then the commandLoop waits for a resume that never
comes
- thread 2 is reporting a bkpt and is waiting for cmd complete lock
- thread 1 is posting method entry and has suspended itself under
JavaThread::handle_special_runtime_exit_condition(
2.
- I think main thread exitted ok
- thread 1 has hit a bkpt and reported it. The debugger does an invokeMethod
on this thread. It hangs trying to get the System.out
monitor in a println call, because thread 2 has this monitor.
- thread 2 is under a println call so it has the monitor. It
is trying to post a method entry event and is blocked waiting
for the threadLock (which thread 1 must hold, but I haven't
been able to prove it).
I have seen some variations of this 2nd hang.
Needless to say, this doesn't happen everytime. The testcase
does several iterations and it happens sooner or later.
This happens in 5.0 and 1.4.2 as well as mustang.
###@###.### 2005-07-02 07:54:57 GMT
It has a debugger that starts a debuggee with two bkpts
set. The debuggee starts two threads. When
a thread hits a bkpt, an invokeMethod is done.
I have seen two failure modes:
1.
- main thread just starts the two debuggee threads
and then completes. It issues a thread death
event and then the commandLoop waits for a resume that never
comes
- thread 2 is reporting a bkpt and is waiting for cmd complete lock
- thread 1 is posting method entry and has suspended itself under
JavaThread::handle_special_runtime_exit_condition(
2.
- I think main thread exitted ok
- thread 1 has hit a bkpt and reported it. The debugger does an invokeMethod
on this thread. It hangs trying to get the System.out
monitor in a println call, because thread 2 has this monitor.
- thread 2 is under a println call so it has the monitor. It
is trying to post a method entry event and is blocked waiting
for the threadLock (which thread 1 must hold, but I haven't
been able to prove it).
I have seen some variations of this 2nd hang.
Needless to say, this doesn't happen everytime. The testcase
does several iterations and it happens sooner or later.
This happens in 5.0 and 1.4.2 as well as mustang.
###@###.### 2005-07-02 07:54:57 GMT
- backported by
-
JDK-2138851 Backend hangs when invokeMethod is called from a JDI eventHandler
- Resolved
- relates to
-
JDK-8218463 com/sun/jdi/InvokeHangTest.java fail "java.lang.Exception: InvokeHangTest: failed; bkpts = 64"
- Open
-
JDK-6321448 self-suspension with JVM-internal monitors and mutexes may not be needed
- Closed