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

If exit-on-client-eof=true in service config and service exits before EOF on stdout, no MSG_DATA_STDOUT is sent #9249

Closed
DemiMarie opened this issue May 19, 2024 · 0 comments · Fixed by QubesOS/qubes-core-qrexec#164
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: core diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. pr submitted A pull request has been submitted for this issue.

Comments

@DemiMarie
Copy link

How to file a helpful issue

Qubes OS release

R4.2

Brief summary

If a service configuration has exit-on-client-eof=true and the client sends EOF before the server does, no empty MSG_DATA_STDOUT is sent to serve as EOF marker.

Steps to reproduce

  1. Create a socket service with exit-on-client-eof=true in service config, that does not send EOF until after the client does.
  2. Connect to it.
  3. Observe the messages sent on the vchan.

Expected behavior

An empty MSG_DATA_STDOUT is sent immediately before MSG_DATA_EXIT_CODE.

Actual behavior

No MSG_DATA_STDOUT is sent.

@DemiMarie DemiMarie added T: bug C: core P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. affects-4.2 This issue affects Qubes OS 4.2. labels May 19, 2024
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue May 19, 2024
Previously, this was not guaranteed to happen if the process was
exiting, and MSG_DATA_STDERR would not be sent for socket services at
all.

Fixes: QubesOS/qubes-issues#9142
Fixes: QubesOS/qubes-issues#9248
Fixes: QubesOS/qubes-issues#9249
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue May 19, 2024
Previously, this was not guaranteed to happen if the process was
exiting, and MSG_DATA_STDERR would not be sent for socket services at
all.

Fixes: QubesOS/qubes-issues#9142
Fixes: QubesOS/qubes-issues#9248
Fixes: QubesOS/qubes-issues#9249
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue May 19, 2024
Previously, this was not guaranteed to happen if the process was
exiting, and MSG_DATA_STDERR would not be sent for socket services at
all.  There is still a case where an empty MSG_DATA_STDOUT might not be
sent.

Fixes: QubesOS/qubes-issues#9142
Fixes: QubesOS/qubes-issues#9249
@andrewdavidwong andrewdavidwong added diagnosed Technical diagnosis has been performed (see issue comments). pr submitted A pull request has been submitted for this issue. labels May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: core diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. pr submitted A pull request has been submitted for this issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants