qubes-issues icon indicating copy to clipboard operation
qubes-issues copied to clipboard

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

Open neowutran opened this issue 1 year ago • 2 comments

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 avatar Feb 23 '24 14:02 neowutran

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

DemiMarie avatar Feb 24 '24 01:02 DemiMarie

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 avatar Feb 29 '24 13:02 neowutran

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 avatar Mar 01 '24 07:03 neowutran

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

neowutran avatar Mar 01 '24 10:03 neowutran

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

marmarek avatar Mar 01 '24 13:03 marmarek

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

neowutran avatar Mar 01 '24 18:03 neowutran

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

neowutran avatar Mar 01 '24 19:03 neowutran

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 avatar Apr 29 '24 15:04 qubesos-bot

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 avatar Apr 29 '24 15:04 qubesos-bot

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 avatar Apr 29 '24 15:04 qubesos-bot

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 avatar Apr 29 '24 15:04 qubesos-bot

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 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 avatar May 02 '24 10:05 qubesos-bot

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 avatar May 02 '24 11:05 qubesos-bot

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 avatar May 02 '24 11:05 qubesos-bot

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 avatar May 07 '24 23:05 qubesos-bot

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 avatar May 07 '24 23:05 qubesos-bot

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)

neowutran avatar May 08 '24 04:05 neowutran

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 avatar May 15 '24 23:05 qubesos-bot

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.

andrewdavidwong avatar May 16 '24 17:05 andrewdavidwong

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 avatar May 21 '24 13:05 qubesos-bot

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 avatar May 21 '24 13:05 qubesos-bot

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 avatar May 21 '24 13:05 qubesos-bot

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 avatar May 21 '24 13:05 qubesos-bot

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 avatar May 21 '24 13:05 qubesos-bot

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 avatar May 21 '24 13:05 qubesos-bot