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 779199 - deadlock in GObject get_type initialization
deadlock in GObject get_type initialization
Status: RESOLVED DUPLICATE of bug 674885
Product: glib
Classification: Platform
Component: gobject
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2017-02-24 22:07 UTC by Christian Hergert
Modified: 2017-02-24 22:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Hergert 2017-02-24 22:07:57 UTC
Occasionally I get a deadlock on startup in Builder due to threads racing to initialize the GZlibDecompressor for access to GResources.

(gdb) bt

Thread 1 (Thread 0x7ffff7f1b000 (LWP 11484))

  • #0 syscall
    from /lib64/libc.so.6
  • #1 g_cond_wait
    at /home/christian/Projects/glib/glib/gthread-posix.c line 1395
  • #2 g_once_init_enter
    at /home/christian/Projects/glib/glib/gthread.c line 665
  • #3 g_zlib_decompressor_get_type
    at /home/christian/Projects/glib/gio/gzlibdecompressor.c line 102
  • #4 g_zlib_decompressor_new
    at /home/christian/Projects/glib/gio/gzlibdecompressor.c line 268
  • #5 g_resource_lookup_data
    at /home/christian/Projects/glib/gio/gresource.c line 735
  • #6 g_resources_lookup_data
    at /home/christian/Projects/glib/gio/gresource.c line 1042
  • #7 gtk_widget_class_set_template_from_resource
    at /home/christian/Projects/gtk+-3/gtk/gtkwidget.c line 17033
  • #8 gtk_dialog_class_init
    at /home/christian/Projects/gtk+-3/gtk/gtkdialog.c line 662
  • #9 gtk_dialog_class_intern_init
    at /home/christian/Projects/gtk+-3/gtk/gtkdialog.c line 241
  • #10 type_class_init_Wm
    at /home/christian/Projects/glib/gobject/gtype.c line 2232
  • #11 g_type_class_ref
    at /home/christian/Projects/glib/gobject/gtype.c line 2947
  • #12 warn_if_deprecated
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1388
  • #13 parse_declaration
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1530
  • #14 parse_declarations
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1582
  • #15 parse_ruleset
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1614
  • #16 parse_statement
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1643
  • #17 parse_stylesheet
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1659
  • #18 gtk_css_provider_load_internal
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1786
  • #19 parse_import
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1052
  • #20 parse_at_keyword
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1300
  • #21 parse_statement
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1641
  • #22 parse_stylesheet
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1659
  • #23 gtk_css_provider_load_internal
  • #24 gtk_css_provider_load_from_file
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1888
  • #25 gtk_css_provider_load_from_resource
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1960
  • #26 _gtk_css_provider_load_named
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 2141
  • #27 settings_update_theme
    at /home/christian/Projects/gtk+-3/gtk/gtksettings.c line 3228
  • #28 settings_init_style
    at /home/christian/Projects/gtk+-3/gtk/gtksettings.c line 1874
  • #29 gtk_settings_create_for_display
    at /home/christian/Projects/gtk+-3/gtk/gtksettings.c line 1908
  • #30 gtk_settings_get_for_display
    at /home/christian/Projects/gtk+-3/gtk/gtksettings.c line 1936
  • #31 gtk_settings_get_default
    at /home/christian/Projects/gtk+-3/gtk/gtksettings.c line 1972
  • #32 ide_css_provider_constructed
    at theming/ide-css-provider.c line 181
  • #33 g_object_new_internal
    at /home/christian/Projects/glib/gobject/gobject.c line 1823
  • #34 g_object_new_valist
    at /home/christian/Projects/glib/gobject/gobject.c line 2042
  • #35 g_object_new
    at /home/christian/Projects/glib/gobject/gobject.c line 1626
  • #36 ide_css_provider_new
    at theming/ide-css-provider.c line 47
  • #37 ide_theme_manager_init
    at theming/ide-theme-manager.c line 122
  • #38 g_type_create_instance
    at /home/christian/Projects/glib/gobject/gtype.c line 1866
  • #39 g_object_new_internal
    at /home/christian/Projects/glib/gobject/gobject.c line 1783
  • #40 g_object_newv
    at /home/christian/Projects/glib/gobject/gobject.c line 1930
  • #41 g_object_new
    at /home/christian/Projects/glib/gobject/gobject.c line 1623
  • #42 ide_theme_manager_new
    at theming/ide-theme-manager.c line 156
  • #43 ide_application_register_theme_overrides
    at application/ide-application.c line 105
  • #44 ide_application_startup
    at application/ide-application.c line 386
  • #45 g_cclosure_marshal_VOID__VOID
    at /home/christian/Projects/glib/gobject/gmarshal.c line 875
  • #46 g_type_class_meta_marshal
    at /home/christian/Projects/glib/gobject/gclosure.c line 997
  • #47 g_closure_invoke
    at /home/christian/Projects/glib/gobject/gclosure.c line 804
  • #48 signal_emit_unlocked_R
    at /home/christian/Projects/glib/gobject/gsignal.c line 3565
  • #49 g_signal_emit_valist
    at /home/christian/Projects/glib/gobject/gsignal.c line 3391
  • #50 g_signal_emit
    at /home/christian/Projects/glib/gobject/gsignal.c line 3447
  • #51 g_application_register
    at /home/christian/Projects/glib/gio/gapplication.c line 2049
  • #52 ide_application_local_command_line
    at application/ide-application-command-line.c line 425
  • #53 g_application_run
    at /home/christian/Projects/glib/gio/gapplication.c line 2350
  • #54 main
    at main.c line 103
