Unlock screen kills gnome-shell session unexpectedly
Description:
When unlocking a session (including when resuming from suspend), gnome-shell exits and terminates the entire user session (on Wayland).
This is from downstream issue: https://bugzilla.redhat.com/show_bug.cgi?id=1540102
The logs show:
Jan 30 10:11:34 gnome-session-binary[1624]: Unrecoverable failure in required component org.gnome.Shell.desktop
Jan 30 10:11:34 gnome-session-binary[1624]: WARNING: App 'org.gnome.Shell.desktop' exited with code 1
Jan 30 10:11:34 gnome-session[1624]: gnome-session-binary[1624]: WARNING: App 'org.gnome.Shell.desktop' exited with code 1
With no crash or backtrace of gnome-shell being reported, just an “exit 1”.
I managed to find a reproducer (pretty trivial):
- Lock the screen with Super+L
- Press Escape to open the unlock screen
- Press Escape to dismiss the unlock screen
- Repeat step 2 to 4 until crash (usually a couple of times suffice)
Breaking on _exit in gdb gives the following backtrace:
(gdb) bt
#0 0x00007f8f3fb1dea0 in __GI__exit (status=1) at ../sysdeps/unix/sysv/linux/_exit.c:27
#1 0x00007f8f3fa7db0b in __run_exit_handlers (status=status@entry=1, listp=<optimized out>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:98
#2 0x00007f8f3fa7dbaa in __GI_exit (status=status@entry=1) at exit.c:105
#3 0x00007f8f40b994f0 in gjs_callback_closure(ffi_cif*, void*, void**, void*) (cif=<optimized out>, result=<optimized out>, args=<optimized out>, data=0x55bfd3f2e5b0) at gi/function.cpp:419
#4 0x00007f8f3c588abf in ffi_closure_unix64_inner (closure=0x7f8f080009d0, rvalue=0x7ffd6f2c58a0, reg_args=0x7ffd6f2c57f0, argp=0x7ffd6f2c58c0 "p\223\207\327\277U") at ../src/x86/ffi64.c:670
#5 0x00007f8f3c588e86 in ffi_closure_unix64 () at ../src/x86/unix64.S:229
#6 0x00007f8f4217b2c4 in g_task_return_now (task=0x55bfd7879370 [GTask]) at gtask.c:1145
#7 0x00007f8f4217bce6 in g_task_return (task=0x55bfd7879370 [GTask], type=<optimized out>) at gtask.c:1203
#8 0x00007f8f421ba049 in reply_cb (connection=<optimized out>, res=<optimized out>, user_data=0x55bfd7879370) at gdbusproxy.c:2579
#9 0x00007f8f4217b2c4 in g_task_return_now (task=0x55bfd78795e0 [GTask]) at gtask.c:1145
#10 0x00007f8f4217bce6 in g_task_return (task=0x55bfd78795e0 [GTask], type=<optimized out>) at gtask.c:1203
#11 0x00007f8f421aecb9 in g_dbus_connection_call_done (source=<optimized out>, result=0x55bfd7879510, user_data=0x55bfd78795e0)
at gdbusconnection.c:5720
#12 0x00007f8f4217b2c4 in g_task_return_now (task=0x55bfd7879510 [GTask]) at gtask.c:1145
#13 0x00007f8f4217bce6 in g_task_return (task=0x55bfd7879510 [GTask], type=<optimized out>) at gtask.c:1203
#14 0x00007f8f4217c830 in g_task_return_new_error (task=task@entry=0x55bfd7879510 [GTask], domain=domain@entry=286, code=code@entry=19, format=format@entry=0x7f8f422252f5 "%s") at gtask.c:1811
#15 0x00007f8f421a8408 in send_message_data_deliver_error (task=0x55bfd7879510 [GTask], domain=286, code=19, message=0x7f8f42aea76e "Operation was cancelled") at gdbusconnection.c:1836
#16 0x00007f8f421a84af in send_message_with_reply_cancelled_idle_cb (user_data=user_data@entry=0x55bfd7879510) at gdbusconnection.c:1848
#17 0x00007f8f41bd0577 in g_idle_dispatch (source=0x55bfd792b7e0, callback=0x7f8f421a8480 <send_message_with_reply_cancelled_idle_cb>, user_data=0x55bfd7879510) at gmain.c:5486
#18 0x00007f8f41bd3b77 in g_main_dispatch (context=0x55bfd214fa40) at gmain.c:3142
#19 0x00007f8f41bd3b77 in g_main_context_dispatch (context=context@entry=0x55bfd214fa40) at gmain.c:3795
#20 0x00007f8f41bd3f20 in g_main_context_iterate (context=0x55bfd214fa40, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
at gmain.c:3868
#21 0x00007f8f41bd4232 in g_main_loop_run (loop=0x55bfd39bcbe0) at gmain.c:4064
#22 0x00007f8f400e87bc in meta_run () at core/main.c:648
#23 0x000055bfd04c042c in main (argc=<optimized out>, argv=<optimized out>) at ../src/main.c:530
Unfortunately, I am unable to provide the gjs callstack because thread has already exited at that point...
Edited by Olivier Fourdan