daemon: handle IO error when processing wire buffer
Compare changes
Self sign-up has been disabled due to increased spam activity. If you want to get access, please send an email to a project owner (preferred) or at gitlab(at)nic(dot)cz. We apologize for the inconvenience.
This fixes the following assert:
daemon/worker.c:1157: qr_task_finalize: Assertion '!session_flags(source_session)->closing' failed.
Scenario which leads to the above error:
tcp_recv()
call to put at least
two queries into the session's wire buffer.session_wirebuf_process()
calls worker_submit()
which calls
qr_task_step()
.qr_task_step()
the query state changes to KR_STATE_DONE
,
then qr_task_finalize()
is called.qr_task_send()
is called, but it fails. This is where
qr_task_finalize()
closes the session, but used to return no error.session_wirebuf_process()
,
steps 3 and 4 are followed and qr_task_finalize()
is called.Debugging this was a lot of fun... All hail the rr debugger!