The following test failed in the JDK15 CI:
serviceability/sa/TestClhsdbJstackLock.java
Here's a snippet from the failing log:
"Thread-0" #13 prio=5 tid=0x00007fc65c5e2800 nid=0x706b waiting on condition [0x00007fc6209a3000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
JavaThread state: _thread_blocked
- java.lang.Thread.sleep(long) @bci=0 (Interpreted frame)
- LingeredAppWithLock.lockMethod(java.lang.Object) @bci=7, line=32 (Interpreted frame)
- locked <0x++++ Eliminated: 1479 Allocate
000000048f454230> ++++ Eliminated: 1321 Allocate
(a java.lang.Class for LingeredAppWithLock)
- LingeredAppWithLock.lambda$main$0() @bci=2, line=40 (Interpreted frame)
- LingeredAppWithLock$$Lambda$1.run() @bci=0 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=832 (Interpreted frame)
Locked ownable synchronizers:
- None
<snip>
]
exitValue = -1
LingeredApp stdout: [];
LingeredApp stderr: []
LingeredApp exitValue = 0
java.lang.RuntimeException: Test ERROR java.lang.RuntimeException: '^\\s+- locked <0x[0-9a-f]+> \\(a java\\.lang\\.Class for LingeredAppWithLock\\)$' missing from stdout/stderr
at TestClhsdbJstackLock.main(TestClhsdbJstackLock.java:67)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.RuntimeException: '^\\s+- locked <0x[0-9a-f]+> \\(a java\\.lang\\.Class for LingeredAppWithLock\\)$' missing from stdout/stderr
at jdk.test.lib.process.OutputAnalyzer.shouldMatch(OutputAnalyzer.java:306)
at ClhsdbLauncher.runCmd(ClhsdbLauncher.java:164)
at ClhsdbLauncher.run(ClhsdbLauncher.java:216)
at TestClhsdbJstackLock.main(TestClhsdbJstackLock.java:63)
... 6 more
JavaTest Message: Test threw exception: java.lang.RuntimeException: Test ERROR java.lang.RuntimeException: '^\\s+- locked <0x[0-9a-f]+> \\(a java\\.lang\\.Class for LingeredAppWithLock\\)$' missing from stdout/stderr
JavaTest Message: shutting down test
STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Test ERROR java.lang.RuntimeException: '^\\s+- locked <0x[0-9a-f]+> \\(a java\\.lang\\.Class for LingeredAppWithLock\\)$' missing from stdout/stderr
----------rerun:(32/5791)*----------
The search pattern is:
'^\\s+- locked <0x[0-9a-f]+> \\(a java\\.lang\\.Class for LingeredAppWithLock\\)$'
and the output line that should have matched is:
- locked <0x++++ Eliminated: 1479 Allocate
000000048f454230> ++++ Eliminated: 1321 Allocate
(a java.lang.Class for LingeredAppWithLock)
The "++++ Eliminated: 1479 Allocate" and "++++ Eliminated: 1321 Allocate"
were interleaved in the thread dump output and caused the
pattern match to fail.
Update: Bumping this from P4 -> P2 since this failure mode has now
appeared in a Tier1 CI job set.