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

audiovm - Argument list too long - no sound for new qubes #8966

Closed
neowutran opened this issue Feb 23, 2024 · 25 comments
Closed

audiovm - Argument list too long - no sound for new qubes #8966

neowutran opened this issue Feb 23, 2024 · 25 comments
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: audio 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-fc37-stable r4.2-vm-fc38-stable r4.2-vm-fc39-stable r4.2-vm-fc40-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-trixie-cur-test T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@neowutran
Copy link

Qubes OS release

R4.2

Brief summary

For audiovm, after some time "qvm-start-daemon.py" print this kind of errors:

Cannot setup watch on /local/domain/154/data/vchan/3/4713/event-channel
libvchan_client_init_async_finish: Argument list too long

Consequence is that new qubes don't have a working audio

Steps to reproduce

No reliable step to reproduce yet.
Starting and stopping qubes maybe have an effect

@neowutran neowutran added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. labels Feb 23, 2024
@andrewdavidwong andrewdavidwong added needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. C: audio affects-4.2 This issue affects Qubes OS 4.2. labels Feb 23, 2024
@DemiMarie
Copy link

I wonder if qvm-start-daemon is running into a Xenstore quota problem.

@neowutran
Copy link
Author

When I had this bug I ran xenstore-control quota SYS-AUDIO-XID and I got watches : 124 .
This value seems awfully close to the default max value of 128.

I augmented the watch quota per qubes to 300 with xenstore-control quota set watches 300.
Will see how it goes

@neowutran
Copy link
Author

neowutran commented Mar 1, 2024

I reached 190. When I start a new dispvm, the number increase by 6. The number doesn't go down when the dispvm shutdown.
Biggest issue seems to be that the "watches" are not correctly released when a VM got shutdown.

Also, maybe the default value is a bit low, there are probably others things than starting vm that increase the number of watches. in the context of an audiovm, if the number is only increased when a VM is started, that limit the number of VM with working audio to 128/6=~21 (i agree, that already a big number of vm).

However I am using a custom version of qvm-start-daemon.py (https://github.com/neowutran/qubes-core-admin-client/blob/f00ae868e444244419dae70453bcc3b88ffcf872/qubesadmin/tools/qvm_start_daemon.py ), I maybe created the issue myself, I don't think it is case but I will verify and report here when I have some time.

update:
indeed unrelated to my modification (reverted the file to the original one, same issue)

@neowutran
Copy link
Author

If I start a vm, the counter increase by 6.
As soon as the vm start actually using audio, the counter decrease by 6.

If I start a vm, and shutdown the said vm without actually using audio, the counter have increased by 6.

With my version of qvm_start_daemon.py, "sys-audio" start with a watches count of 10, meaning that with the default watches counts limit it can handle maximum ( 10 + x*6 < 128 => ) 19 vm not actually using audio before blocking any new vm from using audio

@marmarek
Copy link
Member

marmarek commented Mar 1, 2024

Can you check process list in the audiovm? Perhaps some (pacat-simple-vchan) remain running after VM shutdown?

@neowutran
Copy link
Author

It was indeed the case, and manually killing pacat-simple-vchan decrease the watches counter

@neowutran
Copy link
Author

neowutran commented Mar 1, 2024

I tested to add that in qvm_start_daemon.py

       # def on_domain_stopped(self, vm, _event, **_kwargs):
       # ...........

        if xid != -1:
            self.cleanup_guid(xid)
            self.cleanup_pacat_process(xid)
        if stubdom_xid != -1:
            self.cleanup_guid(stubdom_xid)
            self.cleanup_pacat_process(stubdom_xid)

    def cleanup_pacat_process(self, xid):
        try:
            with open(self.pacat_pidfile(xid)) as f:
                pid = int(f.readline())
                os.kill(pid, signal.SIGTERM)
                print(f"Sent SIGTERM signal to pacat-simple-vchan process {pid}")
        except OSError:
            print(f"Failed to send SIGTERM signal for the pacat-simple-vchan with xid of {xid}")

seems to work, maybe there is a better way to do that

fepitre added a commit to fepitre/qubes-core-admin-client that referenced this issue Mar 27, 2024
@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 Apr 28, 2024
@qubesos-bot
Copy link

Automated announcement from builder-github

The package core-admin-client 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-admin-client 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-admin-client (including package core-admin-client) 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-admin-client (including package core-admin-client) 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-admin-client (including package core-admin-client) 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-admin-client 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-admin-client (including package core-admin-client) 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

@neowutran
Copy link
Author

As a note, how it work means that there is a maximum of ~19 qubes that can be running simultaneously without using audio (but with a audiovm configured). After that number, when a new qube is created, sys-audio will stop working.
(xenstore quota issue).

should probably be mentioned in the future official sys-audio documentation + a note mentioning that it is interesting to unset the audiovm parameter for qubes that will never need audio (all the sys-* vm for example)

@qubesos-bot
Copy link

Automated announcement from builder-github

The component core-admin-client (including package core-admin-client) 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

@andrewdavidwong
Copy link
Member

should probably be mentioned in the future official sys-audio documentation + a note mentioning that it is interesting to unset the audiovm parameter for qubes that will never need audio (all the sys-* vm for example)

Please open a separate issue or a doc PR.

@qubesos-bot
Copy link

Automated announcement from builder-github

The package core-admin-client 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-admin-client 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-admin-client (including package core-admin-client) 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-admin-client (including package core-admin-client) 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-admin-client (including package core-admin-client) 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-admin-client (including package core-admin-client) 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.2 This issue affects Qubes OS 4.2. C: audio 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-fc37-stable r4.2-vm-fc38-stable r4.2-vm-fc39-stable r4.2-vm-fc40-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-trixie-cur-test T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

No branches or pull requests

5 participants