Public bug reported:

When attempting a bulk file upload (e.g. 600+ images) via a sandboxed
application such as Snap Firefox, `xdg-document-portal` encounters a
**self-deadlock on a non-recursive mutex (`db`) triggered by nested
event loop reentrancy**.

This frozen state causes:
1. All file registration requests to block indefinitely until the 25-second 
D-Bus timeout expires (`Failed to register <uri>: Timeout was reached`).
2. Indefinite leakage of file descriptors in `xdg-document-portal` because 
pending `GDBusMethodInvocation` instances are never completed or unreferenced.
3. Total failure of `SIGTERM` signal handling (`systemctl --user stop 
xdg-document-portal` hangs) because signal callbacks are dispatched via the 
event loop, while the main thread is suspended in a kernel futex wait.
4. Cascading unresponsiveness and crashes of Wayland clients (e.g., Google 
Chrome crashing with `SIGSEGV` in Ozone-Wayland) due to D-Bus starvation when 
`xdg-desktop-portal` blocks during initialization while querying 
`org.freedesktop.portal.Documents`.

Please consider backporting the fixes from
https://github.com/flatpak/xdg-desktop-portal/pull/2134 to actively
maintained Ubuntu branches.

ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: xdg-desktop-portal 1.21.1+ds-1ubuntu3
ProcVersionSignature: Ubuntu 7.0.0-30.30-generic 7.0.12
Uname: Linux 7.0.0-30-generic x86_64
ApportVersion: 2.34.1-0ubuntu0.1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Mon Sep  7 19:42:52 2026
InstallationDate: Installed on 2025-12-02 (280 days ago)
InstallationMedia: Ubuntu 25.10 "Questing Quokka" - Release amd64 (20251007)
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/usr/bin/fish
 TERM=tmux-256color
 XDG_RUNTIME_DIR=<set>
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: xdg-desktop-portal
UpgradeStatus: Upgraded to resolute on 2026-05-14 (116 days ago)

** Affects: xdg-desktop-portal (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug resolute wayland-session

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to xdg-desktop-portal in Ubuntu.
https://bugs.launchpad.net/bugs/2166726

Title:
  xdg-desktop-portal deadlocks when selecting many files in snap Firefox

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xdg-desktop-portal/+bug/2166726/+subscriptions


-- 
desktop-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to