After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 698168 - gdm-simple-slave crashes after g-i-s launching changes in gdm 3.8.1
gdm-simple-slave crashes after g-i-s launching changes in gdm 3.8.1
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-16 22:58 UTC by Kalev Lember
Modified: 2013-04-17 11:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
simple-slave: Fix a race with accountsservice dbus calls (4.20 KB, patch)
2013-04-16 23:12 UTC, Kalev Lember
committed Details | Review

Description Kalev Lember 2013-04-16 22:58:32 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
Comment 1 Kalev Lember 2013-04-16 23:08:04 UTC
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.
Comment 2 Kalev Lember 2013-04-16 23:12:29 UTC
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.
Comment 3 Colin Walters 2013-04-17 07:02:24 UTC
Review of attachment 241697 [details] [review]:

Looks quite similar to the initial patch in https://bugzilla.gnome.org/show_bug.cgi?id=697594
Comment 4 Colin Walters 2013-04-17 07:11:51 UTC
Review of attachment 241697 [details] [review]:

Patch looks good to me.
Comment 5 Kalev Lember 2013-04-17 11:45:45 UTC
Thanks!

Attachment 241697 [details] pushed as 3f27de7 - simple-slave: Fix a race with accountsservice dbus calls