-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8352773: JVMTI should disable events during java upcalls #24539
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
👋 Welcome back sspitsyn! A progress list of the required criteria for merging this PR into |
@sspitsyn 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 86 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 |
Webrevs
|
If this goes ahead then it allows for a discussion about changing JVMTI InterruptThread to invoke Thread.interrupt when the target is a platform thread. As you know, there is a long standing issue here where threads blocked on interruptible channels not being awakened by JVMTI InterruptThread. |
Yes, this fix is already including an update for interrupts. I'll add a comment with the fix details tomorrow. |
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.
So this is another case where you have to ignore JVMTI event like in VTMS transitions? It looks like a good way to fix this in general.
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.
Looks good.
…are; 2) added one minor comment
Coleen and Leonid, thank you for review! |
Yes. This is a long standing issue which is good to fix now. |
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 reasonable to me. Thanks.
David, thank you for review! |
I've pushed a minor update to fix a build time error for minimal VM. |
Chris, thank you for review! Thank you for re-approvals guys! |
/integrate |
Going to push as commit 1c34f3c.
Your commit was automatically rebased without conflicts. |
As noted in JDK-8352088, JVMTI
GetThreadGroupChildren
does an upcall to java. This results in aClassPrepare
event the first time it does this, and these events can cause problems (deadlocks) for the debugger or debug agent. The JDK-8352088 was fixed to get rid of class loading during Java upcall fromGetThreadGroupChildren
. However, some other events can be generated as well. It is more safe to disable all JVMTI events during debugger-related upcalls originated by JVMTI.The
ClassPrepare
events are important for the debug agent. So, an assert was added intoClassPrepare
event generation to make sure there are no attempts to post this event during upcalls.Some specific implementation details can be added to the first PR comment.
Testing:
jdk/com/sun/jdi/EarlyThreadGroupChildrenTest.java
that was added with the fix of JDK-8352088:Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24539/head:pull/24539
$ git checkout pull/24539
Update a local copy of the PR:
$ git checkout pull/24539
$ git pull https://git.openjdk.org/jdk.git pull/24539/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24539
View PR using the GUI difftool:
$ git pr show -t 24539
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24539.diff
Using Webrev
Link to Webrev Comment