RFR: 8357184: Test vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent008/TestDescription.java fails with unreported exception [v2]

Serguei Spitsyn sspitsyn at openjdk.org
Fri May 30 10:12:51 UTC 2025


On Fri, 30 May 2025 03:15:40 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> Based on the log output, the test failure seems to be the result of two threads trying to set and access variables that are not volatile, so I've made them volatile. Since I can't reproduce the failure, I can't confirm that it is now fixed, but the lack of volatile is clearly a bug so should be done anyway. Tested by running the test locally to make sure nothing breaks.
>
> Chris Plummer has updated the pull request incrementally with one additional commit since the last revision:
> 
>   cleaned up event counters

The fix looks good. Also, I have no objections against adding a comment.
The event listener thread sets the flags and the main thread checks them.
Making flags volatile should be enough.
Clearing the flags in the main thread was also a bug before the fix.

-------------

Marked as reviewed by sspitsyn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25236#pullrequestreview-2880848984


More information about the serviceability-dev mailing list