You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A simple/pathological case that would reproduce the deadlock is calling stop enough times from code executing within the event loop itself to fill the socket's transmit buffer.
A more complex - albeit still possibly pathological - case is where a background thread or many background threads call stop, while the event loop code is blocked waiting for something from the thread that happens to make the stop call that would exceed the _w_interrupt socket's transmit buffer.
The original code returned a non-blocking socket pair, but the pair is blocking after PR #908. See https://github.com/pika/pika/pull/908/files#r160844142.
The change from non-blocking to blocking can lead to a deadlock. The implementation was designed for non-blocking model - see
pika/pika/adapters/select_connection.py
Line 539 in 2b145f4
pika/pika/adapters/select_connection.py
Line 651 in 2b145f4
A simple/pathological case that would reproduce the deadlock is calling
stop
enough times from code executing within the event loop itself to fill the socket's transmit buffer.A more complex - albeit still possibly pathological - case is where a background thread or many background threads call
stop
, while the event loop code is blocked waiting for something from the thread that happens to make thestop
call that would exceed the_w_interrupt
socket's transmit buffer.Is there any reason for removing the logic that made both sockets non-blocking? See https://github.com/pika/pika/pull/908/files#diff-69e7c8c211c62cdb127e8ab3324ce7c6L649
The text was updated successfully, but these errors were encountered: