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 2024120305-4.3] openQA test fails in TC_20_AudioVM_PipeWire_fedora-40-xfce #9619

Closed
marmarek opened this issue Dec 3, 2024 · 20 comments · Fixed by QubesOS/qubes-gui-agent-linux#220
Labels
affects-4.3 This issue affects Qubes OS 4.3. C: audio C: tests diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. r4.2-host-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-fc39-cur-test r4.3-vm-fc40-cur-test r4.3-vm-fc41-cur-test r4.3-vm-trixie-cur-test T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@marmarek
Copy link
Member

marmarek commented Dec 3, 2024

Observation

openQA test in scenario qubesos-4.3-pull-requests-x86_64-system_tests_audio@64bit fails in
TC_20_AudioVM_PipeWire_fedora-40-xfce

Traceback (most recent call last):
  File "/usr/lib64/python3.13/contextlib.py", line 85, in inner
    return func(*args, **kwds)
  File "/usr/lib/python3.13/site-packages/qubes/tests/integ/audio.py", line 682, in test_260_audio_mic_enabled_switch_audiovm
    self.common_audio_record_unmuted(detach_mic=False)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/qubes/tests/integ/audio.py", line 491, in common_audio_record_unmuted
    self.check_audio_sample(recorded_audio, sfreq)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/qubes/tests/integ/audio.py", line 179, in check_audio_sample
    self.fail(
    ~~~~~~~~~^
        f"too short audio, expected 10s, got {rec_size / 44100}, saved to {fname}"
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: too short audio, expected 10s, got 0.00013605442176870748, saved to /tmp/audio-sample-qubes.tests.integ.audio.TC_20_AudioVM_PipeWire_fedora-40-xfce.test_260_audio_mic_enabled_switch_audiovm.raw

Test suite description

Audio tests

Reproducible

Fails since (at least) Build 2024120305-4.3 (current job)

Expected result

Last good: 2024120220-4.3 (or more recent)

Further details

Always latest result in this scenario: latest

@marmarek marmarek added T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. C: tests P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. C: audio affects-4.3 This issue affects Qubes OS 4.3. labels Dec 3, 2024
@marmarek
Copy link
Member Author

marmarek commented Dec 3, 2024

Console log from this test has

[2024-12-03 03:16:53] [    6.053472] pipewire[703]: �[0;1;31mmod.qubes-audio: no /qubes-audio-domain-xid entry in QubesDB�[0m
[2024-12-03 03:16:53] [    6.053676] pipewire[703]: �[0;1;38;5;185mmod.qubes-audio: unknown peer domain, cannot create stream�[0m
[2024-12-03 03:16:53] [    6.053735] pipewire[703]: �[0;1;38;5;185mmod.qubes-audio: unknown peer domain, cannot create stream�[0m

Not sure yet about its timing (could be on audiovm switch)

@marmarek
Copy link
Member Author

marmarek commented Dec 4, 2024

.xsession-errors in dom0:

sys-firewall: AUDIO process exists. Skipping.
sys-net: AUDIO process exists. Skipping.
sys-usb: AUDIO process exists. Skipping.
sys-whonix: AUDIO process exists. Skipping.
2024-12-03 13:30:42,541 icon-receiver: disconnected: test-inst-audiovm
test-inst-vm1: Starting GUI
test-inst-vm1: Sending monitor layout
2024-12-03 13:30:55,075 icon-receiver: connected: test-inst-vm1
test-inst-audiovm: Starting GUI
test-inst-audiovm: Starting AUDIO
test-inst-audiovm: Sending monitor layout
1733250724.272996 no /audio-input-config/test-inst-audiovm entry in QubesDB
1733250725.032157 Connection to qube established, connecting to PulseAudio daemon

1733250725.039677 Connection established.�[K
1733250725.072785 Stream successfully created.
1733250725.072823 Buffer metrics: maxlength=4194304, tlength=3072, prebuf=2052, minreq=1024
1733250725.072840 Using sample spec 's16le 2ch 44100Hz', channel map 'front-left,front-right'.
1733250725.072914 Connected to device alsa_output.pci-0000_00_02.0.analog-stereo (54, not suspended).
1733250725.081203 Stream buffer attributes changed.�[K
1733250725.103249 Stream successfully created.
1733250725.103279 Buffer metrics: maxlength=4194304, tlength=4096, prebuf=4294967295, minreq=4294967295
1733250725.103293 Using sample spec 's16le 2ch 44100Hz', channel map 'front-left,front-right'.
1733250725.103304 Connected to device alsa_output.pci-0000_00_02.0.analog-stereo.monitor (54, not suspended).
1733250725.103410 Stream drain
1733250725.122752 Stream started.�[K
1733250725.122828 Cork requested and playback vchan empty. Draining playback stream.
1733250725.175723 Playback vchan empty and playback stream drained. Corking playback stream.
2024-12-03 13:32:07,376 icon-receiver: connected: test-inst-audiovm
1733250728.174039 Stream uncork
1733250728.397731 Recording requested but not allowed
1733250728.901139 Stream started.�[K
1733250730.438543 Stream underrun.�[K
1733250730.545762 Stream started.�[K
1733250739.058499 Stream underrun.�[K

this is the important part:

1733250728.397731 Recording requested but not allowed

marmarek added a commit to marmarek/qubes-gui-daemon that referenced this issue Dec 4, 2024
After getting an event of QubesDB FD, actually call qdb_read_watch() so
the event is cleared and the next one can be received.

QubesOS/qubes-issues#9619
marmarek added a commit to marmarek/qubes-gui-daemon that referenced this issue Dec 4, 2024
After getting an event of QubesDB FD, actually call qdb_read_watch() so
the event is cleared and the next one can be received.

Fixes QubesOS/qubes-issues#9619
@andrewdavidwong andrewdavidwong added the needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. label Dec 5, 2024
marmarek added a commit to marmarek/qubes-gui-daemon that referenced this issue Dec 6, 2024
First of all, after getting an event of QubesDB FD, actually call
qdb_read_watch() so the event is cleared and the next one can be
received.

But that's not enough. libqubesdb's queueing of watches doesn't handle
well using the same connection for both watches and commands, and using
non-blocking mode (monitoring qdb_watch_fd(), instead of calling
qdb_read_watch() in a loop). While this issue wants fixing on the
libqubesdb side, for now use separate connection to workaround the
issue.

Fixes QubesOS/qubes-issues#9619
marmarek added a commit to marmarek/qubes-gui-agent-linux that referenced this issue Dec 6, 2024
If root session is started early and pipewire gets started as part of
it, it may connect to the audiovm earlier than the user's instance,
effectively stealing the connection. Upstream already has
ConditionUser=!root in relevant pulseaudio units, but not in pipewire
ones. Add similar condition to pipewire.service unit.

Fixes QubesOS/qubes-issues#9619
@qubesos-bot
Copy link

Automated announcement from builder-github

The package gui-agent-linux 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 gui-agent-linux 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 package gui-daemon 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 gui-daemon 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 gui-agent-linux (including package gui-agent-linux) 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 gui-agent-linux (including package gui-agent-linux) 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 gui-agent-linux (including package gui-agent-linux) 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 gui-daemon (including package gui-daemon) 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

2 similar comments
@qubesos-bot
Copy link

Automated announcement from builder-github

The component gui-daemon (including package gui-daemon) 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 gui-daemon (including package gui-daemon) 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 added diagnosed Technical diagnosis has been performed (see issue comments). and removed needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. labels Dec 11, 2024
marmarek added a commit to QubesOS/qubes-gui-agent-linux that referenced this issue Dec 27, 2024
If root session is started early and pipewire gets started as part of
it, it may connect to the audiovm earlier than the user's instance,
effectively stealing the connection. Upstream already has
ConditionUser=!root in relevant pulseaudio units, but not in pipewire
ones. Add similar condition to pipewire.service unit.

Fixes QubesOS/qubes-issues#9619

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

Automated announcement from builder-github

The component gui-agent-linux (including package gui-agent-linux) 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 gui-agent-linux (including package gui-agent-linux) 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 gui-agent-linux 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 gui-agent-linux 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 package gui-agent-linux 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 gui-agent-linux 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 gui-agent-linux (including package gui-agent-linux) 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 gui-agent-linux (including package gui-agent-linux) 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.3 This issue affects Qubes OS 4.3. C: audio C: tests diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. r4.2-host-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-fc39-cur-test r4.3-vm-fc40-cur-test r4.3-vm-fc41-cur-test r4.3-vm-trixie-cur-test T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants