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 740666 - Mutex is never released on one path in GnomeDesktopThumbnailFactory
Mutex is never released on one path in GnomeDesktopThumbnailFactory
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: Thumbnail
git master
Other Linux
: Normal critical
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-11-25 00:54 UTC by Paul Wise
Modified: 2014-12-11 00:03 UTC
See Also:
GNOME target: ---
GNOME version: 3.13/3.14


Attachments
thumbnail: Fix a code path where the mutex is never unlocked (1.50 KB, patch)
2014-12-10 23:43 UTC, Philip Withnall
committed Details | Review

Description Paul Wise 2014-11-25 00:54:33 UTC
I got this random crash (SIGABRT) in totem 3.14.0-2 with GNOME 3.14 on Debian jessie. I don't recall what I was doing at the time, possibly trying to watch a youtube video or other video embedded into a web page. If the crash dump isn't useful, please close this bug.

$ gdb -batch -n -ex bt -ex 'thread apply all bt full' --core /var/crash/1000/18378-1000-1000-6-1416815741-chianamo--usr-bin-totem.core /usr/bin/totem
[New LWP 18378]
[New LWP 18382]
[New LWP 18379]
[New LWP 18393]
[New LWP 18535]
[New LWP 18955]
[New LWP 18956]
[New LWP 18381]
[New LWP 18383]
[New LWP 18384]
[New LWP 18385]
[New LWP 18390]
[New LWP 18386]
[New LWP 18599]
[New LWP 18380]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/totem'.
Program terminated with signal SIGABRT, Aborted.

