Bug 467844 - Bash processes hanging on shutdown
Summary: Bash processes hanging on shutdown
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Session Management (other bugs)
Version First Reported In: 5.27.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-27 07:56 UTC by Miroslav Jarý
Modified: 2025-01-09 20:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.2.0
Sentry Crash Report:


Attachments
plasmashell service status before shutdown (211.91 KB, image/png)
2023-03-27 07:56 UTC, Miroslav Jarý
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav Jarý 2023-03-27 07:56:59 UTC
Created attachment 157622 [details]
plasmashell service status before shutdown

SUMMARY
Whenever I try to shutdown my PC, the system hangs on "Stopping user for UID 1000". After further inspection of journal, it seems like it is waiting for all instances of /usr/bin/bash:

Aspire-5 systemd[791]: plasma-plasmashell.service: State 'final-sigterm' timed out. Killing.
Aspire-5 systemd[791]: plasma-plasmashell.service: Killing process 2913 (bash) with signal SIGKILL.
Aspire-5 systemd[791]: plasma-plasmashell.service: Killing process 3082 (bash) with signal SIGKILL.
Aspire-5 systemd[791]: plasma-plasmashell.service: Failed with result 'timeout'.

PIDs correspond to the PIDs in the attached screenshot.


SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.3
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.7-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz
Memory: 11,5 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Manufacturer: Acer
Product Name: Aspire A515-56
System Version: V1.26
Comment 1 Nate Graham 2023-04-05 00:10:00 UTC
Yes, it waits for processes to quit when sent the shutdown signal. If they don't quit, it can hang. Ultimately this is a bug in those apps/scripts. We could decide to be not nice and kill them after some timeout, but it might potentially cause data loss.
Comment 2 Nate Graham 2025-01-09 20:45:43 UTC
This workflow has been revisited since the bug report was opened, and now handled more gracefully with a prompt that lets the user decide what to do.