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
8291456: com/sun/jdi/ClassUnloadEventTest.java failed with: Wrong number of class unload events: expected 10 got 4 #10736
Conversation
…ber of class unload events: expected 10 got 4
|
The changes look good. Did you first make sure you could reproduce the problem without the fix, and then verify with the fix? |
Yes, I was able to reproduce the original issue without my fix. |
The agent will be racing against VM termination and will need to be resilient to potentially getting "wrong phase" errors, or similar. |
I'm not sure what you mean. |
@sspitsyn This change now passes all automated pre-integration checks. 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 55 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.
|
Before this fix events were not getting flushed so at VM exit the agent was idle with respect to those events and the test failed because events were missing. Now you are flushing those events are VM exit and so the agent will now be very active at VM exit, and racing against the rest of the termination sequence. |
Do you mean that before the flush operation returns all events are guaranteed to have been processed? |
Exactly. And it happens before the VMDeath event is posted. |
Ah sorry. I was thinking the events were flushed to a queue and the processed later. |
No problem. Sorry, it was not clear. |
Chris and Alex, thank you for review! |
/integrate |
Going to push as commit c5e0464.
Your commit was automatically rebased without conflicts. |
The JDI ClassUnloadEvent events are synthesized by the JDWP agent from the JVM TI ObjectFree events.
The JVM TI ObjectFree events are flushed when the JVM TI SetEvenNotificationMode is used to disable the ObjectFree events. It is not very helpful for JDWP agent as the ObjectFree events are always enabled.
The fix is to flush all pending ObjectFree events at the VM shutdown.
Testing:
All mach5 jobs with JVMTI/JDI tests and tiers 1-6 were successfully passed on 3 debug platforms.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10736/head:pull/10736
$ git checkout pull/10736
Update a local copy of the PR:
$ git checkout pull/10736
$ git pull https://git.openjdk.org/jdk pull/10736/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 10736
View PR using the GUI difftool:
$ git pr show -t 10736
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10736.diff