-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8362304: Fix JDWP spec w.r.t. OPAQUE_FRAME and INVALID_SLOT errors #26336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
/csr needed |
👋 Welcome back cjplummer! A progress list of the required criteria for merging this PR into |
@plummercj This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 359 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
@plummercj has indicated that a compatibility and specification (CSR) request is needed for this pull request. @plummercj please create a CSR request for issue JDK-8362304 with the correct fix version. This pull request cannot be integrated until the CSR request is approved. |
@plummercj The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
/label add serviceability |
/label remove core-libs |
@plummercj |
@plummercj |
Ping. just triggering first email to serviceability-dev. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Also, I'll wait for CSR to review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated version looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The update looks good.
I think, this issue needs a Release Note, same as the JNI related enhancement. Not sure about the JVMTI related spec update as it has pure spec clarifications which do not have even minor compatibility issues. |
I agree. Also one release note to cover the 3 interfaces would be clearer than separate notes. |
Keep in mind that the APIs in question do not map 1-to-1 across these interfaces. For example, NativeMethodException is unique to JDI, and JDI get/setValue() is implemented such that it cannot end up failing due to NativeMethodException. Also, JDI needed implementation changes whereas JVMTI and JDWP did not. |
Thanks for the reviews Alan, Alex, and Serguei! |
/integrate |
Going to push as commit 4ed268f.
Your commit was automatically rebased without conflicts. |
@plummercj Pushed as commit 4ed268f. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
StackFrame.SetValues, StackFrame.GetValues, ThreadReference.PopFrames, and ThreadReference.ForceEarlyReturn all need updated language related to OPAQUE_FRAME error.
(1) The spec for JVMTI says the following for GetLocalsXXX and SetLocalsXXX
The implementation is unable to set the frame locals
(e.g. the frame at depth is executing a native method).
However, the JDWP StackFrame.SetValues and GetValues commands only mention OPAQUE_FRAME for SetValues when not called for the topmost frame of a virtual thread suspended at an event. I don't think there is anything to prevent OPAQUE_FRAME due to the thread being native or some other reason as mentioned in the JVMTI spec. The JDWP spec should be updated to reflect this.
(1) The spec for JVMTI says the following for PopFrame and ForceEarlyReturn:
The implementation is unable to force the current frame to return
(e.g. current frame is executing a native method).
However, the JDWP ThreadReference.PopFrames, and ThreadReference.ForceEarlyReturn commands only mention OPAQUE_FRAME when this commands are not called for the topmost frame of a virtual thread suspended at an event. I don't think there is anything to prevent OPAQUE_FRAME due to the thread being native or some other reason as mentioned in the JVMTI spec. The JDWP spec should be updated to reflect this.
(3) Another issue is that INVALID_SLOT is missing in the JDWP spec for SetValues, but is there for GetValues. It should be mentioned for both commands.
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26336/head:pull/26336
$ git checkout pull/26336
Update a local copy of the PR:
$ git checkout pull/26336
$ git pull https://git.openjdk.org/jdk.git pull/26336/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 26336
View PR using the GUI difftool:
$ git pr show -t 26336
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26336.diff
Using Webrev
Link to Webrev Comment