Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qrexec-client: handle failed service exec #42

Merged
merged 1 commit into from
Apr 2, 2020

Conversation

pwmarcz
Copy link
Contributor

@pwmarcz pwmarcz commented Mar 28, 2020

Otherwise, qrexec-client just hangs when it fails to spawn a
process, or connect to a socket service.

This corresponds to the fix for qrexec-agent in commit
95fa4bb.

@codecov
Copy link

codecov bot commented Mar 28, 2020

Codecov Report

Merging #42 into master will increase coverage by 0.03%.
The diff coverage is 88.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #42      +/-   ##
==========================================
+ Coverage   74.51%   74.54%   +0.03%     
==========================================
  Files          41       41              
  Lines        6612     6632      +20     
  Branches      474      477       +3     
==========================================
+ Hits         4927     4944      +17     
- Misses       1431     1432       +1     
- Partials      254      256       +2     
Impacted Files Coverage Δ
daemon/qrexec-client.c 56.62% <84.21%> (+0.82%) ⬆️
qrexec/tests/socket/daemon.py 99.27% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 97373fa...c9b3439. Read the comment docs.

@pwmarcz pwmarcz changed the title qrexec-client: handle failed service exec WIP: qrexec-client: handle failed service exec Mar 28, 2020
@marmarek
Copy link
Member

Do you think it fixes the issue in https://openqa.qubes-os.org/tests/7251 ?
I don't see failed service calls there (at least not that many), but a lot of qrexec-policy-exec processes - that many that dom0 runs out of memory.
It may be that qrexec-policy-exec hangs after service is executed - before the OOM, there was a lot of (successful) calls to qubes.UpdatesProxy (from one VM to another).

@pwmarcz pwmarcz changed the title WIP: qrexec-client: handle failed service exec qrexec-client: handle failed service exec Mar 28, 2020
Otherwise, qrexec-client just hangs when it fails to spawn a
process, or connect to a socket service.

This corresponds to the fix for qrexec-agent in commit
95fa4bb.
pwmarcz added a commit to pwmarcz/qubes-gui-agent-linux that referenced this pull request Mar 28, 2020
This makes icon-sender handle GUI restart, same as qubes-gui and
audio. However, in this case we are not running raw vchan, but
Qubes RPC, so the procedure is more complicated: we start a
qrexec-client-vm subprocess, and restart it if it breaks.

Needs icon-receiver to be a service with wait-for-session
(QubesOS/qubes-gui-daemon#37), and fix for socket services in dom0
(QubesOS/qubes-core-qrexec#42).
pwmarcz added a commit to pwmarcz/qubes-gui-agent-linux that referenced this pull request Mar 28, 2020
This makes icon-sender handle GUI restart, same as qubes-gui and
audio. However, in this case we are not running raw vchan, but
Qubes RPC, so the procedure is more complicated: we start a
qrexec-client-vm subprocess, and restart it if it breaks.

Needs icon-receiver to be a service with wait-for-session
(QubesOS/qubes-gui-daemon#37), and fix for socket services in dom0
(QubesOS/qubes-core-qrexec#42).
@pwmarcz
Copy link
Contributor Author

pwmarcz commented Mar 28, 2020

AFAICT, the impact for this one is minimal - only socket services in dom0 that are not running at the moment.

@qubesos-bot
Copy link

qubesos-bot commented Mar 29, 2020

OpenQA test summary

Complete test suite and dependencies: https://openqa.qubes-os.org/tests/7365#dependencies

Failed tests

New failures

Compared to: https://openqa.qubes-os.org/tests/6362#dependencies

Fixed failures

Compared to: https://openqa.qubes-os.org/tests/6362#dependencies

pwmarcz added a commit to pwmarcz/qubes-gui-agent-linux that referenced this pull request Mar 30, 2020
This makes icon-sender handle GUI restart, same as qubes-gui and
audio. However, in this case we are not running raw vchan, but
Qubes RPC, so the procedure is more complicated: we start a
qrexec-client-vm subprocess, and restart it if it breaks.

Needs icon-receiver to be a service with wait-for-session
(QubesOS/qubes-gui-daemon#37), and fix for socket services in dom0
(QubesOS/qubes-core-qrexec#42).
@marmarek marmarek merged commit 8338e73 into QubesOS:master Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants