Re: 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

2020-05-14 Thread David Holmes
+1 Thanks, David On 15/05/2020 6:18 am, serguei.spit...@oracle.com wrote: Hi Alex, LGTM. Thanks, Serguei On 5/14/20 11:04, Alex Menkov wrote: I agree with the point. updated webrev (only WAITING handling is added): http://cr.openjdk.java.net/~amenkov/jdk15/Locks_waiting/webrev.2/ --alex

Re: 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

2020-05-14 Thread serguei.spit...@oracle.com
Hi Alex, LGTM. Thanks, Serguei On 5/14/20 11:04, Alex Menkov wrote: I agree with the point. updated webrev (only WAITING handling is added): http://cr.openjdk.java.net/~amenkov/jdk15/Locks_waiting/webrev.2/ --alex On 05/13/2020 19:20, David Holmes wrote: Hi Alex, On 14/05/2020 10:55 am,

Re: 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

2020-05-14 Thread Alex Menkov
I agree with the point. updated webrev (only WAITING handling is added): http://cr.openjdk.java.net/~amenkov/jdk15/Locks_waiting/webrev.2/ --alex On 05/13/2020 19:20, David Holmes wrote: Hi Alex, On 14/05/2020 10:55 am, Alex Menkov wrote: Hi all, Please review the fix for

Re: 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

2020-05-13 Thread serguei.spit...@oracle.com
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

Re: 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

2020-05-13 Thread David Holmes
Hi Alex, On 14/05/2020 10:55 am, 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 That part is good. (and for consistency

Re: 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

2020-05-13 Thread Martin Buchholz
Looks good to me. On Wed, May 13, 2020 at 5:55 PM 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

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

2020-05-13 Thread Alex Menkov
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.