JDK-8275764 : JDWP: Improve locking in doPendingTasks() after JDK-8274687
  • Type: Enhancement
  • Component: core-svc
  • Sub-Component: debugger
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • Submitted: 2021-10-22
  • Updated: 2024-07-17
  • Resolved: 2024-07-17
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.
Other
tbdResolved
Related Reports
Relates :  
Relates :  
Description
JDK-8274687 will add the following fragment to doPendingTasks() in the JDWP agent:

        /*
         * trackAppResume() (indirectly) aquires handlerLock. For proper lock
         * ordering handlerLock has to be acquired before threadLock.
         */
        debugMonitorExit(threadLock);
        eventHandler_lock();
        debugMonitorEnter(threadLock);

Investigate if this can be improved by hoisting the first monitor exit on threadLock up into the caller threadControl_onEventHandlerExit() such that doPendingTasks() would be called without any locks held.
Comments
The offending code was removed as part of JDK-8296089. Closing.
17-07-2024