Thread 1 (Thread 0x7f99bf89c9c0 (LWP 18378))

  • #0 __GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 56
  • #1 __GI_abort
    at abort.c line 89
  • #2 g_mutex_clear
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gthread-posix.c line 1301
  • #3 ??
    from /usr/lib/libgnome-desktop-3.so.10
  • #4 g_object_unref
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gobject/gobject.c line 3170
  • #5 totem_grilo_clear_icons
    at icon-helpers.c line 374
  • #6 totem_grilo_finalize
    at totem-grilo.c line 2475
  • #7 g_object_unref
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gobject/gobject.c line 3170
  • #8 gtk_stack_forall
    at /build/gtk+3.0-5i5HPl/gtk+3.0-3.14.4/./gtk/gtkstack.c line 1589
  • #9 gtk_container_destroy
    at /build/gtk+3.0-5i5HPl/gtk+3.0-3.14.4/./gtk/gtkcontainer.c line 1409
  • #10 g_closure_invoke
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gobject/gclosure.c line 768
  • #11 signal_emit_unlocked_R
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gobject/gsignal.c line 3669
  • #12 g_signal_emit_valist
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gobject/gsignal.c line 3309
  • #13 g_signal_emit
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gobject/gsignal.c line 3365
  • #14 gtk_widget_dispose
    at /build/gtk+3.0-5i5HPl/gtk+3.0-3.14.4/./gtk/gtkwidget.c line 11924
  • #15 g_object_run_dispose
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gobject/gobject.c line 1076
  • #16 gtk_box_forall
    at /build/gtk+3.0-5i5HPl/gtk+3.0-3.14.4/./gtk/gtkbox.c line 2558
  • #17 gtk_container_destroy
    at /build/gtk+3.0-5i5HPl/gtk+3.0-3.14.4/./gtk/gtkcontainer.c line 1409
  • #18 g_closure_invoke
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gobject/gclosure.c line 768
  • #19 signal_emit_unlocked_R
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gobject/gsignal.c line 3669
  • #20 g_signal_emit_valist
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gobject/gsignal.c line 3309
  • #21 g_signal_emit
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gobject/gsignal.c line 3365
  • #22 gtk_widget_dispose
    at /build/gtk+3.0-5i5HPl/gtk+3.0-3.14.4/./gtk/gtkwidget.c line 11924
  • #23 g_object_run_dispose
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gobject/gobject.c line 1076
  • #24 gtk_window_forall
    at /build/gtk+3.0-5i5HPl/gtk+3.0-3.14.4/./gtk/gtkwindow.c line 7936
  • #25 gtk_container_destroy
    at /build/gtk+3.0-5i5HPl/gtk+3.0-3.14.4/./gtk/gtkcontainer.c line 1409
  • #26 g_closure_invoke
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gobject/gclosure.c line 768
  • #27 signal_emit_unlocked_R
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gobject/gsignal.c line 3669
  • #28 g_signal_emit_valist
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gobject/gsignal.c line 3309
  • #29 g_signal_emit
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gobject/gsignal.c line 3365
  • #30 gtk_widget_dispose
    at /build/gtk+3.0-5i5HPl/gtk+3.0-3.14.4/./gtk/gtkwidget.c line 11924
  • #31 gtk_window_dispose
    at /build/gtk+3.0-5i5HPl/gtk+3.0-3.14.4/./gtk/gtkwindow.c line 2946
  • #32 gtk_application_window_dispose
    at /build/gtk+3.0-5i5HPl/gtk+3.0-3.14.4/./gtk/gtkapplicationwindow.c line 775
  • #33 g_object_run_dispose
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gobject/gobject.c line 1076
  • #34 gtk_widget_destroy
    at /build/gtk+3.0-5i5HPl/gtk+3.0-3.14.4/./gtk/gtkwidget.c line 4785
  • #35 totem_object_exit
    at totem-object.c line 1308
  • #36 main_window_destroy_cb
    at totem-object.c line 1318
  • #37 _gtk_marshal_BOOLEAN__BOXEDv
    at /build/gtk+3.0-5i5HPl/gtk+3.0-3.14.4/./gtk/gtkmarshalers.c line 130
  • #38 _g_closure_invoke_va
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gobject/gclosure.c line 831
  • #39 g_signal_emit_valist
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gobject/gsignal.c line 3218
  • #40 g_signal_emit
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gobject/gsignal.c line 3365
  • #41 gtk_widget_event_internal
    at /build/gtk+3.0-5i5HPl/gtk+3.0-3.14.4/./gtk/gtkwidget.c line 7773
  • #42 gtk_main_do_event
    at /build/gtk+3.0-5i5HPl/gtk+3.0-3.14.4/./gtk/gtkmain.c line 1632
  • #43 send_delete_event
    at /build/gtk+3.0-5i5HPl/gtk+3.0-3.14.4/./gtk/gtkwindow.c line 1313
  • #44 gdk_threads_dispatch
    at /build/gtk+3.0-5i5HPl/gtk+3.0-3.14.4/./gdk/gdk.c line 654
  • #45 g_main_dispatch
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c line 3111
  • #46 g_main_context_dispatch
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c line 3710
  • #47 g_main_context_iterate
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c line 3781
  • #48 g_main_context_iteration
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c line 3842
  • #49 g_application_run
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./gio/gapplication.c line 2282
  • #50 main
    at totem.c line 266

Comment 1 Philip Withnall 2014-12-10 23:43:05 UTC
Created attachment 292499 [details] [review]
thumbnail: Fix a code path where the mutex is never unlocked

Fix one unusual code path where the GnomeDesktopThumbnailFactory’s mutex
is not unlocked before the function returns. As well as the usual
deadlock issues, this would lead to an abort on shutdown with recent
GLib changes, as g_mutex_clear() would be called on the locked mutex,
which GLib now (correctly) complains about.
Comment 2 Philip Withnall 2014-12-10 23:46:03 UTC
This is a locking bug in libgnome-desktop.
Comment 3 Bastien Nocera 2014-12-10 23:47:18 UTC
Review of attachment 292499 [details] [review]:

Looks good, thanks!
Comment 4 Philip Withnall 2014-12-11 00:03:04 UTC
Attachment 292499 [details] pushed as 5b28350 - thumbnail: Fix a code path where the mutex is never unlocked