-
Bug
-
Resolution: Unresolved
-
P4
-
23
-
x86_64
-
windows
test is "stuck" in a CountDownLatch.await
private static List<RecordedEvent> recordWithPolicy(String filename, Consumer<RemoteRecordingStream> policy) throws Exception {
CountDownLatch latch1 = new CountDownLatch(1);
CountDownLatch latch2 = new CountDownLatch(2);
CountDownLatch latch3 = new CountDownLatch(3);
try (var rs = new RemoteRecordingStream(CONNECTION)) {
policy.accept(rs);
rs.onEvent(e -> {
latch1.countDown();
latch2.countDown();
latch3.countDown();
});
rs.startAsync();
DumpEvent e1 = new DumpEvent();
e1.commit();
latch1.await();
// Force chunk rotation
try (Recording r = new Recording()) {
r.start();
DumpEvent e2 = new DumpEvent();
e2.commit();
}
latch2.await(); <-------------------------- waiting for something to happen
DumpEvent e3 = new DumpEvent();
e3.commit();
latch3.await();
Path p = Path.of(filename);
rs.dump(p);
return RecordingFile.readAllEvents(p);
}
}
"MainThread" #35 [31896] prio=5 os_prio=0 cpu=1750.00ms elapsed=503.95s allocated=25547K defined_classes=1261 tid=0x00000155d9110c20 nid=31896 waiting on condition [0x000000074b8fe000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@23-ea/Native Method)
- parking to wait for <0x00000000d0f00cb8> (a java.util.concurrent.CountDownLatch$Sync)
at java.util.concurrent.locks.LockSupport.park(java.base@23-ea/LockSupport.java:221)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(java.base@23-ea/AbstractQueuedSynchronizer.java:754)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(java.base@23-ea/AbstractQueuedSynchronizer.java:1099)
at java.util.concurrent.CountDownLatch.await(java.base@23-ea/CountDownLatch.java:230)
at jdk.jfr.jmx.streaming.TestRemoteDump.recordWithPolicy(TestRemoteDump.java:121)
at jdk.jfr.jmx.streaming.TestRemoteDump.testSetNoPolicy(TestRemoteDump.java:154)
at jdk.jfr.jmx.streaming.TestRemoteDump.main(TestRemoteDump.java:69)
at java.lang.invoke.LambdaForm$DMH/0x0000015595002400.invokeStatic(java.base@23-ea/LambdaForm$DMH)
at java.lang.invoke.LambdaForm$MH/0x000001559500cc00.invoke(java.base@23-ea/LambdaForm$MH)
at java.lang.invoke.Invokers$Holder.invokeExact_MT(java.base@23-ea/Invokers$Holder)
at jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(java.base@23-ea/DirectMethodHandleAccessor.java:154)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(java.base@23-ea/DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke(java.base@23-ea/Method.java:580)
at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
at java.lang.Thread.runWith(java.base@23-ea/Thread.java:1588)
at java.lang.Thread.run(java.base@23-ea/Thread.java:1575)
private static List<RecordedEvent> recordWithPolicy(String filename, Consumer<RemoteRecordingStream> policy) throws Exception {
CountDownLatch latch1 = new CountDownLatch(1);
CountDownLatch latch2 = new CountDownLatch(2);
CountDownLatch latch3 = new CountDownLatch(3);
try (var rs = new RemoteRecordingStream(CONNECTION)) {
policy.accept(rs);
rs.onEvent(e -> {
latch1.countDown();
latch2.countDown();
latch3.countDown();
});
rs.startAsync();
DumpEvent e1 = new DumpEvent();
e1.commit();
latch1.await();
// Force chunk rotation
try (Recording r = new Recording()) {
r.start();
DumpEvent e2 = new DumpEvent();
e2.commit();
}
latch2.await(); <-------------------------- waiting for something to happen
DumpEvent e3 = new DumpEvent();
e3.commit();
latch3.await();
Path p = Path.of(filename);
rs.dump(p);
return RecordingFile.readAllEvents(p);
}
}
"MainThread" #35 [31896] prio=5 os_prio=0 cpu=1750.00ms elapsed=503.95s allocated=25547K defined_classes=1261 tid=0x00000155d9110c20 nid=31896 waiting on condition [0x000000074b8fe000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@23-ea/Native Method)
- parking to wait for <0x00000000d0f00cb8> (a java.util.concurrent.CountDownLatch$Sync)
at java.util.concurrent.locks.LockSupport.park(java.base@23-ea/LockSupport.java:221)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(java.base@23-ea/AbstractQueuedSynchronizer.java:754)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(java.base@23-ea/AbstractQueuedSynchronizer.java:1099)
at java.util.concurrent.CountDownLatch.await(java.base@23-ea/CountDownLatch.java:230)
at jdk.jfr.jmx.streaming.TestRemoteDump.recordWithPolicy(TestRemoteDump.java:121)
at jdk.jfr.jmx.streaming.TestRemoteDump.testSetNoPolicy(TestRemoteDump.java:154)
at jdk.jfr.jmx.streaming.TestRemoteDump.main(TestRemoteDump.java:69)
at java.lang.invoke.LambdaForm$DMH/0x0000015595002400.invokeStatic(java.base@23-ea/LambdaForm$DMH)
at java.lang.invoke.LambdaForm$MH/0x000001559500cc00.invoke(java.base@23-ea/LambdaForm$MH)
at java.lang.invoke.Invokers$Holder.invokeExact_MT(java.base@23-ea/Invokers$Holder)
at jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(java.base@23-ea/DirectMethodHandleAccessor.java:154)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(java.base@23-ea/DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke(java.base@23-ea/Method.java:580)
at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
at java.lang.Thread.runWith(java.base@23-ea/Thread.java:1588)
at java.lang.Thread.run(java.base@23-ea/Thread.java:1575)
- relates to
-
JDK-8345051 Test TestStackFilter.java intermittent timeout
- Open
-
JDK-8345493 JFR: JVM.flush hangs intermittently
- In Progress