JDK-8230303 : JDB hangs when running monitor command
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 7u101,8,11,13,14
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-08-28
  • Updated: 2020-07-29
  • Resolved: 2019-09-10
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 11 JDK 13 JDK 14 JDK 7 JDK 8 Other
11.0.6-oracleFixed 13.0.2Fixed 14 b14Fixed 7u241Fixed 8u231Fixed openjdk8u272Fixed
Description
In the jdb utility, if a monitor executes a command modifying the monitor list, the debugee hangs.

Here's an example of the output in jdb, when a monitor command modifies the list of monitors:
Exception in thread "event-handler" 
java.util.ConcurrentModificationException 
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:859) 
at java.util.ArrayList$Itr.next(ArrayList.java:831) 
at com.sun.tools.example.debug.tty.TTY.vmInterrupted(TTY.java:202) 
at com.sun.tools.example.debug.tty.EventHandler.run(EventHandler.java:81) 
at java.lang.Thread.run(Thread.java:745)
Comments
Backporting a single test, which isn't going to be used because the frame work isn't there, will only make backporting the framework more complicated in the future. The test will come along with the rest of the framework presumably. The test can't be run without the framework.
29-07-2020

Looks like a clean backport to me. No reason the test can't be added and then the framework sorted out later.
29-07-2020

[~chf] Patches which don't cleanly apply need a review. That includes patches which differ from the checked in version in later JDKs. For the sake of this trivial patch I'm OK with you pushing the fix and counting me as a reviewer of the JDK 8u change. It's OK to not backport the test. So approving anyway.
21-07-2020

Fix request (8u) The patch applies with simple path updates, but the test does not. The risk of including the patch without a test is small since it's trivially correct and has been shown to fix the problem in 11u. We can revisit back porting the test once the vmTestBase infrastructure is back ported. The patched JDK passes tier 1 with no new failures. Patch with fixed paths and no tests is here. http://cr.openjdk.java.net/~chf/JDK-8230303_jdk8u.patch
10-07-2020

Fix Request (11u) This patch improves JDB reliability and keeps codebases in sync (I see 11.0.6-oracle). Patch applies cleanly to 11u, new test times out without the patch and passes quickly with it. Patched JDK also passes tier1 and tier2.
14-10-2019

Fix request (JDK 13u) This is a low risk fix, which prevents hanging of an application being debugged by JDB in certain situations. The fix applies cleanly. Control build/testing are green.
10-09-2019

URL: https://hg.openjdk.java.net/jdk/jdk/rev/6eca527d3689 User: igerasim Date: 2019-09-10 16:08:56 +0000
10-09-2019