-
Bug
-
Resolution: Fixed
-
P4
-
6u12, 7, 7u6
-
b01
-
generic, arm
-
generic, linux, solaris
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8018637 | 7u45 | Chris Hegarty | P4 | Closed | Fixed | b01 |
JDK-8009309 | 7u40 | Chris Hegarty | P4 | Closed | Fixed | b16 |
java/lang/Thread/ThreadStateTest.java can fail with when checkThreadState finds an unexpected state.
Exception in thread "main" java.lang.RuntimeException: MyThread expected to have TERMINATED but got RUNNABLE
at ThreadStateTest.checkThreadState(ThreadStateTest.java:119)
at ThreadStateTest.main(ThreadStateTest.java:96)
There are races between the thread being put in a specific state and the thread testing for that state. The failure is not see that often, but is easily reproducible with -Xcomp, as this changes the timing of the execution of the test, see CR 6725455.
The test should be updated in a similar fashion to java/lang/management/ThreadMXBean/ThreadStateTest.java, see CR 5080203. That is, retry the thread state check a number of times before failing.
Exception in thread "main" java.lang.RuntimeException: MyThread expected to have TERMINATED but got RUNNABLE
at ThreadStateTest.checkThreadState(ThreadStateTest.java:119)
at ThreadStateTest.main(ThreadStateTest.java:96)
There are races between the thread being put in a specific state and the thread testing for that state. The failure is not see that often, but is easily reproducible with -Xcomp, as this changes the timing of the execution of the test, see CR 6725455.
The test should be updated in a similar fashion to java/lang/management/ThreadMXBean/ThreadStateTest.java, see CR 5080203. That is, retry the thread state check a number of times before failing.
- backported by
-
JDK-8009309 (thread) TEST_BUG java/lang/Thread/ThreadStateTest.java fails intermittently
- Closed
-
JDK-8018637 (thread) TEST_BUG java/lang/Thread/ThreadStateTest.java fails intermittently
- Closed
- duplicates
-
JDK-6725455 (thread) TEST_BUG java/lang/Thread/StopBeforeStart,ThreadStateTest.java fail with -Xcomp
- Closed
-
JDK-7049111 java/lang/Thread/ThreadStateTest.java with JDK7 b143
- Closed
- relates to
-
JDK-6944188 ThreadMXBean/ThreadStateTest.java fails intermittently
- Resolved
-
JDK-5080203 TEST_BUG: ThreadStateTest fails intermittently.
- Resolved
(1 relates to)