GNOME Bugzilla – Bug 698168
gdm-simple-slave crashes after g-i-s launching changes in gdm 3.8.1
Last modified: 2013-04-17 11:45:48 UTC
gdm-simple-slave segfaults here with gdm-3.8.1-1.fc19, which appears to be a regression from the latest g-i-s launching changes. https://git.gnome.org/browse/gdm/commit/?id=fdc017ed0d2dd9d661c50202e651fa7c18ac86c4 https://git.gnome.org/browse/gdm/commit/?id=d7a4acc9bfbd6bcae76c4309183ee9419fcf50ce [27549.723376] gdm-simple-slav[14375]: segfault at 7fffee6c6f48 ip 000000317aa4786d sp 00007fffee6c6f50 error 6 in libc-2.17.so[317aa00000+1b5000] [27549.825620] gdm-simple-slav[14389]: segfault at 7fff751d4f40 ip 000000317aa47807 sp 00007fff751d4e30 error 6 in libc-2.17.so[317aa00000+1b5000] [27549.928297] gdm-simple-slav[14403]: segfault at 7fffed400ea0 ip 000000317aa47807 sp 00007fffed400d90 error 6 in libc-2.17.so[317aa00000+1b5000] [27550.030560] gdm-simple-slav[14417]: segfault at 7fff637cef60 ip 000000317aa47807 sp 00007fff637cee50 error 6 in libc-2.17.so[317aa00000+1b5000] [27550.234098] gdm-simple-slav[14431]: segfault at 7fff9aa4cfa8 ip 000000317aa4786d sp 00007fff9aa4cfb0 error 6 in libc-2.17.so[317aa00000+1b5000] +Apr 16 21:52:51 localhost systemd[1]: Started GNOME Display Manager. +Apr 16 21:52:52 localhost gdm[14462]: /usr/bin/xmodmap: unable to open display ':0' +Apr 16 21:52:52 localhost gdm[14462]: Unable to connect to display :0 +Apr 16 21:52:52 localhost gdm[14462]: Unable to connect to display :0 +Apr 16 21:52:52 localhost gdm[14462]: Unable to connect to display :0 +Apr 16 21:52:52 localhost gdm[14462]: Unable to connect to display :0 +Apr 16 21:52:52 localhost gdm[14462]: Unable to connect to display :0 +Apr 16 21:52:52 localhost gdm[14462]: Unable to connect to display :0 +Apr 16 21:52:52 localhost gdm[14462]: Unable to connect to display :0 +Apr 16 21:52:52 localhost gdm[14462]: Unable to connect to display :0 +Apr 16 21:52:52 localhost gdm[14462]: Unable to connect to display :0 +Apr 16 21:52:52 localhost gdm[14462]: Unable to connect to display :0 +Apr 16 21:52:52 localhost gdm[14462]: Unable to connect to display after 10 tries - bailing out +Apr 16 21:52:52 localhost gdm[14462]: Child process 14465 was already dead. +Apr 16 21:52:52 localhost gdm[14462]: Unable to kill slave process +Apr 16 21:52:52 localhost gdm[14462]: Child process 14465 was already dead. +Apr 16 21:52:52 localhost gdm[14462]: Unable to kill slave process +Apr 16 21:52:52 localhost gdm[14462]: GdmDisplay: display lasted 0.996660 seconds
I have poked at this a bit and it seems to be a race between accountsservice dbus calls and connecting to the display. If setup_session() is called before gdm_slave_connect_to_x11_display() + setup_server(), things start going wrong. Someone else might be able to say why they need to be called in this order; I don't know. I'm attaching a patch which fixes it for me. The patch uses locking logic similar to what gdm_simple_slave_start_session_when_ready() does, making sure we only connect to the display when both the server is ready, and the accountsservice dbus call has finished.
Created attachment 241697 [details] [review] simple-slave: Fix a race with accountsservice dbus calls Wait for both the accountsservice dbus calls to finish and the server to be ready before attempting to setup the session.
Review of attachment 241697 [details] [review]: Looks quite similar to the initial patch in https://bugzilla.gnome.org/show_bug.cgi?id=697594
Review of attachment 241697 [details] [review]: Patch looks good to me.
Thanks! Attachment 241697 [details] pushed as 3f27de7 - simple-slave: Fix a race with accountsservice dbus calls