-
Bug
-
Resolution: Fixed
-
P3
-
23
The following test failed in the JDK23 CI:
vmTestbase/nsk/monitoring/stress/thread/strace004/TestDescription.java
The set of expected stack frames is missing the event superclass constructor:
// Fill expectedTrace array according to the invocation type that is set in
// test options
private static boolean fillTrace() {
expectedSystemTrace = new String[]{
"java.lang.Thread.sleep",
"java.lang.Thread.sleepNanos",
"java.lang.Thread.sleepNanos0",
"java.lang.Thread.beforeSleep",
"java.lang.Thread.afterSleep",
"java.lang.Thread.yield",
"java.lang.Thread.yield0",
"java.lang.Thread.currentCarrierThread",
"java.lang.Thread.currentThread",
"java.util.concurrent.TimeUnit.toNanos",
"jdk.internal.event.ThreadSleepEvent.<clinit>",
"jdk.internal.event.ThreadSleepEvent.<init>",
"jdk.internal.event.ThreadSleepEvent.isTurnedOn",
"jdk.internal.event.ThreadSleepEvent.isEnabled"
The following stacktrace is for failure analysis.
nsk.share.TestFailure: Unexpected 0 element of the stack trace: jdk.internal.event.Event.<init>
Snapshot of thread: 0
0: jdk.internal.event.Event.<init>(Event.java:39)
1: jdk.internal.event.ThreadSleepEvent.<init>(ThreadSleepEvent.java:32)
2: jdk.internal.event.ThreadSleepEvent.<clinit>(ThreadSleepEvent.java:33)
3: java.lang.Thread.beforeSleep(Thread.java:461)
4: java.lang.Thread.sleepNanos(Thread.java:491)
5: java.lang.Thread.sleep(Thread.java:527)
We need to add all superlcass constructors to the list - up to Object.<init>"
Here's a snippet from the log file:
#section:main
----------messages:(6/395)----------
command: main nsk.monitoring.stress.thread.strace001 -invocationType=native -threadCount=50 -depth=200
reason: User specified action: run main/othervm/native nsk.monitoring.stress.thread.strace001 -invocationType=native -threadCount=50 -depth=200
started: Sun Apr 14 22:21:27 UTC 2024
Mode: othervm [/othervm specified]
finished: Sun Apr 14 22:21:36 UTC 2024
elapsed time (seconds): 9.14
----------configuration:(0/0)----------
----------System.out:(465/23165)----------
#>
#> WARNING: switching log to verbose mode,
#> because error is complained
#>
ThreadMonitor> Test mode: DIRECTLY access to MBean
ThreadController> number of created threads: 50
ThreadController> depth for all threads: 200
ThreadController> invocation type: native
Iteration: 0
All threads started: 50
# ERROR: Length of the stack trace is 208, but expected to be not greater than 207
The following stacktrace is for failure analysis.
nsk.share.TestFailure: Length of the stack trace is 208, but expected to be not greater than 207
at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:431)
at nsk.share.Log.complain(Log.java:402)
at nsk.monitoring.stress.thread.strace001.checkTrace(strace001.java:219)
at nsk.monitoring.stress.thread.strace001.run(strace001.java:106)
at nsk.monitoring.stress.thread.strace001.main(strace001.java:51)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
at java.base/java.lang.Thread.run(Thread.java:1575)
# ERROR: Unexpected 0 element of the stack trace:
# ERROR: jdk.internal.event.Event.<init>
The following stacktrace is for failure analysis.
nsk.share.TestFailure: Unexpected 0 element of the stack trace: jdk.internal.event.Event.<init>
at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:431)
at nsk.share.Log.complain(Log.java:402)
at nsk.monitoring.stress.thread.strace001.checkElement(strace001.java:259)
at nsk.monitoring.stress.thread.strace001.checkTrace(strace001.java:235)
at nsk.monitoring.stress.thread.strace001.run(strace001.java:106)
at nsk.monitoring.stress.thread.strace001.main(strace001.java:51)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
at java.base/java.lang.Thread.run(Thread.java:1575)
Snapshot of thread: 0
0: jdk.internal.event.Event.<init>(Event.java:39)
1: jdk.internal.event.ThreadSleepEvent.<init>(ThreadSleepEvent.java:32)
2: jdk.internal.event.ThreadSleepEvent.<clinit>(ThreadSleepEvent.java:33)
3: java.lang.Thread.beforeSleep(Thread.java:461)
4: java.lang.Thread.sleepNanos(Thread.java:491)
5: java.lang.Thread.sleep(Thread.java:527)
6: nsk.monitoring.stress.thread.RunningThread.waitForSign(strace001.java:412)
7: nsk.monitoring.stress.thread.RunningThread.recursionNative(Native Method)
8: nsk.monitoring.stress.thread.RunningThread.recursionNative(Native Method)
9: nsk.monitoring.stress.thread.RunningThread.recursionNative(Native Method)
<snip>
205: nsk.monitoring.stress.thread.RunningThread.recursionNative(Native Method)
206: nsk.monitoring.stress.thread.RunningThread.recursionNative(Native Method)
207: nsk.monitoring.stress.thread.RunningThread.run(strace001.java:329)
All threads have died.
Iteration: 1
All threads started: 50
All threads have died.
Iteration: 2
All threads started: 50
All threads have died.
Iteration: 3
All threads started: 50
All threads have died.
<snip>
Iteration: 47
All threads started: 50
All threads have died.
Iteration: 48
All threads started: 50
All threads have died.
Iteration: 49
All threads started: 50
All threads have died.
# ERROR: TEST FAILED.
The following stacktrace is for failure analysis.
nsk.share.TestFailure: TEST FAILED.
at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:431)
at nsk.share.Log.complain(Log.java:402)
at nsk.monitoring.stress.thread.strace001.run(strace001.java:133)
at nsk.monitoring.stress.thread.strace001.main(strace001.java:51)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
at java.base/java.lang.Thread.run(Thread.java:1575)
#>
#> SUMMARY: Following errors occured
#> during test execution:
#>
# ERROR: Length of the stack trace is 208, but expected to be not greater than 207
# ERROR: Unexpected 0 element of the stack trace:
# ERROR: jdk.internal.event.Event.<init>
# ERROR: TEST FAILED.
----------System.err:(0/0)----------
----------rerun:(38/6948)*----------
vmTestbase/nsk/monitoring/stress/thread/strace004/TestDescription.java
The set of expected stack frames is missing the event superclass constructor:
// Fill expectedTrace array according to the invocation type that is set in
// test options
private static boolean fillTrace() {
expectedSystemTrace = new String[]{
"java.lang.Thread.sleep",
"java.lang.Thread.sleepNanos",
"java.lang.Thread.sleepNanos0",
"java.lang.Thread.beforeSleep",
"java.lang.Thread.afterSleep",
"java.lang.Thread.yield",
"java.lang.Thread.yield0",
"java.lang.Thread.currentCarrierThread",
"java.lang.Thread.currentThread",
"java.util.concurrent.TimeUnit.toNanos",
"jdk.internal.event.ThreadSleepEvent.<clinit>",
"jdk.internal.event.ThreadSleepEvent.<init>",
"jdk.internal.event.ThreadSleepEvent.isTurnedOn",
"jdk.internal.event.ThreadSleepEvent.isEnabled"
The following stacktrace is for failure analysis.
nsk.share.TestFailure: Unexpected 0 element of the stack trace: jdk.internal.event.Event.<init>
Snapshot of thread: 0
0: jdk.internal.event.Event.<init>(Event.java:39)
1: jdk.internal.event.ThreadSleepEvent.<init>(ThreadSleepEvent.java:32)
2: jdk.internal.event.ThreadSleepEvent.<clinit>(ThreadSleepEvent.java:33)
3: java.lang.Thread.beforeSleep(Thread.java:461)
4: java.lang.Thread.sleepNanos(Thread.java:491)
5: java.lang.Thread.sleep(Thread.java:527)
We need to add all superlcass constructors to the list - up to Object.<init>"
Here's a snippet from the log file:
#section:main
----------messages:(6/395)----------
command: main nsk.monitoring.stress.thread.strace001 -invocationType=native -threadCount=50 -depth=200
reason: User specified action: run main/othervm/native nsk.monitoring.stress.thread.strace001 -invocationType=native -threadCount=50 -depth=200
started: Sun Apr 14 22:21:27 UTC 2024
Mode: othervm [/othervm specified]
finished: Sun Apr 14 22:21:36 UTC 2024
elapsed time (seconds): 9.14
----------configuration:(0/0)----------
----------System.out:(465/23165)----------
#>
#> WARNING: switching log to verbose mode,
#> because error is complained
#>
ThreadMonitor> Test mode: DIRECTLY access to MBean
ThreadController> number of created threads: 50
ThreadController> depth for all threads: 200
ThreadController> invocation type: native
Iteration: 0
All threads started: 50
# ERROR: Length of the stack trace is 208, but expected to be not greater than 207
The following stacktrace is for failure analysis.
nsk.share.TestFailure: Length of the stack trace is 208, but expected to be not greater than 207
at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:431)
at nsk.share.Log.complain(Log.java:402)
at nsk.monitoring.stress.thread.strace001.checkTrace(strace001.java:219)
at nsk.monitoring.stress.thread.strace001.run(strace001.java:106)
at nsk.monitoring.stress.thread.strace001.main(strace001.java:51)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
at java.base/java.lang.Thread.run(Thread.java:1575)
# ERROR: Unexpected 0 element of the stack trace:
# ERROR: jdk.internal.event.Event.<init>
The following stacktrace is for failure analysis.
nsk.share.TestFailure: Unexpected 0 element of the stack trace: jdk.internal.event.Event.<init>
at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:431)
at nsk.share.Log.complain(Log.java:402)
at nsk.monitoring.stress.thread.strace001.checkElement(strace001.java:259)
at nsk.monitoring.stress.thread.strace001.checkTrace(strace001.java:235)
at nsk.monitoring.stress.thread.strace001.run(strace001.java:106)
at nsk.monitoring.stress.thread.strace001.main(strace001.java:51)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
at java.base/java.lang.Thread.run(Thread.java:1575)
Snapshot of thread: 0
0: jdk.internal.event.Event.<init>(Event.java:39)
1: jdk.internal.event.ThreadSleepEvent.<init>(ThreadSleepEvent.java:32)
2: jdk.internal.event.ThreadSleepEvent.<clinit>(ThreadSleepEvent.java:33)
3: java.lang.Thread.beforeSleep(Thread.java:461)
4: java.lang.Thread.sleepNanos(Thread.java:491)
5: java.lang.Thread.sleep(Thread.java:527)
6: nsk.monitoring.stress.thread.RunningThread.waitForSign(strace001.java:412)
7: nsk.monitoring.stress.thread.RunningThread.recursionNative(Native Method)
8: nsk.monitoring.stress.thread.RunningThread.recursionNative(Native Method)
9: nsk.monitoring.stress.thread.RunningThread.recursionNative(Native Method)
<snip>
205: nsk.monitoring.stress.thread.RunningThread.recursionNative(Native Method)
206: nsk.monitoring.stress.thread.RunningThread.recursionNative(Native Method)
207: nsk.monitoring.stress.thread.RunningThread.run(strace001.java:329)
All threads have died.
Iteration: 1
All threads started: 50
All threads have died.
Iteration: 2
All threads started: 50
All threads have died.
Iteration: 3
All threads started: 50
All threads have died.
<snip>
Iteration: 47
All threads started: 50
All threads have died.
Iteration: 48
All threads started: 50
All threads have died.
Iteration: 49
All threads started: 50
All threads have died.
# ERROR: TEST FAILED.
The following stacktrace is for failure analysis.
nsk.share.TestFailure: TEST FAILED.
at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:431)
at nsk.share.Log.complain(Log.java:402)
at nsk.monitoring.stress.thread.strace001.run(strace001.java:133)
at nsk.monitoring.stress.thread.strace001.main(strace001.java:51)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
at java.base/java.lang.Thread.run(Thread.java:1575)
#>
#> SUMMARY: Following errors occured
#> during test execution:
#>
# ERROR: Length of the stack trace is 208, but expected to be not greater than 207
# ERROR: Unexpected 0 element of the stack trace:
# ERROR: jdk.internal.event.Event.<init>
# ERROR: TEST FAILED.
----------System.err:(0/0)----------
----------rerun:(38/6948)*----------
- duplicates
-
JDK-8340072 Test vmTestbase/nsk/monitoring/stress/thread/strace009/TestDescription.java fails after JDK-8299419
- Closed
- relates to
-
JDK-8340088 Stack tracing tests of sleeping thread should be more resilient to code changes
- Open
- links to
-
Commit(master) openjdk/jdk/bd44cf8a
-
Review(master) openjdk/jdk/20980