qrexec-agent: avoid blocking on incomplete trigger requests - #239
Conversation
|
PipelineRetry |
|
Pushed two test-only follow-up commits to address the failed socket-test race and make the fragmented-request regression deterministic. The regression now waits for the trigger socket to exist and verifies that a complete request is serviced while another client has sent only part of its header. Local socket-backend build and both regression tests pass. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #239 +/- ##
==========================================
+ Coverage 80.97% 81.08% +0.11%
==========================================
Files 58 58
Lines 10842 10940 +98
==========================================
+ Hits 8779 8871 +92
- Misses 2063 2069 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
||
| int flags = fcntl(client_fd, F_GETFL, 0); | ||
| if (flags < 0 || fcntl(client_fd, F_SETFL, flags | O_NONBLOCK) < 0) { | ||
| close(client_fd); |
| if (!client->params) | ||
| goto error; | ||
| } | ||
| ret = read_trigger_client(client, client->params, &client->params_received, |
There was a problem hiding this comment.
If reads stop here (this one returns 0), next iteration will read the data into the header buffer again. I think you may use client->params == NULL as a condition for reading the header above.
There was a problem hiding this comment.
Actually, it won't really read anything into the header buffer, it will exit early because client->hdr_received == sizeof(client->hdr) already. But it could use at least a comment if not explicit condition in handle_trigger_client_io() to make it clearer.
|
Addressed both review comments: fcntl failures are now logged, and allocating |
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026073003-devel&flavor=pull-requests Test run included the following:
Upload failures
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026050504-devel&flavor=update
Failed tests6 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/176874#dependencies 31 fixed
Unstable testsDetails
Performance TestsPerformance degradation:14 performance degradations
Remaining performance tests:97 tests
|
fb73fb5 to
098c931
Compare
Summary
ppollTest plan
0.01s, blocked3.01s(exit 124), recovered0.01s.gcc -fsyntax-onlyforagent/qrexec-agent.cusing the project include paths and a minimallibvchanAPI stub; the AppVM lacks the reallibvchandevelopment package.python3 -m py_compile qrexec/tests/socket/agent.pygit diff --checkFixes QubesOS/qubes-issues#11010