RFR: JDK-8229829: java/lang/management/ThreadMXBean/Locks.java fails with java.lang.RuntimeException: Thread WaitingThread is at WAITING state but is expected to be in Thread.State = WAITING
serguei.spitsyn at oracle.com
serguei.spitsyn at oracle.com
Thu May 14 03:46:25 UTC 2020
Hi Alex,
It looks good in general.
But I agree with David, the TIMED_WAITING thread state can be escaped by
timeout.
More sophisticated logic is require to track it precisely.
I'd suggest to get rid of the TIMED_WAITING in this condition as it is
never passed to the assertThreadState() as an expectedState parameter .
Hopefully, I do not miss anything here.
Thanks,
Serguei
On 5/13/20 17:55, Alex Menkov wrote:
> Hi all,
>
> Please review the fix for
> https://bugs.openjdk.java.net/browse/JDK-8229829
> webrev:
> http://cr.openjdk.java.net/~amenkov/jdk15/Locks_waiting/webrev/
>
> The fix adds handling for WAITING (and for consistency TIMED_WAITING
> which is not used in the test) states as it has for BLOCKED state.
>
> --alex
More information about the serviceability-dev
mailing list