After login to a Gnome session open a terminal and list all processes (ps ax). The "/usr/libexec/gnome-settings-daemon" is listed. Then try to switch to a console (Ctrl + Alt + F3). Now switch back to Gnome session (Ctrl + Alt + F7). Note that some icons (in the Gnome Panel) are gone. Open a terminal and look for gnome-settings-daemon process (ps ax| grep gnome-settings-daemon). The process can not be found any more. If I try to manually start the gnome-settings-daemon, the entire Gnome session get killed and the login screen pop-up again.
Created attachment 254261 [details] emerge info
I think I found the culprit: gpointing-device-settings. Since I wasn't able to re-start gnome-settings-daemon from a Gnome session, I use openbox. In this way I could run gdb attached to /usr/libexec/gnome-settings-daemon. The process started OK, but when I switched to a console (using Ctrl +Alt +F2) and then came back (Ctrl +Alt +F7) I got Program received signal SIGSEGV, Segmentation fault. 0x00007fffec0dd9b9 in ?? () from /usr/lib64/gnome-settings-daemon-2.0/libpointing-device.so #0 0x00007fffec0dd9b9 in ?? () from /usr/lib64/gnome-settings-daemon-2.0/libpointing-device.so #1 0x00007ffff601483c in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #2 0x00007ffff60160d8 in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #3 0x00007ffff60164ce in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #4 0x00007ffff6608ac1 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #5 0x00007ffff660c918 in ?? () from /usr/lib/libglib-2.0.so.0 #6 0x00007ffff660ce25 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #7 0x00007ffff7902b57 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #8 0x00000000004042aa in main (argc=1, argv=0x7fffffffddb8) at main.c:502 #0 0x00007fffec0dd9b9 in ?? () from /usr/lib64/gnome-settings-daemon-2.0/libpointing-device.so #1 0x00007ffff601483c in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #2 0x00007ffff60160d8 in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #3 0x00007ffff60164ce in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #4 0x00007ffff6608ac1 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #5 0x00007ffff660c918 in ?? () from /usr/lib/libglib-2.0.so.0 #6 0x00007ffff660ce25 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #7 0x00007ffff7902b57 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #8 0x00000000004042aa in main (argc=1, argv=0x7fffffffddb8) at main.c:502 Then I searched for the build having libpointing-device.so: equery b libpointing-device.so * Searching for libpointing-device.so ... gnome-extra/gpointing-device-settings-1.5.1-r1 (/usr/lib64/gnome-settings-daemon-2.0/libpointing-device.so) So I downgrade gpointing-device-settings-1.5.1-r1 to gpointing-device-settings-1.5.1. Everything is back to normal now. The gnome-settings-daemon is not crashing anymore.
Here is the backtrace with source code attached for gsd-pointing-device-plugin Starting program: /usr/libexec/gnome-settings-daemon --debug --no-daemon [Thread debugging using libthread_db enabled] [New Thread 0x7fffe9696710 (LWP 3272)] program received signal SIGSEGV, Segmentation fault. device_presence_filter (xevent=<value optimized out>, event=<value optimized out>, data=0x6683a0) at gsd-pointing-device-plugin.c:102 102 if (has_manager(plugin, device_info->name)) #0 device_presence_filter (xevent=<value optimized out>, event=<value optimized out>, data=0x6683a0) at gsd-pointing-device-plugin.c:102 #1 0x00007ffff601483c in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #2 0x00007ffff60160d8 in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #3 0x00007ffff60164ce in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #4 0x00007ffff6608ac1 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #5 0x00007ffff660c918 in ?? () from /usr/lib/libglib-2.0.so.0 #6 0x00007ffff660ce25 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #7 0x00007ffff7902b57 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #8 0x00000000004042aa in main (argc=1, argv=0x7fffffffddc8) at main.c:502
The issue is reproducible only on x86_64 architecture. In a x86 arch gpointing-device-settings-1.5.1-r1 doesn't produce a similar behavior. Maybe the issue is related to app-emulation/emul-linux-x86-gtklibs
My last comment can be ignored. I managed to get the same behavior on a x86 arch.
What version of gnome-settings-daemon are you using ? Also, could you get a proper backtrace ? http://www.gentoo.org/proj/en/qa/backtraces.xml
# eix -Iv gnome-settings-daemon * gnome-base/gnome-settings-daemon Available versions: 2.26.1-r2 (~)2.28.1 2.28.2 2.30.2 (~)2.30.2-r1 {debug libnotify pulseaudio} Installed versions: Version: 2.30.2-r1 Date: 01:03:16 AM 11/14/2010 USE: libnotify -debug -pulseaudio Best versions/slot: (~)2.30.2-r1 Homepage: http://www.gnome.org Description: Gnome Settings Daemon License: GPL-2 I got the backtrace following the guidelines from the link that you've mentioned. The only difference is that instead of attaching the log file, I just paste the content as in-line content. Could you please be more specific about the backtrace ?
Sorry, I was looking to have a proper backtrace for libraries belonging to gpointing-device-settings. I've recompile more packages with the the modified CFLAGS. Here is the new backtrace; Starting program: /usr/libexec/gnome-settings-daemon --debug --no-daemon [Thread debugging using libthread_db enabled] [New Thread 0x7fffe9696710 (LWP 27025)] Program received signal SIGSEGV, Segmentation fault. device_presence_filter (xevent=<value optimized out>, event=<value optimized out>, data=0x667ba0) at gsd-pointing-device-plugin.c:102 102 gsd-pointing-device-plugin.c: No such file or directory. in gsd-pointing-device-plugin.c #0 device_presence_filter (xevent=<value optimized out>, event=<value optimized out>, data=0x667ba0) at gsd-pointing-device-plugin.c:102 #1 0x00007ffff601484c in gdk_event_apply_filters (display=<value optimized out>, event=0x82e820, xevent=0x7fffffffd990, return_exposes=-336754675) at gdkevents-x11.c:351 #2 gdk_event_translate (display=<value optimized out>, event=0x82e820, xevent=0x7fffffffd990, return_exposes=-336754675) at gdkevents-x11.c:922 #3 0x00007ffff60160e8 in _gdk_events_queue (display=0x637000) at gdkevents-x11.c:2305 #4 0x00007ffff60164de in gdk_event_dispatch (source=<value optimized out>, callback=0, user_data=0x7fffebed880d) at gdkevents-x11.c:2366 #5 0x00007ffff6608ae1 in g_main_dispatch (context=0x6425e0) at gmain.c:1960 #6 IA__g_main_context_dispatch (context=0x6425e0) at gmain.c:2513 #7 0x00007ffff660c938 in g_main_context_iterate (context=0x6425e0, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2591 #8 0x00007ffff660ce45 in IA__g_main_loop_run (loop=0x82c730) at gmain.c:2799 #9 0x00007ffff7902b67 in IA__gtk_main () at gtkmain.c:1219 #10 0x00000000004042aa in main (argc=1, argv=0x7fffffffddc8) at main.c:502
Here is the backtrace with no optimization (-O0) Starting program: /usr/libexec/gnome-settings-daemon --debug --no-daemon [Thread debugging using libthread_db enabled] [New Thread 0x7fffe9511710 (LWP 1299)] Program received signal SIGSEGV, Segmentation fault. 0x00007fffebf65a1a in device_presence_filter (xevent=0x7fffffffd9c0, event=0x830720, data=0x669ba0) at gsd-pointing-device-plugin.c:102 102 gsd-pointing-device-plugin.c: No such file or directory. in gsd-pointing-device-plugin.c #0 0x00007fffebf65a1a in device_presence_filter (xevent=0x7fffffffd9c0, event=0x830720, data=0x669ba0) at gsd-pointing-device-plugin.c:102 #1 0x00007ffff5edb982 in gdk_event_apply_filters (xevent=0x7fffffffd9c0, event=0x830720, filters=0x669c40) at gdkevents-x11.c:351 #2 0x00007ffff5edc852 in gdk_event_translate (display=0x639000, event=0x830720, xevent=0x7fffffffd9c0, return_exposes=0) at gdkevents-x11.c:922 #3 0x00007ffff5edf4c3 in _gdk_events_queue (display=0x639000) at gdkevents-x11.c:2305 #4 0x00007ffff5edf6d8 in gdk_event_dispatch (source=0x644560, callback=0, user_data=0x0) at gdkevents-x11.c:2366 #5 0x00007ffff64e9623 in g_main_dispatch (context=0x6445e0) at gmain.c:1960 #6 0x00007ffff64eab26 in IA__g_main_context_dispatch (context=0x6445e0) at gmain.c:2513 #7 0x00007ffff64eafec in g_main_context_iterate (context=0x6445e0, block=1, dispatch=1, self=0x60c730) at gmain.c:2591 #8 0x00007ffff64eb783 in IA__g_main_loop_run (loop=0x82e730) at gmain.c:2799 #9 0x00007ffff784ca12 in IA__gtk_main () at gtkmain.c:1219 #10 0x0000000000404688 in main (argc=1, argv=0x7fffffffddd8) at main.c:502
Do you suffer the same problem on a new and fresh created user account?
Yes, actually that was one of the first think that I tried: creating a new account and check that old settings are not the root cause of the problem.
*** Bug 345373 has been marked as a duplicate of this bug. ***
Created attachment 257598 [details, diff] gpointing-device-settings-1.5.1-gsd-crash.patch I have been getting exactly the same crash (same backtrace), but on suspend/resume. It is due to a null pointer deref on line 102 of the (heavily patched) gsd-pointing-device-plugin.c in Gentoo's gpointing-device-settings-1.5.1-r1. Here is a patch that fixes the crash for me; it makes sure that the filter is run only if device_info is not NULL. This should probably be fixed quickly, because a crash-prone gnome-settings-daemon basically makes Gnome unusable.
Created attachment 257600 [details, diff] gpointing-device-settings-1.5.1-gsd-crash.patch Small whitespace fix for prettiness & OCD compliance.
Even though the patch works, I'm not sure whether it is the right thing to do. Why don't we get a device_info even though the fact that the device_presence_filter is called indicates that we should have one? Does somebody know whether we have no devices at all (in which case the device_presence_filter should not have been called in the first place) or we just don't get an XExtensionPointer? (which makes me wonder why we don't hit that bug on login)
*** Bug 353374 has been marked as a duplicate of this bug. ***
Created attachment 261230 [details] error log file I have the same problem . But I can not emerge gpointing-device-settings-1.5.1 . how to do with it ? thanks
*** Bug 351364 has been marked as a duplicate of this bug. ***
I have been experiencing this issue too. I did a bit of poking around in gdb and I have gathered the following information from one instance of the bug. Breakpoint 8, device_presence_filter (xevent=0x7fffffffda60, event=<value optimized out>, data=<value optimized out>) at gsd-pointing-device-plugin.c:98 98 gsd-pointing-device-plugin.c: No such file or directory. in gsd-pointing-device-plugin.c (gdb) p notify_event $13 = (XDevicePresenceNotifyEvent *) 0x7fffffffda60 (gdb) p notify_event->deviceid $14 = 6 (gdb) c Continuing. Breakpoint 9, gpds_xinput_utils_get_device_info_from_id (id=6, error=0x0) at gpds-xinput-utils.c:74 74 gpds-xinput-utils.c: No such file or directory. in gpds-xinput-utils.c (gdb) p device_infos[0] $15 = {id = 2, type = 0, name = 0x884590 "Virtual core pointer", num_classes = 2, use = 0, inputclassinfo = 0x884410} (gdb) p device_infos[1] $16 = {id = 3, type = 0, name = 0x8845a5 "Virtual core keyboard", num_classes = 1, use = 1, inputclassinfo = 0x884458} (gdb) p device_infos[4] $17 = {id = 6, type = 84, name = 0x8845f2 "Power Button", num_classes = 1, use = 3, inputclassinfo = 0x8844d0} So, the deviceid from the notify event is 6, which corresponds to the Power Button and not to the pointer device. That is, gpds_xinput_utils_get_device_info_from_id() is returning the correct value (NULL). Looking at the code for add_device_presence_filter() it calls gdk_window_add_filter(NULL, device_presence_filter, plugin). 'plugin' is just this plugin's context. According to the gtk docs for this gdk API [1], passing NULL to the first argument gets all events for all windows. And even the function name (that it's a filter) is a hint. To summarise, I think the patch by Alexandre Rostovtsev to simply do nothing in the case that we have a NULL device info return from gpds_xinput_utils_get_device_info_from_id() is correct. [1] http://www.gtk.org/api/2.6/gdk/gdk-Windows.html#gdk-window-add-filter
@Robert: brilliant, thanks! @Alexandre: thanks for the patch fix committed in 1.5.1-r2.