JDK-8078143 : java/lang/management/ThreadMXBean/AllThreadIds.java fails intermittently
  • Type: Bug
  • Component: core-svc
  • Sub-Component: javax.management
  • Affected Version: 8u60,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-04-20
  • Updated: 2023-09-25
  • Resolved: 2015-05-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u401Fixed 9 b67Fixed
Related Reports
Relates :  
Description
java/lang/management/ThreadMXBean/AllThreadIds.java fails intermittently. (This test ever had fixed race condition issue in JDK-6712222 in b56)

----------System.out:(30/1177)----------
1: Thread id = 23
2: Thread id = 4
3: Thread id = 3
4: Thread id = 2
5: Thread id = 1
Thread-1 Id = 24 die = false alive = false
Thread-2 Id = 25 die = false alive = false
Thread-3 Id = 26 die = false alive = false
Thread-4 Id = 27 die = false alive = false
Thread-5 Id = 28 die = false alive = false
Thread-6 Id = 29 die = false alive = false
Thread-7 Id = 30 die = false alive = false
Thread-8 Id = 31 die = false alive = false
Thread-9 Id = 32 die = false alive = false
Thread-10 Id = 33 die = false alive = false
Thread-11 Id = 34 die = false alive = false
Thread-12 Id = 35 die = false alive = false
Thread-13 Id = 36 die = false alive = false
Thread-14 Id = 37 die = false alive = false
Thread-15 Id = 38 die = false alive = false
Thread-16 Id = 39 die = false alive = false
Thread-17 Id = 40 die = false alive = false
Thread-18 Id = 41 die = false alive = false
Thread-19 Id = 42 die = false alive = false
Thread-20 Id = 43 die = false alive = false
Thread-21 Id = 44 die = false alive = false
Thread-22 Id = 45 die = false alive = false
Thread-23 Id = 46 die = false alive = false
Thread-24 Id = 47 die = false alive = false
Thread-25 Id = 48 die = false alive = false
----------System.err:(15/1086)----------
java.lang.RuntimeException: Unexpected number of live threads:  Prev live = 10 Current live = 6 Threads added = 0 Threads terminated = 5
	at AllThreadIds.fail(AllThreadIds.java:73)
	at AllThreadIds.checkThreadCount(AllThreadIds.java:88)
	at AllThreadIds.main(AllThreadIds.java:220)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:502)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:92)
	at java.lang.Thread.run(Thread.java:745)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Unexpected number of live threads:  Prev live = 10 Current live = 6 Threads added = 0 Threads terminated = 5
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Unexpected number of live threads: Prev live = 10 Current live = 6 Threads added = 0 Threads terminated = 5
Comments
Will this fix be backported to 8u?
24-03-2017

URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/bde770475dbb User: lana Date: 2015-06-03 20:22:43 +0000
04-06-2015

URL: http://hg.openjdk.java.net/jdk9/hs-rt/jdk/rev/bde770475dbb User: jbachorik Date: 2015-05-19 22:13:55 +0000
19-05-2015

RULE java/lang/management/ThreadMXBean/AllThreadIds.java Exception java.lang.RuntimeException: Unexpected number of live threads: Prev live = ... Current live = ... Threads added = ... Threads terminated = ... RULE java/lang/management/ThreadMXBean/AllThreadIds.java Exception java.lang.RuntimeException: Unexpected number of live threads: Prev live = ... Current live = ... Threads added = ... Threads terminated = ...
28-04-2015