fix(appimage): check mount exe links one at a time for uutils

- uutils readlink (Ubuntu 26.04+) aborts at the first unreadable /proc/<pid>/exe, so the keepalive released the mount early
- Add mount_busy helper that readlinks each link individually
- Add changelog fragment
This commit is contained in:
sudacode committed 2026-10-28 19:54:04 -07:00
1 parent 33dceabc3e
commit 586d7950cf
2 files changed
+15 -1

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
type: fixed
area: linux
- Fixed AppImage builds on Ubuntu 26.04+ (uutils coreutils) releasing their mount before Chromium child processes finished shutting down, which brought back "Service Crash" notifications on quit.
+11 -1
View File
@@ -52,13 +52,23 @@ if [ -z "$app_run" ]; then
kill "$holder" 2>/dev/null
run_direct "$@"
fi
# One readlink per link: uutils readlink (Ubuntu 26.04+) aborts at the first
# unreadable operand, and other users' /proc/<pid>/exe are always unreadable.
mount_busy() {
for exe in /proc/[0-9]*/exe; do
case "$(readlink "$exe" 2>/dev/null)" in
"$mount_point"/*) return 0 ;;
esac
done
return 1
}
APPDIR="$mount_point" "$app_run" "$@"
rc=$?
# Do not release the mount while any process still executes from it; releasing
# early SIGBUSes Chromium children that are mid-shutdown.
tries=0
while [ "$tries" -lt 100 ]; do
if readlink /proc/[0-9]*/exe 2>/dev/null | grep -qF "$mount_point/"; then
if mount_busy; then
sleep 0.1
tries=$((tries + 1))
else