JDK-8328866 : Add raw monitor rank support to the debug agent
  • Type: Enhancement
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 23
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2024-03-25
  • Updated: 2025-05-13
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 26
26Unresolved
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
The debug agent uses a lot of different JVMTI raw monitor. It's very easy to get a deadlock if they are entered in the wrong order. I recently ran across a deadlock where this was happening. There currently is no checking to make sure that raw monitor are entered in the proper order.

All of the debug agent raw monitor should be given a rank, and asserts added to make sure that raw monitor are entered in the order of their rank. This will help detect potential deadlocks. The debug agent already has wrapper functions for the JVMTI raw monitor APIs. The rank bookkeeping and asserts can be added there.
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/19044 Date: 2024-05-01 21:32:46 +0000
09-07-2024