-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
15
Seen three times in tier7 CI.
java.lang.NullPointerException
at MaxDepthForThreadInfoTest.main(MaxDepthForThreadInfoTest.java:59)
Seems like a test bug:
long[] threadIds = tmxb.getAllThreadIds();
...
tinfos = tmxb.getThreadInfo(threadIds, true, true, 3);
for (ThreadInfo ti : tinfos) {
if (ti.getStackTrace().length > 3) { <= NPE here
There is no guarantee that all threads found by getAllThreadIds() are still alive by the time we call getThreadInfo() so we have to allow for null array entries.
This fails in tier7 with graal, so I expect there are threads present that are not normally seen.
java.lang.NullPointerException
at MaxDepthForThreadInfoTest.main(MaxDepthForThreadInfoTest.java:59)
Seems like a test bug:
long[] threadIds = tmxb.getAllThreadIds();
...
tinfos = tmxb.getThreadInfo(threadIds, true, true, 3);
for (ThreadInfo ti : tinfos) {
if (ti.getStackTrace().length > 3) { <= NPE here
There is no guarantee that all threads found by getAllThreadIds() are still alive by the time we call getThreadInfo() so we have to allow for null array entries.
This fails in tier7 with graal, so I expect there are threads present that are not normally seen.
- duplicates
-
JDK-8231585 java/lang/management/ThreadMXBean/MaxDepthForThreadInfoTest.java fails with java.lang.NullPointerException
-
- Resolved
-