You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "David Capwell (Jira)" <ji...@apache.org> on 2026/08/17 22:04:00 UTC

[jira] [Commented] (CASSANDRA-21412) Journal compaction did not get a reference to segments, segfault due to use-after-free

    [ https://issues.apache.org/jira/browse/CASSANDRA-21412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18105372#comment-18105372 ] 

David Capwell commented on CASSANDRA-21412:
-------------------------------------------

For validation the test that is hitting this is org.apache.cassandra.distributed.test.ShortReadProtectionTest.  I just confirmed it's still failing with a crash on trunk with the same core dump.  

[~aleksey] reviewed and didn't like the direction of the patch so need to redo it (compaction is single threaded, so this would happen during test shutdown as it calls close)

> Journal compaction did not get a reference to segments, segfault due to use-after-free
> --------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-21412
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-21412
>             Project: Apache Cassandra
>          Issue Type: Bug
>          Components: Accord
>            Reporter: David Capwell
>            Assignee: David Capwell
>            Priority: Normal
>             Fix For: 6.x, 6.0.x
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> {code}
> ---------------  T H R E A D  ---------------
> Current thread (0x00007fc875039660):  JavaThread "node1_AccordJournal-compactor:1" daemon [_thread_in_Java, id=1310, stack(0x00007fc861ce0000,0x00007fc861d40000)]
> Stack: [0x00007fc861ce0000,0x00007fc861d40000],  sp=0x00007fc861d3e370,  free space=376k
> Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
> J 8897 c2 java.nio.DirectByteBuffer.getInt(I)I java.base@11.0.31 (28 bytes) @ 0x00007fc8e4769176 [0x00007fc8e4769120+0x0000000000000056]
> J 62486 c1 org.apache.cassandra.service.accord.JournalKey$JournalKeySupport.deserialize(Ljava/nio/ByteBuffer;II)Lorg/apache/cassandra/service/accord/JournalKey; (43 bytes) @ 0x00007fc8e1274614 [0x00007fc8e1274580+0x0000000000000094]
> J 62485 c1 org.apache.cassandra.service.accord.JournalKey$JournalKeySupport.deserialize(Ljava/nio/ByteBuffer;II)Ljava/lang/Object; (8 bytes) @ 0x00007fc8dffe6334 [0x00007fc8dffe62c0+0x0000000000000074]
> J 62479 c1 org.apache.cassandra.journal.OnDiskIndex$IndexReader.advance()Z (68 bytes) @ 0x00007fc8e03119b4 [0x00007fc8e03118e0+0x00000000000000d4]
> J 62474 c1 org.apache.cassandra.journal.StaticSegment$KeyOrderReader.advance()Z (105 bytes) @ 0x00007fc8e0382444 [0x00007fc8e03823c0+0x0000000000000084]
> j  org.apache.cassandra.service.accord.journal.AbstractSegmentCompactor.compact(Ljava/util/Collection;)Ljava/util/Collection;+500
> j  org.apache.cassandra.journal.Compactor.run()V+86
> J 27450 c2 org.apache.cassandra.concurrent.ExecutionFailure$1.run()V (72 bytes) @ 0x00007fc8e44553bc [0x00007fc8e4455340+0x000000000000007c]
> J 7600 c2 java.util.concurrent.Executors$RunnableAdapter.call()Ljava/lang/Object; java.base@11.0.31 (14 bytes) @ 0x00007fc8e46ad1f8 [0x00007fc8e46ad1a0+0x0000000000000058]
> J 9771 c2 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run()V java.base@11.0.31 (57 bytes) @ 0x00007fc8e47befc0 [0x00007fc8e47bed40+0x0000000000000280]
> j  java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V+92 java.base@11.0.31
> j  java.util.concurrent.ThreadPoolExecutor$Worker.run()V+5 java.base@11.0.31
> j  io.netty.util.concurrent.FastThreadLocalRunnable.run()V+4
> j  java.lang.Thread.run()V+11 java.base@11.0.31
> v  ~StubRoutines::call_stub
> V  [libjvm.so+0x8e8c9b]  JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x39b
> V  [libjvm.so+0x8e6c5d]  JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, Thread*)+0x1ed
> V  [libjvm.so+0x9959cc]  thread_entry(JavaThread*, Thread*)+0x6c
> V  [libjvm.so+0xef225f]  JavaThread::run()+0x29f
> V  [libjvm.so+0xeee9df]  Thread::call_run()+0x14f
> V  [libjvm.so+0xc87b36]  thread_native_entry(Thread*)+0xe6
> siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x00007fc7b2fb7319
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org