GNOME Bugzilla – Bug 656550
gnome-settings-daemon crashed with SIGSEGV in gdk_display_get_event()
Last modified: 2012-09-03 16:57:28 UTC
this report has been filed here: https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/814473 "This comes up after a graphical lock-up. The event is just like a Suspend action and needs to press the power button to resume." ".
+ Trace 228092
Thread 2 (Thread 1533)
Thread 1 (Thread 1528)
Likely fixed with newer versions of GTK+. Can you still reproduce with GTK+ 3.1.18?
I am still seeing it with 3.2.0
I also see it with a up to date fedora 16. however, it only happen on my macbook. I take my laoptop, open it, type my password and after a few moment, the mouse no longer work, and the gnome-setting -daemon has crashed. I was able to run gdb in screen to get it. I suspect it to be linked to the following part of the dmesg : [ 8574.563206] PM: resume of devices complete after 2349.720 msecs [ 8574.563365] PM: Finishing wakeup. [ 8574.563367] Restarting tasks ... done. [ 8574.602268] video LNXVIDEO:00: Restoring backlight state [ 8574.784108] usb 5-1: USB disconnect, device number 9 [ 8574.812740] sky2 0000:01:00.0: eth0: enabling interface [ 8574.813102] ADDRCONF(NETDEV_UP): eth0: link is not ready [ 8574.824164] ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 8575.243039] usb 5-1: new full speed USB device number 10 using uhci_hcd [ 8575.412853] usb 5-1: New USB device found, idVendor=05ac, idProduct=1000 [ 8575.412861] usb 5-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 8575.437283] input: HID 05ac:1000 as /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.0/input/input20 [ 8575.437682] generic-usb 0003:05AC:1000.000B: input,hidraw2: USB HID v1.11 Keyboard [HID 05ac:1000] on usb-0000:00:1d.3-1/input0 [ 8575.471388] input: HID 05ac:1000 as /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.1/input/input21 [ 8575.471996] generic-usb 0003:05AC:1000.000C: input,hidraw3: USB HID v1.11 Mouse [HID 05ac:1000] on usb-0000:00:1d.3-1/input1 [ 8575.789084] usb 5-1: USB disconnect, device number 10 [ 8575.866846] gnome-settings-[4632]: segfault at 8 ip 49e78ddf sp bfb21540 error 4 in libgdk-3.so.0.200.1[49e3f000+76000] [ 8576.014074] usb 5-1: new full speed USB device number 11 using uhci_hcd [ 8576.201840] usb 5-1: New USB device found, idVendor=05ac, idProduct=8205 [ 8576.201844] usb 5-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 it seems usb is disconnected briefly, and this trigger the stack trace. I see this with gtk3-3.2.1-1.fc16.i686 and gnome-settings-daemon-3.2.1-1.fc16.i686. And since gdb prevent the crash, I didn't lose my touchpad. Here is the stacktrace : Program received signal SIGSEGV, Segmentation fault. add_device (device_manager=0x9152a28 [GdkX11DeviceManagerXI2], dev=0x0, emit_signal=1) at gdkdevicemanager-xi2.c:310 310 device = create_device (GDK_DEVICE_MANAGER (device_manager), display, dev); (gdb) bt
+ Trace 228932
The stack trace seems to imply that libXI do not return a valid value in handle_hierarchy_changed, and that's the problem. According to gdb : (gdb) l 589 584 585 for (i = 0; i < ev->num_info; i++) 586 { 587 if (ev->info[i].flags & XIDeviceEnabled) 588 { 589 info = XIQueryDevice (xdisplay, ev->info[i].deviceid, &ndevices); 590 add_device (device_manager, &info[0], TRUE); 591 XIFreeDeviceInfo (info); 592 } 593 else if (ev->info[i].flags & XIDeviceDisabled) (gdb) p ndevices $3 = -1 (gdb) XIQueryDevice did return a error and the library do not check this case. After quickly looking at the source code, this could be a race condition, since there is just 3 errors case and none seems obvious to me.
*** Bug 665353 has been marked as a duplicate of this bug. ***
last dup at 3.2.x
FWIW https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/906471 is this crash on gnome-settings-daemon 3.2.2-0ubuntu5 during an "Adobe Flash hogging CPU" situation.
Created attachment 205432 [details] [review] Patch to handle XIQueryDevice Here's a patch that should fix the bug. I'm not able to reproduce this bug reliably, so I can't really test the patch though.
The patch is not against master - we already have a check there.
Commit 9b967ab8aff46b79494d75a3129fa8780545ecd1 should fix this and was not present in 3.2.0, and it looks like all the crashers in the Launchpad report are with 3.2.0. I'm going to close this as FIXED, please reopen if you can still reproduce with a newer version of GTK.