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 615832 - gnome-settings-daemon crashed with SIGSEGV in xkl_engine_ensure_vtable_inited()
gnome-settings-daemon crashed with SIGSEGV in xkl_engine_ensure_vtable_inited()
Status: RESOLVED FIXED
Product: libgnomekbd
Classification: Core
Component: Indicator
2.30.x
Other Linux
: Normal normal
: ---
Assigned To: libgnomekbd maintainers
Sergey V. Udaltsov
Depends on:
Blocks:
 
 
Reported: 2010-04-15 10:46 UTC by Sebastien Bacher
Modified: 2010-06-22 20:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Debug log at level 250 (187.19 KB, text/plain)
2010-06-21 02:01 UTC, Louis Simard
Details
Valgrind log (6.22 KB, text/x-log)
2010-06-22 00:49 UTC, Louis Simard
Details
gdb backtrace (5.40 KB, text/plain)
2010-06-22 01:00 UTC, Louis Simard
Details

Description Sebastien Bacher 2010-04-15 10:46:14 UTC
The bug has been opened on https://bugs.launchpad.net/bugs/546927

"switched the theme in 'Appearance', then came the crash (new theme was visible just a fraction of a second)

  • #0 xkl_engine_ensure_vtable_inited
    at xklavier.c line 508
  • #1 xkl_engine_get_num_groups
    at xklavier.c line 565
  • #2 gkbd_status_fill
    at gkbd-status.c line 110
  • #3 gkbd_status_reinit_ui
    at gkbd-status.c line 328
  • #4 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #5 ??
    from /usr/lib/libgobject-2.0.so.0
  • #6 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #7 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #8 ??
    from /usr/lib/libgobject-2.0.so.0
  • #9 g_object_notify
    from /usr/lib/libgobject-2.0.so.0
  • #10 ??
    from /usr/lib/libgtk-x11-2.0.so.0
  • #11 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #12 ??
    from /usr/lib/libgdk-x11-2.0.so.0
  • #13 g_main_context_dispatch
    from /lib/libglib-2.0.so.0
  • #14 ??
    from /lib/libglib-2.0.so.0
  • #15 g_main_loop_run
    from /lib/libglib-2.0.so.0
  • #16 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #17 main
    at main.c line 502

Comment 1 Sergey V. Udaltsov 2010-04-19 10:59:21 UTC
Would it be possible to run (and crash!) g-s-d with --nodaemon and XKL_DEBUG=160? Please attach the resulting output here (especially the lines before the crash).
Comment 2 Sergey V. Udaltsov 2010-05-26 00:07:42 UTC
I hope it is fixed in the latest git version. Could you please check?
Comment 3 Louis Simard 2010-06-21 01:00:56 UTC
Latest git's autogen.sh script asks to download

ftp://ftp.gtk.org/pub/gtk/v2.2/glib-2.2.0.tar.gz

, which doesn't exist. (FTP error 550: Unable to change directory)
Comment 4 Louis Simard 2010-06-21 01:03:23 UTC
New comment from the Launchpad bug:

-- Quote: Cynthia Gauthier

Instructions for reproducing this bug:

1. Boot Ubuntu 10.04 from the LiveCD. Don't change the language; leave it as English. This will make the default keyboard layout "USA" later.
2. Wait for the GNOME desktop to fully load.
3. System > Preferences > Keyboard. Select the Layouts tab, add a random layout, then remove "USA". Click Close. (Not removing the first layout works around this bug.)
4. System > Preferences > Appearance. Change ANYTHING. (Change the theme, or the desktop background, or the font.)
5. Asynchronous crash of gnome-settings-daemon. It takes 5 seconds usually, but after this, the theme changes to something like Redmond in all applications.

I think "XKL_DEBUG=160 gnome-settings-daemon --no-daemon" should be typed before Step 3 above.

-- Quote: End
Comment 5 Louis Simard 2010-06-21 02:01:44 UTC
Created attachment 164190 [details]
Debug log at level 250

Using the instructions quoted above, libgnomekbd version 2.30.1-0ubuntu1 under Ubuntu 10.04, and a debug log at level 250 for good measure, here's the information requested in April.

[At line 1424, the X server notifies gnome-settings-daemon that there's a change in keyboard layouts. I deleted USA [seen at line 927 when gnome-settings-daemon was loading] and kept Canada, per the instructions.

At line 1678, Appearance Preferences is opening.

At line 1794, I then click on the theme "Radiance" to change to it. gnome-settings-daemon crashes after emitting 4 critical GConf messages on standard error.]
Comment 6 Sergey V. Udaltsov 2010-06-21 19:10:12 UTC
Thanks for the update, I will try to analyze the trace.

> Latest git's autogen.sh script asks to download
> ftp://ftp.gtk.org/pub/gtk/v2.2/glib-2.2.0.tar.gz
That's an issue with gnome-autogen.
Comment 7 Sergey V. Udaltsov 2010-06-21 19:22:12 UTC
The trace is somewhat strange, especially the fact that it crashes with gconf error messages. I suspect some memory corruption. Would you be able to run the g-s-d with valgrind? And gdb - to get the stacktrace? 

I am asking because it looks like the original bug, about vtable (and its stacktrace) is irrelevant to that crash after "Appearance".
Comment 8 Louis Simard 2010-06-21 19:57:48 UTC
The original bug from Launchpad was triggered by going to Appearance Preferences and choosing a new theme; this is what caused the crash in xkl_engine_ensure_vtable_inited. Triggering the bug made Apport (automatic crash reporter in Ubuntu) redirect me to that bug on Launchpad. I'm fairly certain that they're the same bug because of that.

I'll see if I can get a stacktrace with symbols and a Valgrind log.
Comment 9 Sergey V. Udaltsov 2010-06-21 20:12:16 UTC
I see. Well, since I do not know the cause yet, I cannot make any final statement.

I just thought that non-initialized state that potentially could cause the crash in vtable_inited method does not last long enough - while your trace is fairly long. Of cause, in case of memory corruption, everything is possible. That's why I am asking about valgrind
Comment 10 Louis Simard 2010-06-22 00:49:39 UTC
Created attachment 164269 [details]
Valgrind log

"Access not within mapped region at address 0xC"
Comment 11 Louis Simard 2010-06-22 01:00:33 UTC
Created attachment 164270 [details]
gdb backtrace

I don't see how to mark an attachment as being a stack trace in Bugzilla, so apologies if this file doesn't show up as a Trace 2226whatever... :)
Comment 12 Sergey V. Udaltsov 2010-06-22 19:59:47 UTC
Great! engine = NULL. I looked at the code, I think now I know what it is. Thank you very much! Going to fix it.
Comment 13 Sergey V. Udaltsov 2010-06-22 20:51:44 UTC
Please apply this patch:

http://git.gnome.org/browse/libgnomekbd/commit/?h=gnome-2-30&id=4486514c573d609fc40bd142f78631acfe632c01

Going to release 2.30.2 tonight