Chronicle-Map
Chronicle-Map copied to clipboard
ExitHookTest is flaky on Java 17
java.lang.AssertionError
at org.junit.Assert.fail(Assert.java:87)
at org.junit.Assert.assertTrue(Assert.java:42)
at org.junit.Assert.assertTrue(Assert.java:53)
at net.openhft.chronicle.map.ExitHookTest.testExitHook(ExitHookTest.java:138)
Still flaky on Java 17
now
java.lang.AssertionError
at org.junit.Assert.fail(Assert.java:87)
at org.junit.Assert.assertTrue(Assert.java:42)
at org.junit.Assert.assertTrue(Assert.java:53)
at net.openhft.chronicle.map.ExitHookTest.waitForShutdownConfirmation(ExitHookTest.java:196)
"main" #1 prio=5 os_prio=0 cpu=1773,11ms elapsed=2,01s tid=0x00007f0c58014fc0 nid=0x1780e8 runnable [0x00007f0c5cf82000]
java.lang.Thread.State: RUNNABLE
at net.openhft.chronicle.map.ChronicleMapBuilder.writeHeader(ChronicleMapBuilder.java:383)
at net.openhft.chronicle.map.ChronicleMapBuilder.lambda$createWithFile$2(ChronicleMapBuilder.java:1721)
at net.openhft.chronicle.map.ChronicleMapBuilder$$Lambda$74/0x0000000800c32f48.fileIOAction(Unknown Source)
at net.openhft.chronicle.hash.impl.util.CanonicalRandomAccessFiles.lambda$tryRunExclusively$6(CanonicalRandomAccessFiles.java:193)
at net.openhft.chronicle.hash.impl.util.CanonicalRandomAccessFiles$$Lambda$75/0x0000000800c33170.accept(Unknown Source)
at net.openhft.chronicle.hash.impl.util.CanonicalRandomAccessFiles.lambda$acquire0$1(CanonicalRandomAccessFiles.java:72)
at net.openhft.chronicle.hash.impl.util.CanonicalRandomAccessFiles$$Lambda$51/0x0000000800c277d8.apply(Unknown Source)
at java.util.concurrent.ConcurrentHashMap.compute([email protected]/ConcurrentHashMap.java:1940)
- locked <0x000000071046abf8> (a java.util.concurrent.ConcurrentHashMap$Node)
at net.openhft.chronicle.hash.impl.util.CanonicalRandomAccessFiles.acquire0(CanonicalRandomAccessFiles.java:62)
at net.openhft.chronicle.hash.impl.util.CanonicalRandomAccessFiles.tryRunExclusively(CanonicalRandomAccessFiles.java:181)
at net.openhft.chronicle.map.ChronicleMapBuilder.createWithFile(ChronicleMapBuilder.java:1717)
at net.openhft.chronicle.map.ChronicleMapBuilder.createPersistedTo(ChronicleMapBuilder.java:1586)
at net.openhft.chronicle.map.ExitHookTest.main(ExitHookTest.java:98)
Apparently, header is written as locked before the hook is installed. We should check for that.