JDK-8289608 : Change com/sun/jdi tests to not use Thread.suspend/resume
  • Type: Sub-task
  • Component: core-svc
  • Sub-Component: debugger
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-07-02
  • Updated: 2022-09-20
  • Resolved: 2022-09-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 20
20 masterFixed
Description
There are two JDI tests that mix Thead.suspend/resume with JDI ThreadReference.suspend/resume. These tests need to be changed (or deleted) so there is no dependency on Thread.suspend/resume.

com/sun/jdi/MixedSuspendTest.java
com/sun/jdi/ResumeAfterThreadResumeCallTest.java

Comments
Changeset: 2028ec74 Author: Leonid Mesnik <lmesnik@openjdk.org> Date: 2022-09-15 17:25:48 +0000 URL: https://git.openjdk.org/jdk/commit/2028ec7412fae3ee0a67f0c90bdc686c2edc1055
15-09-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/10255 Date: 2022-09-13 23:05:00 +0000
13-09-2022

The proposal is that Thread.stop, suspend and resume will throw UOE unconditionally. Yes, part of the spec updates will be updates to JDWP and JDI specs.
18-08-2022

If by "degraded" you mean no longer functional, then likely these tests should just be removed in that case. It looks like the specs might need some minor cleanup, but not much: https://docs.oracle.com/en/java/javase/17/docs/specs/jdwp/jdwp-protocol.html#JDWP_ThreadReference_Suspend https://docs.oracle.com/en/java/javase/17/docs/api/jdk.jdi/com/sun/jdi/ThreadReference.html#suspend() "Suspending single threads with this method has the same dangers as Thread.suspend()." " the application in the target VM cannot resume the suspended thread through Thread.resume()." We'll probably just want to remove these references.
17-08-2022

Once Thread.suspend/resume is degraded then it won't be possible to mix them. If we can't get all the tests changed in advance of the degradation then we will need to exclude them. In the case of APIs in JPDA then we may also need to do a pass over any docs that reference Thread.suspend to see if anything needs to be changed.
17-08-2022

I think the point of these tests is to mix the two.
17-08-2022