JDK-6701700 : MonitorInfo objects aren't invalidated when the owning thread is resumed
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-05-13
  • Updated: 2012-02-02
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u10Fixed 7 b32Fixed OpenJDK6Fixed
Related Reports
Relates :  
Relates :  
The spec says they are invalidated because the info contained in the MonitorInfo object might no longer be correct after a resume occurs.
For example,  the stack depth might be different, and the monitor might not even be owned by the thread anymore.
This bug is covered by the following new JTREG test:


EVALUATION http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/dd7969318d7a

SUGGESTED FIX ------- MonitorInfoImpl.java ------- 43c43 < ThreadReference thread, int dpth) { --- > ThreadReferenceImpl thread, int dpth) { 47a48 > thread.addListener(this);

EVALUATION MonitorInfoImpl implements ThreadListener but its ctor doesn't register itself as a listener of the associated thread. Thus when a resume occurs, the MonitorInfo objects aren't notified that they should become invalid. See the same implementation in StackFrameImpl.java