RFR: 8295099: vmTestbase/nsk/stress/strace/strace013.java failed with "TestFailure: wrong lengths of stack traces: strace013Thread0: NNN strace013Thread83: MMM"
Thomas Stuefe
stuefe at openjdk.org
Mon Nov 7 07:07:35 UTC 2022
On Mon, 7 Nov 2022 05:37:50 GMT, David Holmes <dholmes at openjdk.org> wrote:
> The test is incorrectly synchronized and may take the stack trace of a thread before it has entered the wait() and thus be three frames short of the correct stack. So I cleaned that up to ensure things are correctly synchronized.
>
> A number of comments in the test description etc were wrong so I also fixed those.
>
> These tests are stylistically awful but I refrained from embarking on a major cleanup and adopted the prevailing styles.
>
> Testing: local plus 50x on each platform (in progress)
>
> Thanks.
This looks fine.
About that check at Line 171ff, where the test first compares stack lengths, I wonder whether the "k>2" was wiggle room for the problem you now solve? Could not explain it otherwise. If yes, you could probable require the length to be just equal now.
A CountDownLatch may make the coding a bit clearer maybe.
-------------
Marked as reviewed by stuefe (Reviewer).
PR: https://git.openjdk.org/jdk/pull/11011
More information about the hotspot-runtime-dev
mailing list