RFR: 8243455: Many SA tests can fail due to trying to get the stack trace of an active method [v2]
Chris Plummer
cjplummer at openjdk.java.net
Wed Mar 10 01:56:07 UTC 2021
On Wed, 10 Mar 2021 01:04:31 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
>> Chris Plummer has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use onSpinWait() instead of sleep(), and check for BLOCKED thread state.
>
> Marked as reviewed by sspitsyn (Reviewer).
@sspitsyn
> It is better to rename `startSteadStateThread` to `startSteadyStateThread`, otherwise it seems to be a typo.
I'll fix that.
> It is better to remove the second sleep as it is not really needed.
You were looking at the first version. It was updated last night.
> Another concern is that the stack trace of this thread is going to be trivial, not sure if it is useful.
> But it can be okay though if it serves trivial purposes. :)
> It feels like something better is needed in general.
It's no less trivial than the main thread that tests used to look for, except that previously once in a great while the thread woke up from sleep (and that usually resulted in a test failure because the stack trace could not be produced). However, I also have a PR [2720](https://github.com/openjdk/jdk/pull/2720) to add a stack trace stress test.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2700
More information about the serviceability-dev
mailing list