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

pulseaudio: pacat-simple-vchan startup and termination #5760

Closed
marmarek opened this issue Apr 5, 2020 · 5 comments · Fixed by QubesOS/qubes-gui-daemon#43
Closed

pulseaudio: pacat-simple-vchan startup and termination #5760

marmarek opened this issue Apr 5, 2020 · 5 comments · Fixed by QubesOS/qubes-gui-daemon#43
Labels
C: gui-virtualization P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. r4.0-dom0-stable r4.1-bullseye-cur-test r4.1-buster-cur-test r4.1-dom0-cur-test r4.1-fc29-cur-test r4.1-fc30-cur-test r4.1-fc31-cur-test r4.1-stretch-cur-test T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Milestone

Comments

@marmarek
Copy link
Member

marmarek commented Apr 5, 2020

There are two issues affecting starting of pacat-simple-vchan:

  1. There is no pid file - this makes qvm-start-daemon (Support for AudioVM qubes-core-admin-client#118) starting multiple instances of pacat-simple-vchan (if for example it needs to reconnect to qubesd)
  2. pacat-simple-vchan may not notice VM kill (as opposed to a clean shutdown). This is because vchan may not fire an event in such a case. Other vchan applications workarounds this by periodic check if the domain is alive, but not pacat-simple-vchan.
@marmarek marmarek added T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. C: gui-virtualization labels Apr 5, 2020
@marmarek marmarek added this to the Release 4.1 milestone Apr 5, 2020
@marmarek
Copy link
Member Author

marmarek commented Apr 5, 2020

2. Other vchan applications workarounds this by periodic check if the domain is alive, but not pacat-simple-vchan.

Actually, it looks like the code for this was there before, but was removed in QubesOS/qubes-gui-daemon@d0fcc6ce

BTW (not necessary now) @pwmarcz something that vchan could do better. The issue is that event channels in Xen do not send notification when the other end (VM) dies. libxenvchan uses a Linux kernel feature to send the event when userspace process sharing memory dies (xengntshr_share_page_notify()). But when the VM is killed/crashes, Linux doesn't have a chance to send this notification. In many places we check periodically if the other end is still alive (custom code in libvchan_is_open()) - that's why various places use (p)select() with a relatively small timeout. The "official" way for getting notification about VM destruction is registering @releaseDomain xenstore watch (caveat: you don't get info which domain has been destroyed). I definitely don't want to introduce xenstore API to all kind of applications, but this is something that libvchan-xen could handle.

marmarek added a commit to marmarek/qubes-gui-daemon that referenced this issue Apr 5, 2020
Create a pidfile and take a lock on it. Prevent starting multiple
instances for the same VM.

Fixes QubesOS/qubes-issues#5760
@andrewdavidwong andrewdavidwong added the P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. label Apr 7, 2020
@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-audio-daemon-4.1.5-1.fc31 has been pushed to the r4.1 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-gui-daemon_4.1.5-1 has been pushed to the r4.1 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 stretch-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

marmarek added a commit to marmarek/qubes-gui-daemon that referenced this issue May 17, 2020
If the remote domain is killed, vchan may not get the notification. To
avoid hanging process in such a case, periodically check if vchan
connection is open (as other vchan applications do).

This partially reverts d0fcc6c.

Fixes QubesOS/qubes-issues#5760

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

Automated announcement from builder-github

The package qubes-gui-dom0-4.0.11-1.fc25 has been pushed to the r4.0 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-gui-dom0-4.0.11-1.fc25 has been pushed to the r4.0 stable repository for dom0.
To install this update, please use the standard update command:

sudo qubes-dom0-update

Or update dom0 via Qubes Manager.

Changes included in this update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: gui-virtualization P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. r4.0-dom0-stable r4.1-bullseye-cur-test r4.1-buster-cur-test r4.1-dom0-cur-test r4.1-fc29-cur-test r4.1-fc30-cur-test r4.1-fc31-cur-test r4.1-stretch-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