-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Experienced crashes on Linux with null pointer dereference at ring_buffer.cpp:124 in RingBuffer::free_empty()
Fault address: 0x0000000000000008 (null pointer dereference)
Location: datastax-cpp-driver/src/ring_buffer.cpp:124
Function: RingBuffer::free_empty()
Error: assert(cur->write_pos_ == cur->read_pos_)
Thread NIO-SGLTN-1-#2
└─ uv_run (libuv event loop)
└─ EventLoop::internal_on_run
└─ OpenSslSession::decrypt
└─ CNIOBoringSSL_SSL_read
└─ RingBufferBio::read
└─ RingBuffer::read
└─ RingBuffer::free_empty ← CRASH
Root Cause
The C++ DataStax driver's RingBuffer class lacks thread synchronization. When multiple Swift threads concurrently call cass_session_execute(), they race on the circular linked list in the ring buffer.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels