GNOME Bugzilla – Bug 553915
gnome-keyboard-applet crashed with SIGSEGV in gkbd_indicator_reinit_ui()
Last modified: 2009-08-30 16:13:53 UTC
the bug has been opened on https://bugs.launchpad.net/ubuntu/+source/gnome-applets/+bug/273299 "Binary package hint: gnome-applets I resumed from hibernation this morning (first time after upgrading to the Intrepid alpha) to find this crash notice from the keyboard layout switcher, and my keyboard is back to just qwerty (was dvorak). gnome-applets 2.23.92-0ubuntu1
+ Trace 207387
*** Bug 553914 has been marked as a duplicate of this bug. ***
What is your XKB configuration? Is there any way to reproduce the crash without going to hibernation?
bug submitter reply "I have: * USA Dvorak * USA Dvorak international * USA International (with dead keys) * Arabic qwerty/digits where the second one is default. Here's gconftool -a /desktop/gnome/peripherals/keyboard/kbd: layouts = [us dvorak,us dvorak-intl,us intl,ara qwerty_digits] model = options = [grp grp:alts_toggle,grp grp:shift_caps_toggle,grp grp:sclk_toggle] (those big spaces are actually tabs within an entry) I'm going to try resetting to the default configuration."
new ubuntu comment "I can reproduce this bug by plugging in a Apple USB keyboard into a docked ThinkPad X61 tablet. gconftool -a /desktop/gnome/peripherals/keyboard/kbd layouts = [ch de_nodeadkeys,de nodeadkeys,us] model = evdev overrideSettings = true options = [eurosign eurosign:e,grp grp:sclk_toggle,grp_led grp_led:scroll,Compose key compose:caps,grp_led grp_led:caps,nbsp nbsp:level4]"
There is something in common. Whic is ... grp:sclk_toggle Would the issue disappear if some other method of switching is used? (I tried to reproduce it - no luck). Also, I just looked at xkeyboard-config. I cannot find that method of switching. Is there any distro-specific patch for that method?
the sclk_toggle is a debian patch apparently, I've asked the submitter if the issue still happens not using the sclk_toggle option
gkbd-indicator-test and gnome-screensaver-dialog crash the same way on intrepid when doing a french installation and having no GNOME xkb settings "279 if (short_group_name != NULL (gdb) bt full
+ Trace 208654
running gkbd-indicator-test using XKL_DEBUG=300 "[1224857106,160,xklavier_config_xkb.c:xkl_rules_set_load/] Loading rules from [/usr/share/X11/xkb/rules/evdev] [1224857106,200,xklavier_config_xkb.c:xkl_xkb_config_native_prepare/] keymap: (null) [1224857106,200,xklavier_config_xkb.c:xkl_xkb_config_native_prepare/] keycodes: evdev+aliases(qwerty) [1224857106,200,xklavier_config_xkb.c:xkl_xkb_config_native_prepare/] compat: complete [1224857106,200,xklavier_config_xkb.c:xkl_xkb_config_native_prepare/] types: complete [1224857106,200,xklavier_config_xkb.c:xkl_xkb_config_native_prepare/] symbols: pc+us+de:2+inet(evdev) [1224857106,200,xklavier_config_xkb.c:xkl_xkb_config_native_prepare/] geometry: pc(pc105) [1224857106,100,xklavier_config_xkb.c:xkl_xkb_multiple_layouts_supported/] !!! Multiple layouts ARE supported [1224857106,150,xklavier.c:xkl_engine_constructor/] Actual backend: XKB [1224857106,200,xklavier_xkb.c:xkl_xkb_load_all_info/] found 4 groups [1224857106,200,xklavier_xkb.c:xkl_xkb_load_all_info/] Group 3 has name [France - Alternative] [1224857106,200,xklavier_xkb.c:xkl_xkb_load_all_info/] Group 2 has name [-] [1224857106,200,xklavier_xkb.c:xkl_xkb_load_all_info/] Group 1 has name [-] [1224857106,200,xklavier_xkb.c:xkl_xkb_load_all_info/] Group 0 has name [-]" "[1224857106,100,xklavier_config.c:xkl_config_registry_load_from_file/] Loading XML registry from file /usr/share/X11/xkb/rules/evdev.xml [1224857106,150,gkbd-desktop-config.c:gkbd_desktop_config_load_from_gconf/] group_per_app: 1 [1224857106,150,gkbd-desktop-config.c:gkbd_desktop_config_load_from_gconf/] handle_indicators: 0 [1224857106,150,gkbd-desktop-config.c:gkbd_desktop_config_load_from_gconf/] layout_names_as_group_names: 1 [1224857106,150,gkbd-desktop-config.c:gkbd_desktop_config_load_from_gconf/] default_group: 0 [1224857106,150,gkbd-keyboard-config.c:gkbd_keyboard_config_copy_from_xkl_config/] Loaded Kbd model: [pc105] [1224857106,150,gkbd-keyboard-config.c:gkbd_keyboard_config_copy_from_xkl_config/] Loaded Kbd layout (with variant): [fr oss] [1224857106,100,gkbd-desktop-config.c:gkbd_desktop_config_get_lv_descriptions/] ids: [fr][oss] [1224857106,100,gkbd-desktop-config.c:gkbd_desktop_config_get_lv_descriptions/] description: [Fra][France][][Autre] total: 1"
Something is seriously wrong with this config. Why are there 4 groups if there is only one fr(oss) layout? What do you have in xorg.conf? Could you please attach the result of xkbcomp :0 -xkb out.xkb
Created attachment 121314 [details] the xkb configuration there is only some video option in the xorg.conf, no keyboard configuration $ xkbcomp :0 -xkb out.xkb Warning: Could not load keyboard geometry for :0 BadAlloc (insufficient resources for operation) Resulting keymap file will not describe geometry
That gets real nasty. Something bad with X configuration? It cannot load geometry - means either xk-c installation is broken somehow. Or X cannot report geometry through API. Either way it is odd. The file is very strange as well - there are clearly 4 groups while you only ask one - fr(oss). Next step - please try setxkbmap -model evdev -layout fr -variant oss -option '' -print and setxkbmap -model evdev -layout fr -variant oss -option '' -print | xkbcomp - -xkb out.xkb In my config, I see only 1 group (in out.xkb see xkb_symbols section). How many groups do you see?
$ setxkbmap -model evdev -layout fr -variant oss -option '' -print xkb_keymap { xkb_keycodes { include "evdev+aliases(azerty)" }; xkb_types { include "complete" }; xkb_compat { include "complete" }; xkb_symbols { include "pc+fr(oss)+inet(evdev)" }; xkb_geometry { include "pc(pc104)" }; };
Created attachment 121338 [details] the xkb config
Yes, that all looks perfect, as expected - one group. So, how happened that same configuration /model=evdev, layout(variant)=fr(oss)/ causes 4 groups to appear in Xorg? That's really odd. Do you have any ideas? Do you use something beside these parameters?
the bug is there on a stock intrepid candidate french installation without change or an on hardy upgraded to intrepid, setting some keyboard configuration in GNOME workaround the issue though, no idea about what xorg is doing though
calling "setxkbmap -model evdev -layout fr -variant oss -option ''" workaround the issue too
Sebastien, the gconf params provided above are clearly irrelevant to our current context. What is your configuration now? gconftool -a /desktop/gnome/peripherals/keyboard/kbd
$ gconftool -a /desktop/gnome/peripherals/keyboard/kbd layouts = [] model = options = []
Sebastien, now I am totally lost. How happened that empty configuration (= "g-s-d has nothing do initialize") and empty xorg.conf causes Xorg to load fr(oss) ???
the xorg configuration corresponds to command line xkb configuration, not sure how that's set exactly, I'll ask tomorrow how that's done exactly though
the keyboard is configured by using hal-set-property to set the input.xkb. values for the model, layout, variant, options and rules
The resolution (as discussed on IRC): 1. The root cause is in Xorg. It misconfigures XKB. 2. libgnomekbd should handle that broken environment nicely (as smoothly as possible), without crashes. #2 is committed. #1 has to be raised in xorg bugzilla.
I was told by Peter Huttere that this commit might have a fix: http://cgit.freedesktop.org/xorg/xserver/commit/?id=4808bdec45775342eb9a6352b41e4919e1a69279
xorg xserver 1.5.2 got above patch applied, but it changes nothing. After resume from suspend programs using libgnomekbd are crashing. libgnomekbd trunk seem to work better (no gnome-screensaver-dialog/gnome-keyboard-applet crash anymore), but i.e. gnome-keyboard-applet show some strange keyboard layouts (like ???).
oh, this is really evil. I've removed custom fdi hal configuration with definitions with custom XkbOptions and XkbLayout and now only "USA" layout appears (gnome-keyboard-applet) and can't be switched! Clicking on applet takes no effect at all. Even worse: % gconftool-2 -a /desktop/gnome/peripherals/keyboard/kbd layouts = [pl,de] model = evdev options = [grp grp:alts_toggle,grp grp:alt_shift_toggle] There is no "USA" layout defined...
Yes, those ??? layouts are caused by xorg. I can do nothing about them. What's in your "xprop -root | grep XKB" ? And "xkbcomp :0 -xkb out.xkb".
It looks like % xprop -root | grep XKB _XKB_RULES_NAMES_BACKUP(STRING) = "base", "evdev", "pl,de", "", "grp:alt_shift_toggle" _XKB_RULES_NAMES(STRING) = "base", "evdev", "pl,de", ",", "grp:alts_toggle,grp:alt_shift_toggle" before and after suspend. strange thing happens after suspend: % xkbcomp :0 -xkb out.xkb.aftersuspend Warning: Could not load keyboard geometry for :0 BadAlloc (insufficient resources for operation) Resulting keymap file will not describe geometry
Created attachment 121541 [details] xkbcomp output
Created attachment 121542 [details] xkbcomp uotput after resuming from suspend
To me it looks like the same xorg issue. Let's wait till xorg has it all sorted - then, if the issue perists, restart the investigation.
Opened a bug against xorg https://bugs.freedesktop.org/show_bug.cgi?id=18277
Dupe of http://bugs.freedesktop.org/show_bug.cgi?id=14373 See the commit in that bug
this patch is included in 1.5.2 and as mentioned above I'm using it already. The bug you've reported to fdo bugzilla has nothing to do with problem described in ubuntu bug and problems reported by me. I'll try to open xorg bug report soon.
Fryderyk: well, may be it is another case indeed. With the messy xorg xkb code I would be surprized to have only one issue.
*** Bug 560437 has been marked as a duplicate of this bug. ***
*** Bug 563437 has been marked as a duplicate of this bug. ***
*** Bug 575795 has been marked as a duplicate of this bug. ***
*** Bug 593557 has been marked as a duplicate of this bug. ***