OpenHFT/Chronicle-Queue

NullPointerException in StoreAppender

nicktindall opened this issue · 5 comments

Failed test https://teamcity.chronicle.software/buildConfiguration/Chronicle_ChronicleQueueEnterprise_SnapshotJava11/941796?expandBuildDeploymentsSection=false&hideTestsFromDependencies=false&expandBuildTestsSection=true&hideProblemsFromDependencies=false&expandBuildProblemsSection=true&expandBuildChangesSection=true

This has failed in the same way numerous times. The wire field is marked as @Nullable but no null check is performed.

target/testAppendedSkipToEndMultiThreaded_7__DELTA_BINARY_wbm_None_rbm_None_named_false_encrypted_null_-1111-gufget2o2p
      Exception in thread "Thread-40" java.lang.NullPointerException
        at net.openhft.chronicle.queue.impl.single.StoreAppender$StoreAppenderContext.index(StoreAppender.java:1147)
        at net.openhft.chronicle.queue.impl.single.DeltaWireAppender.writingDocument(DeltaWireAppender.java:33)
        at net.openhft.chronicle.queue.impl.single.StoreAppender.writingDocument(StoreAppender.java:417)
        at net.openhft.chronicle.queue.impl.single.DeltaWireAppender.writingDocument(DeltaWireAppender.java:14)
        at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueTest.writeTestDocument(SingleChronicleQueueTest.java:2596)
        at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueTest.lambda$testAppendedSkipToEndMultiThreaded$90(SingleChronicleQueueTest.java:2376)
        at java.base/java.lang.Thread.run(Thread.java:829)
      Exception in thread "Thread-37" net.openhft.chronicle.core.io.ClosedIllegalStateException: Closed
        at net.openhft.chronicle.core.io.ManagedCloseable.throwExceptionIfClosed(ManagedCloseable.java:68)
        at net.openhft.chronicle.queue.impl.WireStorePool.acquire(WireStorePool.java:50)
        at net.openhft.chronicle.queue.impl.single.StoreAppender.setCycle2(StoreAppender.java:331)
        at net.openhft.chronicle.queue.impl.single.StoreAppender.setWireIfNull(StoreAppender.java:536)
        at net.openhft.chronicle.queue.impl.single.StoreAppender.prepareAndReturnWriteContext(StoreAppender.java:450)
        at net.openhft.chronicle.queue.impl.single.StoreAppender.writingDocument(StoreAppender.java:429)
        at net.openhft.chronicle.queue.impl.single.DeltaWireAppender.writingDocument(DeltaWireAppender.java:32)
        at net.openhft.chronicle.queue.impl.single.StoreAppender.writingDocument(StoreAppender.java:417)
        at net.openhft.chronicle.queue.impl.single.DeltaWireAppender.writingDocument(DeltaWireAppender.java:14)
        at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueTest.writeTestDocument(SingleChronicleQueueTest.java:2596)
        at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueTest.lambda$testAppendedSkipToEndMultiThreaded$90(SingleChronicleQueueTest.java:2376)
        at java.base/java.lang.Thread.run(Thread.java:829)

@tgd Is there any evidence that original issue still exists? I could not find any failed testAppendedSkipToEndMultiThreaded for the last month. Locally it also passes.

tgd commented

Hi @yevgenp - it is possible that the flaky history has been cleaned from TC as part of the scheduled or manual cleanup. Can you try "run until failure" in IDEA to see if you can trigger it?

I ran it locally for 10 minutes - no failures.

tgd commented

Thanks Yevgen - I also can't get it to fail on Linux - let's close it

tgd commented

Before closing, please can you check the callsite where the NPE occurs to see if there is any obvious reason why it may fail