Skip to content

fix: replace assert with early return in out_event when _io_error is set#4852

Open
ssam18 wants to merge 1 commit intozeromq:masterfrom
ssam18:fix/out-event-io-error-assert
Open

fix: replace assert with early return in out_event when _io_error is set#4852
ssam18 wants to merge 1 commit intozeromq:masterfrom
ssam18:fix/out-event-io-error-assert

Conversation

@ssam18
Copy link
Copy Markdown

@ssam18 ssam18 commented Apr 17, 2026

When the I/O thread collects both POLLIN and POLLOUT from the same epoll_wait batch, processing the POLLIN can set _io_error via in_event_internal(), and the already-queued POLLOUT still gets dispatched to out_event() — hitting the assert and crashing. Replacing the assert with an early return handles this gracefully, consistent with the same guard already present in restart_output(). Fixes #4841.

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.

Race condition: assertion failure in stream_engine_base.cpp: out_event() when _io_error is set

1 participant