(gdb)
Comment 1 Christian Hergert 2017-02-24 22:09:51 UTC
Sorry, that seemed to truncate the other threads that came after that call. Let's see if this works.

(gdb) thread  apply all bt

Thread 1 (Thread 0x7ffff7f1b000 (LWP 11484))

  • #0 syscall
    from /lib64/libc.so.6
  • #1 g_cond_wait
    at /home/christian/Projects/glib/glib/gthread-posix.c line 1395
  • #2 g_once_init_enter
    at /home/christian/Projects/glib/glib/gthread.c line 665
  • #3 g_zlib_decompressor_get_type
    at /home/christian/Projects/glib/gio/gzlibdecompressor.c line 102
  • #4 g_zlib_decompressor_new
    at /home/christian/Projects/glib/gio/gzlibdecompressor.c line 268
  • #5 g_resource_lookup_data
    at /home/christian/Projects/glib/gio/gresource.c line 735
  • #6 g_resources_lookup_data
    at /home/christian/Projects/glib/gio/gresource.c line 1042
  • #7 gtk_widget_class_set_template_from_resource
    at /home/christian/Projects/gtk+-3/gtk/gtkwidget.c line 17033
  • #8 gtk_dialog_class_init
    at /home/christian/Projects/gtk+-3/gtk/gtkdialog.c line 662
  • #9 gtk_dialog_class_intern_init
    at /home/christian/Projects/gtk+-3/gtk/gtkdialog.c line 241
  • #10 type_class_init_Wm
    at /home/christian/Projects/glib/gobject/gtype.c line 2232
  • #11 g_type_class_ref
    at /home/christian/Projects/glib/gobject/gtype.c line 2947
  • #12 warn_if_deprecated
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1388
  • #13 parse_declaration
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1530
  • #14 parse_declarations
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1582
  • #15 parse_ruleset
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1614
  • #16 parse_statement
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1643
  • #17 parse_stylesheet
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1659
  • #18 gtk_css_provider_load_internal
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1786
  • #19 parse_import
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1052
  • #20 parse_at_keyword
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1300
  • #21 parse_statement
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1641
  • #22 parse_stylesheet
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1659
  • #23 gtk_css_provider_load_internal
  • #24 gtk_css_provider_load_from_file
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1888
  • #25 gtk_css_provider_load_from_resource
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 1960
  • #26 _gtk_css_provider_load_named
    at /home/christian/Projects/gtk+-3/gtk/gtkcssprovider.c line 2141
  • #27 settings_update_theme
    at /home/christian/Projects/gtk+-3/gtk/gtksettings.c line 3228
  • #28 settings_init_style
    at /home/christian/Projects/gtk+-3/gtk/gtksettings.c line 1874
  • #29 gtk_settings_create_for_display
    at /home/christian/Projects/gtk+-3/gtk/gtksettings.c line 1908
  • #30 gtk_settings_get_for_display
    at /home/christian/Projects/gtk+-3/gtk/gtksettings.c line 1936
  • #31 gtk_settings_get_default
    at /home/christian/Projects/gtk+-3/gtk/gtksettings.c line 1972
  • #32 ide_css_provider_constructed
    at theming/ide-css-provider.c line 181
  • #33 g_object_new_internal
    at /home/christian/Projects/glib/gobject/gobject.c line 1823
  • #34 g_object_new_valist
    at /home/christian/Projects/glib/gobject/gobject.c line 2042
  • #35 g_object_new
    at /home/christian/Projects/glib/gobject/gobject.c line 1626
  • #36 ide_css_provider_new
    at theming/ide-css-provider.c line 47
  • #37 ide_theme_manager_init
    at theming/ide-theme-manager.c line 122
  • #38 g_type_create_instance
    at /home/christian/Projects/glib/gobject/gtype.c line 1866
  • #39 g_object_new_internal
    at /home/christian/Projects/glib/gobject/gobject.c line 1783
  • #40 g_object_newv
    at /home/christian/Projects/glib/gobject/gobject.c line 1930
  • #41 g_object_new
    at /home/christian/Projects/glib/gobject/gobject.c line 1623
  • #42 ide_theme_manager_new
    at theming/ide-theme-manager.c line 156
  • #43 ide_application_register_theme_overrides
    at application/ide-application.c line 105
  • #44 ide_application_startup
    at application/ide-application.c line 386
  • #45 g_cclosure_marshal_VOID__VOID
    at /home/christian/Projects/glib/gobject/gmarshal.c line 875
  • #46 g_type_class_meta_marshal
    at /home/christian/Projects/glib/gobject/gclosure.c line 997
  • #47 g_closure_invoke
    at /home/christian/Projects/glib/gobject/gclosure.c line 804
  • #48 signal_emit_unlocked_R
    at /home/christian/Projects/glib/gobject/gsignal.c line 3565
  • #49 g_signal_emit_valist
    at /home/christian/Projects/glib/gobject/gsignal.c line 3391
  • #50 g_signal_emit
    at /home/christian/Projects/glib/gobject/gsignal.c line 3447
  • #51 g_application_register
    at /home/christian/Projects/glib/gio/gapplication.c line 2049
  • #52 ide_application_local_command_line
    at application/ide-application-command-line.c line 425
  • #53 g_application_run
    at /home/christian/Projects/glib/gio/gapplication.c line 2350
  • #54 main
    at main.c line 103

Comment 2 Colin Walters 2017-02-24 22:22:59 UTC

*** This bug has been marked as a duplicate of bug 674885 ***