JAVA-6366Needs Triage

NullPointerException in ByteBufNIO.hasRemaining from AsynchronousChannelStream write completion after the buffer was released

h3. Summary A write completion handler in {{AsynchronousChannelStream.pipeOneBuffer}} calls {{byteBuffer.hasRemaining()}} after the buffer has been released. {{ByteBufNIO.release()}} sets {{buf = null}} when the reference count reaches zero, so the call throws a NullPointerException on the channel group thread. The handler is the root completion handler, so the exception is uncaught and the outer handler is never completed. Driver: mongodb-driver-reactivestreams 5.6.5 (same code in 5.14.0)

Affected Versions
Versions known to exhibit this issue
5.6.5
Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue
Reactive Streams
Labels
Tags and classification

No labels assigned.