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 749987 - [PATCH] GDM Segfaults on monitor hotplug
[PATCH] GDM Segfaults on monitor hotplug
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2015-05-27 17:02 UTC by Richard Bradfield
Modified: 2015-05-27 17:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed fix (1.09 KB, patch)
2015-05-27 17:02 UTC, Richard Bradfield
committed Details | Review
GDB log with backtrace (3.75 KB, text/plain)
2015-05-27 17:04 UTC, Richard Bradfield
  Details

Description Richard Bradfield 2015-05-27 17:02:26 UTC
Created attachment 304089 [details] [review]
Proposed fix

GDM is segfaulting when I power on or otherwise hotplug my DisplayPort monitor.

>[   57.128701] gdm[3000]: segfault at 8 ip 00007f0ed70bba20 sp 00007fffd1bf9460 error 4 in gdm[7f0ed70a0000+5c000]

I've tracked the issue down to the new code for get_user_session_for_display introduced in e5a0e92f59e25.

To me, this looks like an inadvertent double-increment on the node pointer, so attached is a patch which fixes this and changes the loop structure to be slightly more self-explanatory.

Also attached will be a gdb log containing the backtrace from the core dump. I can upload the full core if further investigation is required.
Comment 1 Richard Bradfield 2015-05-27 17:04:24 UTC
Created attachment 304090 [details]
GDB log with backtrace
Comment 2 Richard Bradfield 2015-05-27 17:05:19 UTC
Proposed fix is tested and working on my machine, would appreciate a confirmation test. Thanks!
Comment 3 Jasper St. Pierre (not reading bugmail) 2015-05-27 17:22:31 UTC
Review of attachment 304089 [details] [review]:

Yeah, this is obviously correct. Nice catch, thanks!
Comment 4 Ray Strode [halfline] 2015-05-27 17:47:47 UTC
Yea, nice catch. Thank you very much!