Skip to content

Initialize frame handler's connection reference before sending header (backport #2017) - #2018

Merged
acogoluegnes merged 1 commit into
v5.xfrom
mergify/bp/v5.x/pr-2017
Jul 9, 2026
Merged

Initialize frame handler's connection reference before sending header (backport #2017)#2018
acogoluegnes merged 1 commit into
v5.xfrom
mergify/bp/v5.x/pr-2017

Conversation

@mergify

@mergify mergify Bot commented Jul 9, 2026

Copy link
Copy Markdown

_frameHandler.sendHeader() can trigger an immediate reply from the broker, which the I/O thread processes as soon as it arrives. If that happens before _frameHandler.initialize(this) has run, the I/O thread dereferences a still-null AMQConnection reference (e.g. in AmqpHandler.channelRead for the Netty transport) and the connection fails with a NullPointerException wrapped as an IOException. This mostly surfaces under CI-style thread scheduling on fast/local round-trips, where the reply can outrace initialize().


This is an automatic backport of pull request #2017 done by Mergify.

_frameHandler.sendHeader() can trigger an immediate reply from the
broker, which the I/O thread processes as soon as it arrives. If that
happens before _frameHandler.initialize(this) has run, the I/O thread
dereferences a still-null AMQConnection reference (e.g. in
AmqpHandler.channelRead for the Netty transport) and the connection
fails with a NullPointerException wrapped as an IOException. This
mostly surfaces under CI-style thread scheduling on fast/local
round-trips, where the reply can outrace initialize().

(cherry picked from commit 79fee03)
@acogoluegnes acogoluegnes added this to the 5.34.0 milestone Jul 9, 2026
@acogoluegnes
acogoluegnes merged commit 2b057bf into v5.x Jul 9, 2026
4 of 11 checks passed
@acogoluegnes
acogoluegnes deleted the mergify/bp/v5.x/pr-2017 branch July 9, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant