Skip to content

Conversation

@acogoluegnes
Copy link
Contributor

No description provided.

For Netty. Make sure that connection shutdown sequence is not executed
in the IO event loop if recovery follows. Recovery kicks in the shutdown
sequence, so we could end up with a deadlock if the new connection is
allocated to the same event loop.

References #1663
No need to try to connect if the event loop group was shut down.

This also triggers an infinite cycle of connection recovery in the following
case: connection disconnected, recovery starts, event loop group closed,
new connection attempt, Netty channel created and becomes inactive
immediately, recovery restarts, etc.

To avoid the recovery loop, stop recovery when the exception
(IllegalStateException) is thrown.

References #1663
@acogoluegnes acogoluegnes force-pushed the netty-deadlock-on-recovery branch from 45360f7 to 5da2fc3 Compare September 8, 2025 08:52
@acogoluegnes acogoluegnes marked this pull request as ready for review September 8, 2025 08:52
@acogoluegnes acogoluegnes merged commit c971b2b into main Sep 8, 2025
6 checks passed
@acogoluegnes acogoluegnes deleted the netty-deadlock-on-recovery branch September 8, 2025 08:54
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.

2 participants