Counter increments on every NioSocketImpl.read() call and never decrements regardless of whether the socket is returned to pool or closed.
search cancel

Counter increments on every NioSocketImpl.read() call and never decrements regardless of whether the socket is returned to pool or closed.

book

Article ID: 403974

calendar_today

Updated On:

Products

DX SaaS DX Operational Observability

Issue/Introduction

Symptom: 

Sockets|Client||Port :Concurrent Readers increases with every request and never decrements. Only resets on JVM restart. 

 

Expected Behaviour: Concurrent Readers should reflect the number of sockets actively performing a read() at any point in time, decrementing when the read() returns.

Actual Behaviour: Counter increments on every NioSocketImpl.read() call and never decrements regardless of whether the socket is returned to pool or closed.

Environment

  • DX APM Java Agent 25.11
  • Java 21.0.3 (uses sun.nio.ch.NioSocketImpl as default socket impl)
  • Spring Boot 4.x / CXF 4.1 with HTTP connection pooling
  • RHEL 8

Cause

The issue is related to defect # DE687138

InsertOnSocketIO pairs the "Concurrent Readers" increment/decrement on NioSocketImpl.read() only across the normal return path — there's no exception handler, so any read that exits abnormally (timeout, connection reset, forced close) leaks an increment that never decrements.

Resolution

The fix is targeted for the next upcoming release. If you need access to the fix now contact Broadcom Support.