JDK-8325272 : JDWP ObjectReference.MonitorInfo command spec needs a clarification
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2024-02-06
  • Updated: 2024-05-09
  • Resolved: 2024-02-15
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 23
23Resolved
Related Reports
Duplicate :  
Relates :  
Description
The JDWP ObjectReference.MonitorInfo command spec has a typo needs a clarification for the `waiters` field.
This is the input from [~dholmes] below:

>>>
I think a clarification to the JDWP spec is in order as it simply states:

  `waiters` The number of threads that are waiting for the monitor 0 if there is no current owner

with no explanation of exactly what "waiting for the monitor" means. That said there is a problem with the interpretation that it means "waiting to enter, or waiting to be notified" as that conflicts with the statement "0 if there is no current owner" because we can have no current owner but still have multiple threads waiting to be notified. But that said I think any mention of "current owner" here is a mistake and not relevant to what "waiters" is actually trying to report: it will be zero if there are no waiters, regardless of whether there is currently an owner or not. So this part of the JDWP spec needs fixing too. Separate issue is fine for that of course.
<<<

Also, there is a typo in the description above. At least it has to be specified as:
 "The number of threads that are waiting for the monitor, or 0 if there is no current owner."


Please, see: https://docs.oracle.com/en/java/javase/21/docs/specs/jdwp/jdwp-protocol.html#JDWP_ObjectReference_MonitorInfo
Comments
A decision was made to address this as part of the JDK-8247972 bug.
15-02-2024