David Capwell created CASSANDRA-20431:
-----------------------------------------
Summary:
org.apache.cassandra.io.util.BufferedDataOutputStreamPlus#write(java.nio.ByteBuffer)
with a read only ByteBuffer causes the JVM to crash
Key: CASSANDRA-20431
URL: https://issues.apache.org/jira/browse/CASSANDRA-20431
Project: Apache Cassandra
Issue Type: Bug
Components: Legacy/Core
Reporter: David Capwell
This was not found in production, but in testing serializers. A read only
ByteBuffer got generated which lead to the following crash dump
{code}
--------------- T H R E A D ---------------
Current thread (0x0000000127009000): JavaThread "main" [_thread_in_vm,
id=5635, stack(0x000000016b628000,0x000000016b68b000)]
Stack: [0x000000016b628000,0x000000016b68b000], sp=0x000000016b688e40, free
space=387k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted,
Vv=VM code, C=native code)
C [libsystem_platform.dylib+0x3f6c] _platform_memmove+0x1bc
j
jdk.internal.misc.Unsafe.copyMemory0(Ljava/lang/Object;JLjava/lang/Object;JJ)V+0
[email protected]
j
jdk.internal.misc.Unsafe.copyMemory(Ljava/lang/Object;JLjava/lang/Object;JJ)V+29
[email protected]
j sun.misc.Unsafe.copyMemory(Ljava/lang/Object;JLjava/lang/Object;JJ)V+11
[email protected]
j
org.apache.cassandra.utils.FastByteOperations$UnsafeOperations.copy(Ljava/lang/Object;JLjava/lang/Object;JJ)V+36
j
org.apache.cassandra.utils.FastByteOperations$UnsafeOperations.copy(Ljava/lang/Object;J[BII)V+61
j
org.apache.cassandra.utils.FastByteOperations$UnsafeOperations.copy(Ljava/lang/Object;JLjava/nio/ByteBuffer;II)V+22
j
org.apache.cassandra.utils.FastByteOperations$UnsafeOperations.copy(Ljava/nio/ByteBuffer;ILjava/nio/ByteBuffer;II)V+54
j
org.apache.cassandra.utils.FastByteOperations.copy(Ljava/nio/ByteBuffer;ILjava/nio/ByteBuffer;II)V+9
j
org.apache.cassandra.io.util.BufferedDataOutputStreamPlus.write(Ljava/nio/ByteBuffer;)V+117
j
org.apache.cassandra.utils.ByteBufferUtil.writeWithVIntLength(Ljava/nio/ByteBuffer;Lorg/apache/cassandra/io/util/DataOutputPlus;)V+12
j
org.apache.cassandra.service.accord.txn.TxnCondition$Value$2.serialize(Lorg/apache/cassandra/service/accord/txn/TxnCondition$Value;Lorg/apache/cassandra/io/util/DataOutputPlus;Lorg/apache/cassandra/service/accord/serializers/Version;)V+19
j
org.apache.cassandra.service.accord.txn.TxnCondition$Value$2.serialize(Lorg/apache/cassandra/service/accord/txn/TxnCondition;Lorg/apache/cassandra/io/util/DataOutputPlus;Lorg/apache/cassandra/service/accord/serializers/Version;)V+7
j
org.apache.cassandra.service.accord.txn.TxnCondition$1.serialize(Lorg/apache/cassandra/service/accord/txn/TxnCondition;Lorg/apache/cassandra/io/util/DataOutputPlus;Lorg/apache/cassandra/service/accord/serializers/Version;)V+23
j
org.apache.cassandra.service.accord.txn.TxnCondition$1.serialize(Ljava/lang/Object;Lorg/apache/cassandra/io/util/DataOutputPlus;Ljava/lang/Object;)V+10
j
org.apache.cassandra.io.Serializers.testSerde(Lorg/apache/cassandra/io/util/DataOutputBuffer;Lorg/apache/cassandra/io/AsymmetricVersionedSerializer;Ljava/lang/Object;Ljava/lang/Object;)V+18
j
org.apache.cassandra.service.accord.txn.TxnConditionTest.lambda$serde$1(Lorg/apache/cassandra/io/util/DataOutputBuffer;Lorg/apache/cassandra/service/accord/txn/TxnCondition;)V+37
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]