gnome control-center crashed with sigsegv in g_str_hash() whenever I try to add input sources

Bug #1933022 reported by Shibasish Paul
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-desktop
Fix Released
Unknown
gnome-desktop3 (Debian)
Fix Released
Unknown
gnome-desktop3 (Ubuntu)
Fix Released
High
Unassigned
Hirsute
Fix Released
High
Gunnar Hjalmarsson

Bug Description

[Impact]

If the dconf key show-all-sources is "true", any attempt to add new input sources via Settings results in a segfault. It means that users can't make use of the so-called "exotic" XKB keyboard layouts.

The proposed upload includes a cherry picked upstream commit which fixes the issue.

[Test Plan]

1. Enable show-all-sources:

   gsettings set org.gnome.desktop.input-sources show-all-sources true

2. Select Settings -> Region & Language and click the + button to add
   an input source.

-> Find that g-c-c crashes.

3. Install the gnome-desktop3 binaries from hirsute-proposed.

4. Repeat step 2.

-> Find that you are able to add an input source.

[Where problems could occur]

The change is a targeted fix to address the issue at hand. It was committed upstream on April 22, and no reported regression.

[Original description]

I've been facing the problems for about 9 months now. Back then I thought that maybe getting a new version would solve the problem, but turns out it didn't. Whenever I try to add some Input Sources from it just crashes.

Reproducing it is very easy: running gnome-control-center, then going to Input Sources settings and clicking Add(+) would generate the crash. But the weird thing is that I've been unable to reproduce it in VM. And I also tried to reinstall most of the packages which, I think if changed/misconfigured would cause this but it didn't help. I also tried to use debsums to give some clues but didn't find any.

After enough digging, this is what I can retrieve from gdb:

#0 g_str_hash (v=0x506) at ../../../glib/ghash.c:2333
        p = 0x506 <error: Cannot access memory at address 0x506>
        h = 5381
#1 0x00007ffff7c6e174 in g_hash_table_lookup_node (hash_return=<synthetic pointer>, key=0x506, hash_table=0x5555563a6180 = {...}) at ../../../glib/ghash.c:472
        node_hash = <optimized out>
        hash_value = <optimized out>
        have_tombstone = 0
        step = 0
        node_index = <optimized out>
        first_tombstone = 0
        node_hash = <optimized out>
        __func__ = "g_hash_table_lookup_extended"
#2 g_hash_table_lookup_extended (hash_table=0x5555563a6180 = {...}, lookup_key=lookup_key@entry=0x506, orig_key=orig_key@entry=0x0, value=value@entry=0x7fffffffcbb0) at ../../../glib/ghash.c:1548
        node_hash = <optimized out>
        __func__ = "g_hash_table_lookup_extended"
#3 0x00007ffff6f03013 in gnome_xkb_info_get_layout_info (self=<optimized out>, id=id@entry=0x506 <error: Cannot access memory at address 0x506>, display_name=display_name@entry=0x7fffffffcc10, short_name=short_name@entry=0x0, xkb_layout=xkb_layout@entry=0x0, xkb_variant=xkb_variant@entry=0x0) at ../libgnome-desktop/gnome-xkb-info.c:1042
        priv = 0x555556395600
        layout = 0x7ffff6262ba0 <main_arena>
        __func__ = "gnome_xkb_info_get_layout_info"
#4 0x00005555555fe467 in input_source_row_new (self=self@entry=0x5555568d22b0, type=type@entry=0x5555556dcac3 "xkb", id=id@entry=0x506 <error: Cannot access memory at address 0x506>) at ../panels/keyboard/cc-input-chooser.c:236
        display_name = 0x0
        row = 0x0
        widget = <optimized out>
