Skip to content

Conversation

@lukaszsamson
Copy link

This PR reproduces and fixes the _input_stopped assertion crash from #3937

restart_input can be invoked after a write_activated notification that was queued before an engine error/heartbeat reconnect. A new engine starts with input running, so _input_stopped is false and the
assert was firing. This PR makes restart_input idempotent by returning early when input was not stopped, keeping restart behavior unchanged for real EAGAIN backpressure cases.

Detailed explanation of the bug:
#3937 (comment)

Fixes:
#3937

Possibly fixes:
#4767 (Slow subscriber, RX queue full, heartbeat triggers reset)
#4229 (HWM configured (especially rcvhwm), random crashes)
#3596 (CLIENT/SERVER, heartbeat=1s, rcvhwm=1, slow consumer)
#4364 (PUB/SUB, heartbeat with small timeouts)

restart_input can be invoked after a write_activated notification
that was queued before an engine error/heartbeat reconnect. A new
engine starts with input running, so _input_stopped is false and the
assert was firing. Make restart_input idempotent by returning early
when input was not stopped, keeping restart behavior unchanged for
real EAGAIN backpressure cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant