[Bug 2019776] Re: If gnome-shell is started directly (instead of through gnome-session), it might deadlock with no output to the screen
This bug was fixed in the package gnome-shell - 46.2-1ubuntu3 --- gnome-shell (46.2-1ubuntu3) oracular; urgency=medium * d/p/ubuntu-authd: Revert unwanted change causing ibus not to launch (LP: #2069381) gnome-shell (46.2-1ubuntu2) oracular; urgency=medium * debian/patches/ubuntu-authd: Properly handle new-password messages requests (LP: #2068080) * d/p/ubuntu-authd: Add translatable js files to POTFILES.in (LP: #2068912) * d/p: Do not call unsafe functions when spawning new processes (LP: #2019776) * d/p: Resize tray icon windows to respect their actor representation (LP: #2012388) * d/p: Do not make tray icons to take any input event directly (LP: #2012388) * debian/patches/ubuntu-authd: Properly handle new-password messages requests (LP: #2068080) * d/p/ubuntu-authd: Add translatable js files to POTFILES.in (LP: #2068912) * d/p: Do not call unsafe functions when spawning new processes (LP: #2019776) * d/p: Resize tray icon windows to respect their actor representation (LP: #2012388) * d/p: Do not make tray icons to take any input event directly (LP: #2012388) -- Marco Trevisan (Treviño) Fri, 14 Jun 2024 06:45:11 +0200 ** Changed in: gnome-shell (Ubuntu) Status: In Progress => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2019776 Title: If gnome-shell is started directly (instead of through gnome-session), it might deadlock with no output to the screen To manage notifications about this bug go to: https://bugs.launchpad.net/gnome-shell/+bug/2019776/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2019776] Re: If gnome-shell is started directly (instead of through gnome-session), it might deadlock with no output to the screen
** Description changed: + [ Impact ] + If gnome-shell is launched directly instead of launched through gnome- session, the process spawning `ibus-daemon` might cause deadlock and unable to start the graphics. Since `ibusManager.js` checks whether service `org.freedesktop.IBus.session.GNOME.service` exists. In our case with Ubuntu ubiquity, we've turned off `gnome-session.service` so that the check failed and gnome-shell spawns `ibus-daemon` after the check. + + [ Test case ] + + - In a terminal launch + - env XDG_RUNTIME_DIR=/tmp/nested-runtime \ +dbus-run-session gnome-shell --nested --wayland + - The shell should start without hanging + - Repeat this multiple times and ensure it works reliably + + [ Regression potential ] + + - Shell (and or its extensions) may not be able to spawn child processes + - Applications launched by the shell may inherit the rlimits of mutter + + --- I tried using gdb to gnome-shell and discovered it's hanging in a child process spawning `ibus-daemon`, but is still in child_setup of `Glib.spawn_async` function: ``` root@dell-desktop:/home/oem# cat /tmp/log == Stack trace for context 0x5584da793180 == #0 5584dbd2d478 i resource:///org/gnome/shell/misc/ibusManager.js:119 (2776aa47bfb0 @ 12) #1 5584dbd2d3a8 i resource:///org/gnome/shell/misc/ibusManager.js:114 (2776aa47bf60 @ 426) #2 5584dbd2d308 i resource:///org/gnome/shell/misc/ibusManager.js:90 (2776aa47bec0 @ 162) #3 5584dbd2d268 i self-hosted:689 (34e3dc212650 @ 15) ``` which is, in ibusManager.js: ``` - const [success_, pid] = GLib.spawn_async( - null, cmdLine, env, - GLib.SpawnFlags.SEARCH_PATH | GLib.SpawnFlags.DO_NOT_REAP_CHILD, - () => { - try { - global.context.restore_rlimit_nofile(); # <- here - } catch (err) { - } - } - ); + const [success_, pid] = GLib.spawn_async( + null, cmdLine, env, + GLib.SpawnFlags.SEARCH_PATH | GLib.SpawnFlags.DO_NOT_REAP_CHILD, + () => { + try { + global.context.restore_rlimit_nofile(); # <- here + } catch (err) { + } + } + ); ``` Further code tracing found out that the deadlock is not during the execution of the function (`restore_rlimit_nofile`) but the access to the GObject (probably `global.context`). Currently my propose to work around this issue is to add a 5 second `setTimeout` to the caller of `_spawn` function in `ibusManager.js`. I've lost debugging information but I can try reproducing the issue and give the backtrace from gdb if needed. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2019776 Title: If gnome-shell is started directly (instead of through gnome-session), it might deadlock with no output to the screen To manage notifications about this bug go to: https://bugs.launchpad.net/gnome-shell/+bug/2019776/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2019776] Re: If gnome-shell is started directly (instead of through gnome-session), it might deadlock with no output to the screen
** Tags added: fixed-in-gnome-shell-47 fixed-upstream ** Tags removed: fixed-in-gnome-shell-47 ** Tags added: fixed-in-gnome-shell-46.2 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2019776 Title: If gnome-shell is started directly (instead of through gnome-session), it might deadlock with no output to the screen To manage notifications about this bug go to: https://bugs.launchpad.net/gnome-shell/+bug/2019776/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2019776] Re: If gnome-shell is started directly (instead of through gnome-session), it might deadlock with no output to the screen
** Changed in: gnome-shell Status: New => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2019776 Title: If gnome-shell is started directly (instead of through gnome-session), it might deadlock with no output to the screen To manage notifications about this bug go to: https://bugs.launchpad.net/gnome-shell/+bug/2019776/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2019776] Re: If gnome-shell is started directly (instead of through gnome-session), it might deadlock with no output to the screen
** Also affects: gnome-shell (Ubuntu Noble) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2019776 Title: If gnome-shell is started directly (instead of through gnome-session), it might deadlock with no output to the screen To manage notifications about this bug go to: https://bugs.launchpad.net/gnome-shell/+bug/2019776/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2019776] Re: If gnome-shell is started directly (instead of through gnome-session), it might deadlock with no output to the screen
This is handled via https://gitlab.gnome.org/GNOME/gnome- shell/-/merge_requests/3293 ** Changed in: gnome-shell (Ubuntu) Importance: Undecided => Medium ** Changed in: gnome-shell (Ubuntu) Assignee: (unassigned) => Marco Trevisan (Treviño) (3v1n0) ** Changed in: gnome-shell (Ubuntu) Status: New => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2019776 Title: If gnome-shell is started directly (instead of through gnome-session), it might deadlock with no output to the screen To manage notifications about this bug go to: https://bugs.launchpad.net/gnome-shell/+bug/2019776/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs