RFR: 8328665: serviceability/jvmti/vthread/PopFrameTest failed with a timeout
Leonid Mesnik
lmesnik at openjdk.org
Thu Mar 21 15:13:22 UTC 2024
On Thu, 21 Mar 2024 07:11:33 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
> This PR fixes a synchronization issue in the test:
> `test/hotspot/jtreg/serviceability/jvmti/vthread/PopFrameTest`
>
> The method `notifyAtBreakpoint()` can notify the `TestTask` thread when it has not reached an expected breakpoint yet.
> The fix is to add a call to the method `ensureAtBreakpoint()` one more time in the `B2` sub-test. It is needed after the top-most frame was popped with the JVMTI `PopFrame`, and the target thread needs to reach the breakpoint again after its execution was resumed.
>
> The time is very intermittent. At least, I was not able to reproduce the timeout failure in thousands of mach5 runs with the `-Xcomp` option.
>
> Testing:
> - Run the test `test/hotspot/jtreg/serviceability/jvmti/vthread/PopFrameTest` thousands times in mach5
Changes requested by lmesnik (Reviewer).
test/hotspot/jtreg/serviceability/jvmti/vthread/PopFrameTest/PopFrameTest.java line 148:
> 146: log("Main #B.2: got expected JVMTI_ERROR_NONE");
> 147: resumeThread(testTaskThread);
> 148: ensureAtBreakpoint();
Not sure if it should work.
Thevariable `bp_sync_reached` is reset in notifyAtBreakpoint().
I see the previous call to ensureAtBreakpoint(); in line 131. So it means that
bp_sync_reached is true in this line and never rest after it between 131 and 148.
So I expect that this check in 148 is just return always without waiting anything. So it is not clear for me what is expected here.
-------------
PR Review: https://git.openjdk.org/jdk/pull/18419#pullrequestreview-1952525795
PR Review Comment: https://git.openjdk.org/jdk/pull/18419#discussion_r1534110512
More information about the serviceability-dev
mailing list