Bug 1925320

Summary: multiple pipewire processes ignore SIGTERM at reboot time, resulting in reboot delay
Product: [Fedora] Fedora Reporter: Chris Murphy <bugzilla>
Component: pipewireAssignee: Wim Taymans <wtaymans>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 34CC: brunovern.a, gregory.lee.bartholomew, mcatanza, vg.aetera, wtaymans, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pipewire-0.3.26-4.fc34 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-02 02:03:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
journal none

Description Chris Murphy 2021-02-04 21:00:09 UTC
Description of problem:

Long reboot hang appears to be due to user session pipewire ignoring SIGTERM. But I can't tell from the log if it's waiting on some other application or process that's improperly ignoring SIGTERM.


Version-Release number of selected component (if applicable):
systemd-247.3-1.fc34.x86_64
pipewire-0.3.20-2.fc34.x86_64


How reproducible:
Always if any user is logged into GNOME shell; if I merely reboot at gdm/login window, the problem doesn't happen.


Steps to Reproduce:
1. Boot Workstation Rawhide, login
2. Reboot or shutdown
3.

Actual results:

Hang


Expected results:

Everything should respond to SIGTERM within seconds, so reboot can proceed in a timely manner. Workstation WG is targeting 20s in the near term, but we want to get to 5s reboot times.
https://pagure.io/fedora-workstation/issue/163


Additional info:

Comment 1 Chris Murphy 2021-02-04 21:03:29 UTC
Created attachment 1755123 [details]
journal

This is the suspicious section. Just due to lowest PID, I'm most suspicious about pipewire-pulse not quitting on time, which might be what's holding up everyone else.

[  148.398470] systemd[1]: user: State 'stop-sigterm' timed out. Killing.
[  148.400940] systemd[1]: user: Killing process 1323 (systemd) with signal SIGKILL.
[  148.402317] systemd[1]: user: Killing process 2176 (dbus-broker-lau) with signal SIGKILL.
[  148.402935] systemd[1]: user: Killing process 2178 (dbus-broker) with signal SIGKILL.
[  148.403466] systemd[1]: user: Killing process 1733 (pipewire) with signal SIGKILL.
[  148.403569] systemd[1]: user: Killing process 1856 (pipewire-media-) with signal SIGKILL.
[  148.403651] systemd[1]: user: Killing process 1858 (pipewire-media-) with signal SIGKILL.
[  148.403732] systemd[1]: user: Killing process 1571 (pipewire-pulse) with signal SIGKILL.
[  148.407221] systemd[1]: user: Main process exited, code=killed, status=9/KILL
[  148.407363] systemd[1]: user: Killing process 1856 (pipewire-media-) with signal SIGKILL.
[  148.407644] systemd[1]: user: Failed with result 'timeout'.
[  148.407734] systemd[1]: user: Unit process 1856 (pipewire-media-) remains running after unit stopped.

Comment 2 Ben Cotton 2021-02-09 16:03:54 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 3 Vladislav Grigoryev 2021-04-28 14:34:14 UTC
The latest update solves the issue for me:
https://bodhi.fedoraproject.org/updates/FEDORA-2021-0ad27fd1a1

Comment 4 Fedora Update System 2021-04-29 07:57:08 UTC
FEDORA-2021-03756cf274 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-03756cf274

Comment 5 Fedora Update System 2021-04-29 17:10:49 UTC
FEDORA-2021-03756cf274 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-03756cf274`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-03756cf274

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2021-05-02 02:03:02 UTC
FEDORA-2021-03756cf274 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.