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

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

The issue is reported for cluster table in Cassandra Reaper 3.8.0:
{code}
CREATE TABLE reaper.cluster (
    name text PRIMARY KEY,
    last_contact timestamp,
    namespace text,
    partitioner text,
    properties text,
    state text,
    seed_hosts set<text>
) 
{code}
there are no clustering columns here.
Queries in source code for the table: 
https://raw.githubusercontent.com/thelastpickle/cassandra-reaper/3.8.0/src/server/src/main/java/io/cassandrareaper/storage/cluster/CassandraClusterDao.java
* INSERT INTO cluster(name, partitioner, seed_hosts, properties, state, 
last_contact) values(?, ?, ?, ?, ?, ?)
* DELETE FROM cluster WHERE name = ?

the problem with https://github.com/apache/cassandra/pull/4878 fix for me: 
while it looks valid and fixes a bug - the question is does it fix the reported 
bug..
I was not able to reproduce the fixed issue using the Reaper table and queries 
so far..


> 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: image-2026-05-21-09-17-49-716.png
>
>          Time Spent: 10m
>  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 - heap_buffers
> 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|https://issues.apache.org/jira/browse/CASSANDRA-18159]
> Environment is RHEL 8.10 with OpenJDK 17 and 16GB heap, -ea enabled.



--
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