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

[Build 2020033017-4.1] openQA test fails in TC_00_AppVM_fedora-30.test_097_qrexec_service_socket_vm_eof_reverse #5749

Closed
marmarek opened this issue Apr 1, 2020 · 18 comments · Fixed by QubesOS/qubes-core-qrexec#188
Labels
affects-4.1 This issue affects Qubes OS 4.1. 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. r4.2-host-stable r4.2-stable r4.2-vm-bookworm-stable r4.2-vm-fc40-stable r4.2-vm-fc41-stable r4.2-vm-trixie-stable r4.3-host-cur-test r4.3-vm-bookworm-cur-test r4.3-vm-fc40-cur-test r4.3-vm-fc41-cur-test r4.3-vm-trixie-cur-test

Comments

@marmarek
Copy link
Member

marmarek commented Apr 1, 2020

Observation

openQA test in scenario qubesos-4.1-pull-requests-x86_64-system_tests_basic_vm_qrexec_gui@64bit fails in
TC_00_AppVM_fedora-30

# test_097_qrexec_service_socket_vm_eof_reverse
# failure: 

Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/qubes/tests/__init__.py", line 501, in cleanup_loop
    == int(self.loop._ssock is not None)
AssertionError

# system-out: 

2020-03-31 00:49:48.426 qrexec-client[221655]: process_io.c:181:process_io: vchan connection closed early (fds: 1 0 -1, status: -1 -1)

Test suite description

This test is supposed to test VM socket service - if doing shutdown(SHUT_WR) on the socket there is transferred as EOF to dom0 (qrexec-client).

Reproducible

Fails since (at least) Build 2020032011-4.1

Expected result

Last good: (unknown) (or more recent)

Further details

Always latest result in this scenario: latest

The actual failure message is weird, as it's about FD leak, not timeout on waiting for EOF. But the above qrexec-client output suggests something is wrong.

cc @pwmarcz

@marmarek marmarek added this to the Release 4.1 milestone Apr 1, 2020
@marmarek
Copy link
Member Author

marmarek commented Apr 1, 2020

I'm not entirely sure if the qrexec-client message is really about the test call and not some auxiliary call during normal VM life cycle. In the very next test I see:

qubes.tests.integ.vm_qrexec_gui/TC_00_AppVM_fedora-30/test_098_qrexec_service_socket_vm_eof
Test for EOF transmission dom0->VM(socket) ... CRITICAL:qubes.tests.integ.vm_qrexec_gui.TC_00_AppVM_fedora-30.test_098_qrexec_service_socket_vm_eof:starting
2020-03-31 00:49:51.003 qrexec-client[221658]: process_io.c:181:process_io: vchan connection closed early (fds: -1 0 -1, status: -1 -1)
WARNING:vm.test-inst-vm1:Activating the test-inst-vm1 VM

A bit early to be about this test, maybe some remainder of the previous test?

@marmarek
Copy link
Member Author

marmarek commented Apr 1, 2020

I have ran those tests locally. They both passed, but I still got exactly the same qrexec-client messages. And only for those two tests (097 and 098), not the others, so it's unlikely side effect of just VM startup.

@pwmarcz
Copy link

pwmarcz commented Apr 1, 2020

Are you sure these are not cleanup issues? I don't see any message about timeout in logs.

In test_097_qrexec_service_socket_vm_eof_reverse, you are creating two qrexec-client processes (service_proc, run_service) but not waiting for any of them to finish (and they will execute for 15 seconds). That would account for the message about vchan connection close.

@marmarek
Copy link
Member Author

marmarek commented Apr 1, 2020

I have added cleanup of service_proc to tearDown, but apparently I have forgot to create PR about it: QubesOS/qubes-core-admin#332. Let me see if that helps.

@marmarek
Copy link
Member Author

marmarek commented Apr 1, 2020

With this cleanup the same: tests succeeded, but with this message present (only for those tests):