#5 0x00005555555fe81d in add_rows_to_table (self=self@entry=0x5555568d22b0, info=info@entry=0x555556450320, list=0x555555c82100 = {...}, list@entry=0x555555c8bec0 = {...}, type=type@entry=0x5555556dcac3 "xkb", default_id=0x0) at ../panels/keyboard/cc-input-chooser.c:723
        table = 0x555556770000 = {[0x55555657bb00 "cm+mmuock"] = 0x555556ca91a0, [0x555556506340 "us+3l"] = 0x555556400920, [0x55555656f6f0 "ph+capewell-dvorak"] = 0x555556cb6f50, [0x55555660caf0 "us+dvorak-l"] = 0x555556ca9620, [0x55555656cd40 "gb+mac_intl"] = 0x555556cb6950, [0x55555650de80 "gh+gillbt"] = 0x555556cb61d0, [0x555556571540 "apl+aplx"] = 0x555556ca94a0, [0x5555565063a0 "us+3l-cros"] = 0x555556cb64d0, [0x5555565062b0 "us+carpalx-full-intl"] = 0x555556400aa0, [0x555556506070 "us+sun_type6"] = 0x555556cb6350, [0x555556505f50 "us+drix"] = 0x555556ca9320, [0x555556506b40 "cm+dvorak"] = 0x555556cb6dd0, [0x5555564faaf0 "us+dvp"] = 0x555556cb6650, [0x5555564faa80 "us+dvorak-classic"] = 0x5555564004a0, [0x5555564fad30 "us+olpc2"] = 0x555556400c20, [0x55555656f2d0 "ml+us-intl"] = 0x555556400620, [0x5555564f9c70 "eu"] = 0x555556400320, [0x555556506310 "us+carpalx-full-altgr-intl"] = 0x5555564007a0, [0x55555656c390 "gb+intl"] = 0x555556ca97a0, [0x555556506fc0 "ca+eng"] = 0x555556cb67d0, [0x5555565714a0 "apl+aplplusII"] = 0x555556400f20, [0x5555564fafb0 "us+norman"] = 0x555556400da0, [0x55555660ca90 "us+dvorak-intl"] = 0x555556cb6ad0, [0x555556506140 "us+carpalx-intl"] = 0x555556cb6c50}
        row = <optimized out>
        id = 0x506 <error: Cannot access memory at address 0x506>
#6 0x00005555555ffb78 in get_locale_infos (self=0x5555568d22b0) at ../panels/keyboard/cc-input-chooser.c:950
        country_code = 0x55555680eb50 "BW"
        simple_locale = 0x55555680eb70 "en_BW.UTF-8"
        tmp = 0x5555568acf70 "English (Botswana)"
        type = 0x0
        language_layouts = 0x555555c8bec0
        lang_code = 0x55555680eb30 "en"
        id = 0x0
        layouts_with_locale = 0x555556772e40
        info = 0x555556450320
        locale = 0x55555680e950
        all_layouts = 0x0
        locale_ids = 0x55555680e950
        l = <optimized out>
        self = 0x5555568d22b0
        error = 0x0
#7 cc_input_chooser_new (is_login=<optimized out>, xkb_info=<optimized out>, ibus_engines=<optimized out>) at ../panels/keyboard/cc-input-chooser.c:1068
        self = 0x5555568d22b0
        error = 0x0
#8 0x00005555555f6ebc in show_input_chooser (self=0x555556396200) at ../panels/keyboard/cc-input-list-box.c:443
        chooser = <optimized out>
#9 0x00007ffff7d7d61e in g_cclosure_marshal_VOID__OBJECTv (closure=0x55555639a220, return_value=<optimized out>, instance=<optimized out>, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x555556200930) at ../../../gobject/gmarshal.c:1910
        data1 = 0x555556396200
        data2 = <optimized out>
        callback = 0x5555555f6fe0 <input_row_activated_cb>
        arg0 = 0x555556277a50
        args_copy = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7fffffffd060, reg_save_area = 0x7fffffffcfa0}}
