Skip to content

An NPE occurs in the TCP Channel Layer during Socket read due to a race condition seen in HTTP/2 connections #34288

@seshadhri-aswath

Description

@seshadhri-aswath

Describe the bug
HTTP/2's multiplexing allows concurrent read operations on the same TCP connection. The NPE occurs due to a race condition in concurrent buffer management during HTTP/2 operations.

Thread A gets buffer reference to do a TCP read
Thread B concurrently executes cleanup logic when an immediate read returns 0 bytes and releases JIT-allocated buffers
Thread A proceeds to do a read with stale reference, causing NPE

Steps to Reproduce
The bug happens intermittently in Http/2 connection and it difficult to reproduce reliably

Expected behavior
TCP Channel should handle the inconsistent state of the buffer

Diagnostic information:

  • OpenLiberty Version: 26.0.0.2

Metadata

Metadata

Labels

Type

No type

Projects

Status

General Issues

Relationships

None yet

Development

No branches or pull requests

Issue actions