dom0: qubes.tests.integ.vm_qrexec_gui/TC_00_AppVM_fedora-30/test_097_qrexec_service_socket_vm_eof_reverse
  Test for EOF transmission VM(socket)->dom0 ... 2020-04-01 08:57:43.428 qrexec-client[786211]: process_io.c:187:process_io: vchan connection closed early (fds: -1 0 -1, status: -1 -1)
ok
dom0: qubes.tests.integ.vm_qrexec_gui/TC_00_AppVM_fedora-30/test_098_qrexec_service_socket_vm_eof
  Test for EOF transmission dom0->VM(socket) ... 2020-04-01 08:58:32.875 qrexec-client[788149]: process_io.c:187:process_io: vchan connection closed early (fds: 1 -1 -1, status: -1 -1)
ok

@andrewdavidwong andrewdavidwong added the P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. label Apr 1, 2020
@andrewdavidwong andrewdavidwong added the affects-4.1 This issue affects Qubes OS 4.1. label Aug 8, 2023
@andrewdavidwong andrewdavidwong removed this from the Release 4.1 updates milestone Aug 13, 2023
@andrewdavidwong andrewdavidwong added the eol-4.1 Closed because Qubes 4.1 has reached end-of-life (EOL) label Dec 7, 2024

This comment has been minimized.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2024
marmarek added a commit to marmarek/qubes-core-qrexec that referenced this issue Feb 6, 2025
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
@qubesos-bot
Copy link

Automated announcement from builder-github

The package core-qrexec has been pushed to the r4.3 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing bookworm-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package core-qrexec has been pushed to the r4.3 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing trixie-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component core-qrexec (including package core-qrexec) has been pushed to the r4.3 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo dnf update --enablerepo=qubes-vm-r4.3-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component core-qrexec (including package core-qrexec) has been pushed to the r4.3 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo dnf update --enablerepo=qubes-vm-r4.3-current-testing

Changes included in this update

@andrewdavidwong andrewdavidwong removed the eol-4.1 Closed because Qubes 4.1 has reached end-of-life (EOL) label Feb 10, 2025
@andrewdavidwong andrewdavidwong added diagnosed Technical diagnosis has been performed (see issue comments). pr submitted A pull request has been submitted for this issue. labels Feb 10, 2025
marmarek added a commit to QubesOS/qubes-core-qrexec that referenced this issue Feb 18, 2025
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

(cherry picked from commit a53295b)
@qubesos-bot
Copy link

Automated announcement from builder-github

The package core-qrexec has been pushed to the r4.2 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing bookworm-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package core-qrexec has been pushed to the r4.2 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing trixie-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component core-qrexec (including package core-qrexec) has been pushed to the r4.2 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo dnf update --enablerepo=qubes-vm-r4.2-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component core-qrexec (including package core-qrexec) has been pushed to the r4.2 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo dnf update --enablerepo=qubes-vm-r4.2-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package core-qrexec has been pushed to the r4.2 stable repository for the Debian template.
To install this update, please use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package core-qrexec has been pushed to the r4.2 stable repository for the Debian template.
To install this update, please use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component core-qrexec (including package core-qrexec) has been pushed to the r4.2 stable repository for the Fedora template.
To install this update, please use the standard update command:

sudo dnf update

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component core-qrexec (including package core-qrexec) has been pushed to the r4.2 stable repository for the Fedora template.
To install this update, please use the standard update command:

sudo dnf update

Changes included in this update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.1 This issue affects Qubes OS 4.1. 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. r4.2-host-stable r4.2-stable r4.2-vm-bookworm-stable r4.2-vm-fc40-stable r4.2-vm-fc41-stable r4.2-vm-trixie-stable r4.3-host-cur-test r4.3-vm-bookworm-cur-test r4.3-vm-fc40-cur-test r4.3-vm-fc41-cur-test r4.3-vm-trixie-cur-test
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants