Ignore SIGPIPE in qrexec-fork-server too#188
Conversation
The process_io() (or more precisely - write_stdin() and write_all()) function relies on write() reporting errors "normally" (negative return value + errno), it is not prepared to handle SIGPIPE signal. If service exits, SIGPIPE sent to the qrexec-fork-server worker process would kill it. The main qrexec-agent process correctly has SIGPIPE handler set to SIG_IGN, but this was missing in qrexec-fork-server. Add it there too. This was found when debugging qrexec performance tests, but looks also similar to this issue: Fixes QubesOS/qubes-issues#5749
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #188 +/- ##
==========================================
- Coverage 78.93% 78.90% -0.03%
==========================================
Files 55 55
Lines 10145 10146 +1
==========================================
- Hits 8008 8006 -2
- Misses 2137 2140 +3 ☔ View full report in Codecov by Sentry. |
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025020719-4.3&flavor=pull-requests Test run included the following:
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025020404-4.3&flavor=update
Failed tests18 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/127852#dependencies 30 fixed
Unstable testsDetails |
The process_io() (or more precisely - write_stdin() and write_all())
function relies on write() reporting errors "normally" (negative
return value + errno), it is not prepared to handle SIGPIPE signal. If
service exits, SIGPIPE sent to the qrexec-fork-server worker process
would kill it. The main qrexec-agent process correctly has SIGPIPE
handler set to SIG_IGN, but this was missing in qrexec-fork-server. Add
it there too.
This was found when debugging qrexec performance tests, but looks also
similar to this issue:
Fixes QubesOS/qubes-issues#5749