#10 0x00007ffff7d9c724 in _g_closure_invoke_va (param_types=0x555556200930, n_params=1, args=0x7fffffffcf80, instance=0x555556396200, return_value=<optimized out>, closure=<optimized out>) at ../../../gobject/gclosure.c:873
        marshal = <optimized out>
        marshal_data = <optimized out>
        in_marshal = 0
        real_closure = <optimized out>
        return_accu = <optimized out>
        accu = {g_type = 0x0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
        accumulator = 0x0
        emission = Python Exception <class 'TypeError'> can only concatenate str (not "NoneType") to str:
{next = 0x7fffffffd160, instance = 0x555556396200, ihint = {signal_id = 313, detail = 0, run_type = (G_SIGNAL_RUN_FIRST | G_SIGNAL_ACCUMULATOR_FIRST_RUN)}, state = EMISSION_RUN, chain_type = }
        signal_id = 313
        instance_type = <optimized out>
        emission_return = {g_type = 0x0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
        rtype = 0x4
        static_scope = 0
        fastpath_handler = <optimized out>
        closure = <optimized out>
        run_type = <optimized out>
        hlist = <optimized out>
        l = <optimized out>
        fastpath = 1
        instance_and_params = <optimized out>
        signal_return_type = <optimized out>
        param_values = <optimized out>
        node = <optimized out>
        i = <optimized out>
        n_params = <optimized out>
        __func__ = "g_signal_emit_valist"
#11 g_signal_emit_valist (instance=0x555556396200, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffcf80) at ../../../gobject/gsignal.c:3406
        return_accu = <optimized out>
        accu = {g_type = 0x0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
        accumulator = 0x0
        emission = Python Exception <class 'TypeError'> can only concatenate str (not "NoneType") to str:
{next = 0x7fffffffd160, instance = 0x555556396200, ihint = {signal_id = 313, detail = 0, run_type = (G_SIGNAL_RUN_FIRST | G_SIGNAL_ACCUMULATOR_FIRST_RUN)}, state = EMISSION_RUN, chain_type = }
        signal_id = 313
        instance_type = <optimized out>
        emission_return = {g_type = 0x0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
        rtype = 0x4
        static_scope = 0
        fastpath_handler = <optimized out>
        closure = <optimized out>
        run_type = <optimized out>
        hlist = <optimized out>
        l = <optimized out>
        fastpath = 1
        instance_and_params = <optimized out>
        signal_return_type = <optimized out>
        param_values = <optimized out>
        node = <optimized out>
        i = <optimized out>
        n_params = <optimized out>
        __func__ = "g_signal_emit_valist"
#12 0x00007ffff7d9c893 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../../../gobject/gsignal.c:3553
        var_args = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 0x7fffffffd060, reg_save_area = 0x7fffffffcfa0}}
#13 0x00007ffff7626199 in gtk_list_box_select_and_activate_full (grab_focus=1, row=0x555556277a50, box=0x555556396200) at ../../../../gtk/gtklistbox.c:1820
        focus_on_click = 1
        priv = 0x555556396010
#14 gtk_list_box_select_and_activate_full (grab_focus=1, row=0x555556277a50, box=0x555556396200) at ../../../../gtk/gtklistbox.c:1812
        focus_on_click = 1
        priv = 0x555556396010
#15 gtk_list_box_multipress_gesture_released (gesture=<optimized out>, n_press=1, x=<optimized out>, y=<optimized out>, box=0x555556396200) at ../../../../gtk/gtklistbox.c:2016
        focus_on_click = 1
        priv = 0x555556396010
#16 0x00007ffff77d264b in _gtk_marshal_VOID__INT_DOUBLE_DOUBLEv (closure=<optimized out>, return_value=<optimized out>, instance=<optimized out>, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x5555561382d0) at gtkmarshalers.c:4803
        data1 = <optimized out>
        data2 = <optimized out>
        callback = <optimized out>
        arg0 = 1286
        arg1 = 2.1137067449068142e-314
        arg2 = 1.4951811470334148e+248
        args_copy = {{gp_offset = 32, fp_offset = 80, overflow_arg_area = 0x7fffffffd340, reg_save_area = 0x7fffffffd280}}
#17 0x00007ffff7d9c724 in _g_closure_invoke_va (param_types=0x5555561382d0, n_params=3, args=0x7fffffffd260, instance=0x5555562f7780, return_value=<optimized out>, closure=<optimized out>) at ../../../gobject/gclosure.c:873
        marshal = <optimized out>
        marshal_data = <optimized out>
        in_marshal = 0
        real_closure = <optimized out>
        return_accu = <optimized out>
        accu = {g_type = 0x0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
        accumulator = 0x0
        emission = Python Exception <class 'TypeError'> can only concatenate str (not "NoneType") to str:
{next = 0x7fffffffd480, instance = 0x5555562f7780, ihint = {signal_id = 253, detail = 0, run_type = (G_SIGNAL_RUN_FIRST | G_SIGNAL_ACCUMULATOR_FIRST_RUN)}, state = EMISSION_RUN, chain_type = }
        signal_id = 253
        instance_type = <optimized out>
        emission_return = {g_type = 0x0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
        rtype = 0x4
        static_scope = 0
        fastpath_handler = <optimized out>
        closure = <optimized out>
        run_type = <optimized out>
        hlist = <optimized out>
        l = <optimized out>
        fastpath = 1
        instance_and_params = <optimized out>
        signal_return_type = <optimized out>
        param_values = <optimized out>
        node = <optimized out>
        i = <optimized out>
        n_params = <optimized out>
        __func__ = "g_signal_emit_valist"
#18 g_signal_emit_valist (instance=0x5555562f7780, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffd260) at ../../../gobject/gsignal.c:3406
        return_accu = <optimized out>
        accu = {g_type = 0x0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
        accumulator = 0x0
        emission = Python Exception <class 'TypeError'> can only concatenate str (not "NoneType") to str:
{next = 0x7fffffffd480, instance = 0x5555562f7780, ihint = {signal_id = 253, detail = 0, run_type = (G_SIGNAL_RUN_FIRST | G_SIGNAL_ACCUMULATOR_FIRST_RUN)}, state = EMISSION_RUN, chain_type = }
        signal_id = 253
        instance_type = <optimized out>
        emission_return = {g_type = 0x0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
        rtype = 0x4
        static_scope = 0
        fastpath_handler = <optimized out>
        closure = <optimized out>
        run_type = <optimized out>
        hlist = <optimized out>
        l = <optimized out>
        fastpath = 1
        instance_and_params = <optimized out>
        signal_return_type = <optimized out>
        param_values = <optimized out>
        node = <optimized out>
        i = <optimized out>
        n_params = <optimized out>
        __func__ = "g_signal_emit_valist"
#19 0x00007ffff7d9c893 in g_signal_emit (instance=instance@entry=0x5555562f7780, signal_id=<optimized out>, detail=detail@entry=0) at ../../../gobject/gsignal.c:3553
        var_args = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 0x7fffffffd340, reg_save_area = 0x7fffffffd280}}
#20 0x00007ffff75e6e4c in gtk_gesture_multi_press_end (gesture=gesture@entry=0x5555562f7780, sequence=sequence@entry=0x0) at ../../../../gtk/gtkgesturemultipress.c:287
        multi_press = 0x5555562f7780
        priv = 0x5555562f76d0
        current = 0x0
        x = 313
        y = 121
        interpreted = 1
        state = <optimized out>
#21 0x00007ffff7d832df in g_cclosure_marshal_VOID__BOXEDv (closure=0x555556123620, return_value=<optimized out>, instance=<optimized out>, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x55555613bbf0) at ../../../gobject/gmarshal.c:1686
        data1 = 0x5555562f7780
        data2 = <optimized out>
        callback = 0x7ffff75e6da0 <gtk_gesture_multi_press_end>
        arg0 = 0x0
        args_copy = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7fffffffd660, reg_save_area = 0x7fffffffd5a0}}
#22 0x00007ffff7d9c724 in _g_closure_invoke_va (param_types=0x55555613bbf0, n_params=1, args=0x7fffffffd580, instance=0x5555562f7780, return_value=<optimized out>, closure=<optimized out>) at ../../../gobject/gclosure.c:873
        marshal = <optimized out>
        marshal_data = <optimized out>
        in_marshal = 0
        real_closure = <optimized out>
        return_accu = <optimized out>
        accu = {g_type = 0x0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
        accumulator = 0x0
        emission = Python Exception <class 'TypeError'> can only concatenate str (not "NoneType") to str:
{next = 0x7fffffffd870, instance = 0x5555562f7780, ihint = {signal_id = 248, detail = 0, run_type = (G_SIGNAL_RUN_LAST | G_SIGNAL_ACCUMULATOR_FIRST_RUN)}, state = EMISSION_RUN, chain_type = }
        signal_id = 248
        instance_type = <optimized out>
        emission_return = {g_type = 0x0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
        rtype = 0x4
        static_scope = 0
        fastpath_handler = <optimized out>
        closure = <optimized out>
        run_type = <optimized out>
        hlist = <optimized out>
        l = <optimized out>
        fastpath = 1
        instance_and_params = <optimized out>
        signal_return_type = <optimized out>
        param_values = <optimized out>
        node = <optimized out>
        i = <optimized out>
        n_params = <optimized out>
        __func__ = "g_signal_emit_valist"
#23 g_signal_emit_valist (instance=0x5555562f7780, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffd580) at ../../../gobject/gsignal.c:3406
        return_accu = <optimized out>
        accu = {g_type = 0x0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
        accumulator = 0x0
        emission = Python Exception <class 'TypeError'> can only concatenate str (not "NoneType") to str:
{next = 0x7fffffffd870, instance = 0x5555562f7780, ihint = {signal_id = 248, detail = 0, run_type = (G_SIGNAL_RUN_LAST | G_SIGNAL_ACCUMULATOR_FIRST_RUN)}, state = EMISSION_RUN, chain_type = }
        signal_id = 248
        instance_type = <optimized out>
        emission_return = {g_type = 0x0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
        rtype = 0x4
        static_scope = 0
        fastpath_handler = <optimized out>
        closure = <optimized out>
        run_type = <optimized out>
        hlist = <optimized out>
        l = <optimized out>
        fastpath = 1
        instance_and_params = <optimized out>
        signal_return_type = <optimized out>
        param_values = <optimized out>
        node = <optimized out>
        i = <optimized out>
        n_params = <optimized out>
        __func__ = "g_signal_emit_valist"
#24 0x00007ffff7d9c893 in g_signal_emit (instance=instance@entry=0x5555562f7780, signal_id=<optimized out>, detail=detail@entry=0) at ../../../gobject/gsignal.c:3553
        var_args = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 0x7fffffffd660, reg_save_area = 0x7fffffffd5a0}}
#25 0x00007ffff75de78b in _gtk_gesture_set_recognized (sequence=0x0, recognized=0, gesture=0x5555562f7780) at ../../../../gtk/gtkgesture.c:346
        priv = <optimized out>
        priv = 0x5555562f7730
        has_matching_touchpoints = 0
#26 _gtk_gesture_check_recognized (gesture=gesture@entry=0x5555562f7780, sequence=sequence@entry=0x0) at ../../../../gtk/gtkgesture.c:387
        priv = 0x5555562f7730
        has_matching_touchpoints = 0
#27 0x00007ffff75e668b in gtk_gesture_handle_event (event=0x555556402a80, controller=0x5555562f7780) at ../../../../gtk/gtkgesture.c:778
        was_recognized = 1
        sequence = 0x0
        priv = 0x5555562f7730
        gesture = 0x5555562f7780
        source_device = <optimized out>
#28 gtk_gesture_handle_event (controller=0x5555562f7780, event=0x555556402a80) at ../../../../gtk/gtkgesture.c:713
        gesture = 0x5555562f7780
        source_device = <optimized out>
#29 0x00007ffff75e7293 in gtk_gesture_single_handle_event (controller=0x5555562f7780, event=0x555556402a80) at ../../../../gtk/gtkgesturesingle.c:222
        sequence = <optimized out>
        priv = 0x5555562f7710
        source_device = <optimized out>
        source = GDK_SOURCE_MOUSE
        button = <optimized out>
        i = <optimized out>
        retval = <optimized out>
        test_touchscreen = <optimized out>
#30 0x00007ffff75adec0 in gtk_event_controller_handle_event (controller=0x5555562f7780, event=0x555556402a80) at ../../../../gtk/gtkeventcontroller.c:230
        controller_class = 0x555556137fa0
        retval = 0
        __func__ = "gtk_event_controller_handle_event"
#31 0x00007ffff7781405 in _gtk_widget_run_controllers (widget=0x555556396200, event=0x555556402a80, phase=GTK_PHASE_BUBBLE) at ../../../../gtk/gtkwidget.c:7443
        controller_phase = <optimized out>
        next = 0x0
        data = 0x555556395120
        handled = 0
        priv = 0x555556396110
        l = <optimized out>
#32 0x00007ffff77c8898 in _gtk_marshal_BOOLEAN__BOXEDv (closure=0x555555b69280, return_value=0x7fffffffd8c0, instance=<optimized out>, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x555555b8a420) at gtkmarshalers.c:129
        data1 = 0x555556396200
        data2 = <optimized out>
        callback = 0x7ffff7781730 <gtk_widget_real_button_event>
        v_return = <optimized out>
        arg0 = 0x555556402a80
        args_copy = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7fffffffda50, reg_save_area = 0x7fffffffd990}}
        __func__ = "_gtk_marshal_BOOLEAN__BOXEDv"
#33 0x00007ffff7d9c724 in _g_closure_invoke_va (param_types=0x555555b8a420, n_params=1, args=0x7fffffffd970, instance=0x555556396200, return_value=<optimized out>, closure=<optimized out>) at ../../../gobject/gclosure.c:873
        marshal = <optimized out>
        marshal_data = <optimized out>
        in_marshal = 0
        real_closure = <optimized out>
        return_accu = <optimized out>
        accu = {g_type = 0x14, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
        accumulator = 0x555555bc8470
        emission = Python Exception <class 'TypeError'> can only concatenate str (not "NoneType") to str:
{next = 0x0, instance = 0x555556396200, ihint = {signal_id = 94, detail = 0, run_type = (G_SIGNAL_RUN_LAST | G_SIGNAL_ACCUMULATOR_FIRST_RUN)}, state = EMISSION_RUN, chain_type = }
        signal_id = 94
        instance_type = <optimized out>
        emission_return = {g_type = 0x14, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
        rtype = 0x14
        static_scope = 0
        fastpath_handler = <optimized out>
        closure = <optimized out>
        run_type = <optimized out>
        hlist = <optimized out>
        l = <optimized out>
        fastpath = 1
        instance_and_params = <optimized out>
        signal_return_type = <optimized out>
        param_values = <optimized out>
        node = <optimized out>
        i = <optimized out>
        n_params = <optimized out>
        __func__ = "g_signal_emit_valist"
#34 g_signal_emit_valist (instance=0x555556396200, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffd970) at ../../../gobject/gsignal.c:3406
        return_accu = <optimized out>
        accu = {g_type = 0x14, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
        accumulator = 0x555555bc8470
        emission = Python Exception <class 'TypeError'> can only concatenate str (not "NoneType") to str:
{next = 0x0, instance = 0x555556396200, ihint = {signal_id = 94, detail = 0, run_type = (G_SIGNAL_RUN_LAST | G_SIGNAL_ACCUMULATOR_FIRST_RUN)}, state = EMISSION_RUN, chain_type = }
        signal_id = 94
        instance_type = <optimized out>
        emission_return = {g_type = 0x14, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
        rtype = 0x14
        static_scope = 0
        fastpath_handler = <optimized out>
        closure = <optimized out>
        run_type = <optimized out>
        hlist = <optimized out>
        l = <optimized out>
        fastpath = 1
        instance_and_params = <optimized out>
        signal_return_type = <optimized out>
        param_values = <optimized out>
        node = <optimized out>
        i = <optimized out>
        n_params = <optimized out>
        __func__ = "g_signal_emit_valist"
#35 0x00007ffff7d9c893 in g_signal_emit (instance=instance@entry=0x555556396200, signal_id=<optimized out>, detail=detail@entry=0) at ../../../gobject/gsignal.c:3553
        var_args = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 0x7fffffffda50, reg_save_area = 0x7fffffffd990}}
#36 0x00007ffff778fb44 in gtk_widget_event_internal.part.0.lto_priv.0 (widget=0x555556396200, event=0x555556402a80) at ../../../../gtk/gtkwidget.c:7808
        signal_num = <optimized out>
        return_val = <optimized out>
        handled = 0
#37 0x00007ffff7631240 in propagate_event_up (topmost=<optimized out>, event=<optimized out>, widget=0x555556396200) at ../../../../gtk/gtkmain.c:2598
        tmp = <optimized out>
        handled_event = <optimized out>
        handled_event = 0
#38 propagate_event (widget=widget@entry=0x555556396200, event=event@entry=0x555556402a80, captured=captured@entry=0, topmost=topmost@entry=0x0) at ../../../../gtk/gtkmain.c:2701
        handled_event = 0
#39 0x00007ffff7631373 in gtk_propagate_event (widget=widget@entry=0x555556396200, event=event@entry=0x555556402a80) at ../../../../gtk/gtkmain.c:2735
        __func__ = "gtk_propagate_event"
#40 0x00007ffff76324fb in gtk_main_do_event (event=0x555556402a80) at ../../../../gtk/gtkmain.c:1921
        grab_widget = 0x555556396200
        window_group = 0x7fffe0041cb0
        rewritten_event = <optimized out>
        device = <optimized out>
        tmp_list = <optimized out>
        event_widget = <optimized out>
        topmost_widget = <optimized out>
        __func__ = "gtk_main_do_event"
#41 gtk_main_do_event (event=<optimized out>) at ../../../../gtk/gtkmain.c:1691
        __func__ = "gtk_main_do_event"
#42 0x00007ffff7313753 in _gdk_event_emit (event=0x555556402a80) at ../../../../gdk/gdkevents.c:73
#43 _gdk_event_emit (event=0x555556402a80) at ../../../../gdk/gdkevents.c:67
#44 0x00007ffff737a356 in gdk_event_source_dispatch (base=<optimized out>, callback=<optimized out>, data=<optimized out>) at wayland/../../../../../gdk/wayland/gdkeventsource.c:124
        source = <optimized out>
        display = <optimized out>
        event = 0x555556402a80
#45 0x00007ffff7c8a8eb in g_main_dispatch (context=0x555555ac5000) at ../../../glib/gmain.c:3337
        dispatch = 0x7ffff737a330 <gdk_event_source_dispatch>
        prev_source = 0x0
        begin_time_nsec = 0
        was_in_call = 0
        user_data = 0x0
        callback = 0x0
        cb_funcs = <optimized out>
        cb_data = <optimized out>
        need_destroy = <optimized out>
        source = 0x555555ad9990
        current = 0x555555ac2fe0
        i = 0
#46 g_main_context_dispatch (context=0x555555ac5000) at ../../../glib/gmain.c:4055
#47 0x00007ffff7cddd28 in g_main_context_iterate.constprop.0 (context=context@entry=0x555555ac5000, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4131
        max_priority = 2147483647
        timeout = 399
        some_ready = 1
        nfds = <optimized out>
        allocated_nfds = <optimized out>
        fds = 0x55555633f2d0
#48 0x00007ffff7c88023 in g_main_context_iteration (context=context@entry=0x555555ac5000, may_block=may_block@entry=1) at ../../../glib/gmain.c:4196
        retval = <optimized out>
#49 0x00007ffff7ea227d in g_application_run (application=0x5555560576f0, argc=-8988, argc@entry=1, argv=argv@entry=0x7fffffffde58) at ../../../gio/gapplication.c:2560
        arguments = 0x555556115130
        status = 0
        context = 0x555555ac5000
        acquired_context = <optimized out>
        __func__ = "g_application_run"
#50 0x00005555555b6b48 in main (argc=<optimized out>, argv=<optimized out>) at ../shell/main.c:65
        application = 0x5555560576f0

Here are the versions of the relevant packages:

gnome-control-center 1:40.0-1ubuntu1 amd64
libglib2.0-0 2.68.1-2 amd64
libglib2.0-0 2.68.1-2 i386
libgnome-desktop-3-19 3.38.5-1ubuntu3 amd64
libgtk-3-0 3.24.29-1ubuntu1 amd64
libgtk-3-0 3.24.29-1ubuntu1 i386

And this is not like that using the latest(not yet in main impish repo) pacakges and being in the Development Branch is causing the issue, as I already mentioned earlier. I just changed over to the Development branch for only 3 months now.

I am also thinking of raising an issue on this on gnome GitLab.
And for the time being, how can I get around this and add some Input Sources by, I don't know, changing some user configs?

Appreciate your help in advance

tags: added: ui
tags: removed: ui
tags: added: libglib libgtk
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I can't find any other reports of such a crash. Please report it to the developers at https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues

tags: added: impish
Revision history for this message
Sebastien Bacher (seb128) wrote :

There was a mention of a segfault following the fix from bug #1925792 , sounds like that could be a gnome-desktop issue

Revision history for this message
Sebastien Bacher (seb128) wrote :

Checking upstream it sounds like it could be https://gitlab.gnome.org/GNOME/gnome-desktop/-/issues/190 fixed by https://gitlab.gnome.org/GNOME/gnome-desktop/-/commit/aa7e3440 ... would you know how to rebuild a package with a patch or would you be able to try a ppa with a candidate fix?

affects: gnome-control-center (Ubuntu) → gnome-desktop3 (Ubuntu)
Changed in gnome-desktop3 (Ubuntu):
importance: Undecided → High
status: New → Incomplete
Revision history for this message
Shibasish Paul (shibasishpaul) wrote :

But seeing the version number seems like that I have the exact same version(40.0-1) installed. So doesn't that mean the patch should be applied already? But nonetheless I would want to try a candidate fix if I get one.

And about the bug, I think this is somehow related to dconf database because when I had tried to add a source with a newly created account on the same machine, it did work, didn't crash (Exactly that's why I had been unable to reproduce it in vm). And noticing that I tried resetting few values to default on the dconf database related to ibus and input-sources( and losing some input settings along the way) the bug vanished. So yeah it's fixed for me but I would be following up and will try to analyze exactly which key or keys triggers the bug and will let you know if I find any.

Furthermore, I don't know where but I can faintly remember that I saw something along the lines "Tried to access null vma" So that means it's a null pointer related bug too.

tags: added: dconf gio
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The stack trace is different but that's to be expected in cases like this.

That upstream fix landed after version 40.0 so no it won't be included in gnome-desktop3 version 40.0-1. And no release of Ubuntu has any version newer than 3.38.5 yet.

Changed in gnome-desktop3 (Ubuntu):
status: Incomplete → New
status: New → Fix Committed
tags: added: fixed-in-40.2 fixed-upstream
Revision history for this message
Shibasish Paul (shibasishpaul) wrote (last edit ):

So yeah, I finally found a way to reproduce it in any system up until version 40.0-1. Here's how:

1. Using gsettings or dconf editor, changing the /org/gnome/desktop/input-sources/show-all-sources key to true which is in org.gnome.desktop.input-sources schema and then going on to add(+) a new source causes the crash.

2. Alternatively using gui: installing gnome tweaks and then enabling "Show Extended Input Sources" from "Keyboard and Mouse" can generate the same segfault crash.

But the good thing is that as you said, there is a fix upstream and apparently it's landed in version 40.1-1 as I've tested it in Fedora 34 vm I've found it working properly. So waiting to find the updated packages in impish-proposed

and sorry! there was a miscommunication about the version number. I thought the fix had landed in 40.0-1 but rather it was the version the bug was found. And I have Pre-released updates turned on.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, confirmed that setting show-all-sources to true triggers the segfault and that git patch indicated fixes the issue

Changed in gnome-desktop3 (Ubuntu Hirsute):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
importance: Undecided → High
status: New → In Progress
description: updated
Changed in gnome-desktop3 (Debian):
status: Unknown → Fix Released
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Shibasish, or anyone else affected,

Accepted gnome-desktop3 into hirsute-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-desktop3/3.38.5-1ubuntu2~21.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-hirsute to verification-done-hirsute. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-hirsute. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in gnome-desktop3 (Ubuntu Hirsute):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-hirsute
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Successfully carried out the steps in the test plan using version 3.38.5-1ubuntu2~21.04.2 of libgnome-desktop-3-19 from hirsute-proposed.

tags: added: verification-done verification-done-hirsute
removed: verification-needed verification-needed-hirsute
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-desktop3 - 3.38.5-1ubuntu2~21.04.2

---------------
gnome-desktop3 (3.38.5-1ubuntu2~21.04.2) hirsute; urgency=medium

  * d/p/xkbinfo-only-insert-new-layouts-skip-over-duplicate-ones.patch:
    Fix segfault when adding input sources while show-all-sources is
    "true" (LP: #1933022).

 -- Gunnar Hjalmarsson <email address hidden> Mon, 05 Jul 2021 02:56:31 +0200

Changed in gnome-desktop3 (Ubuntu Hirsute):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for gnome-desktop3 has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Fixed in 40.2-1ubuntu1.

Changed in gnome-desktop3 (Ubuntu):
status: Fix Committed → Fix Released
Changed in gnome-desktop:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.