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

Dmitry Konstantinov commented on CASSANDRA-21390:
-------------------------------------------------

it could be a bit more tricky for 6.0/trunk because I optimised tracking of 
allocation there under contention, so getting of actual _owns_ value on every 
allocation is not so cheap anymore :-) 

> TrieMemtable MemtableReclaimMemory AssertionError: Negative released in 
> MemtablePool$SubPool
> --------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-21390
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-21390
>             Project: Apache Cassandra
>          Issue Type: Bug
>          Components: Local/Memtable
>            Reporter: Praveen Reddy Arra
>            Assignee: Dmitry Konstantinov
>            Priority: Normal
>         Attachments: cassandra.yaml, findings_mask.md, 
> image-2026-05-21-09-17-49-716.png, reaper_cluster_output-1.txt, sstabledump
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> We have started seeing this fatal exception in Apache Cassandra 5.0.6 on one 
> of our clusters.
> {code:java}
> [ERROR] [MemtableReclaimMemory:1] cluster_id=xxx ip_address=xxx.xxx.xxx.xxx 
> JVMStabilityInspector.java:70 - Exception in thread 
> Thread[MemtableReclaimMemory:1,5,MemtableReclaimMemory]
> java.lang.AssertionError: Negative released: -4332
> at 
> org.apache.cassandra.utils.memory.MemtablePool$SubPool.released(MemtablePool.java:194)
> at 
> org.apache.cassandra.utils.memory.MemtableAllocator$SubAllocator.releaseAll(MemtableAllocator.java:153)
> at 
> org.apache.cassandra.utils.memory.MemtableAllocator$SubAllocator.setDiscarded(MemtableAllocator.java:144)
> at 
> org.apache.cassandra.utils.memory.MemtableAllocator.setDiscarded(MemtableAllocator.java:95)
> at 
> org.apache.cassandra.utils.memory.NativeAllocator.setDiscarded(NativeAllocator.java:205)
> at 
> org.apache.cassandra.db.memtable.AbstractAllocatorMemtable.discard(AbstractAllocatorMemtable.java:171)
> at 
> org.apache.cassandra.db.memtable.TrieMemtable.discard(TrieMemtable.java:163)
> at 
> org.apache.cassandra.db.ColumnFamilyStore$Flush$1.runMayThrow(ColumnFamilyStore.java:1398)
> at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:26)
> at 
> org.apache.cassandra.concurrent.ExecutionFailure$1.run(ExecutionFailure.java:133)
> at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
> at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
> at 
> io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
> at java.base/java.lang.Thread.run(Thread.java:842)
> {code}
> {code:yaml}
> memtable_allocation_type: offheap_objects
> file_cache_enabled: true
> file_cache_size: 2048MiB
> memtable: 
>   configurations: 
>     skiplist: 
>       class_name: SkipListMemtable
>     trie: 
>       class_name: TrieMemtable
>     default: 
>       inherits: trie
> {code}
> it looks similar to the open MemtableReclaimMemory assert issue in 
> CASSANDRA-18159
> Notes:
>  * RHEL 8.10 with OpenJDK 17
>  * 16GB heap
>  * -ea enabled
>  * Reaper v3.8
>  * SkipListMemtable and TrieMemtable
>  * memtable_allocation_type: offheap_objects ({*}only{*})



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to