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 576563 - pidgin crashes on exit in gst_plugin_ext_dep_free()
pidgin crashes on exit in gst_plugin_ext_dep_free()
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.22
Other Linux
: Normal normal
: 0.10.23
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-24 13:14 UTC by Götz Waschk
Modified: 2009-03-25 14:57 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Götz Waschk 2009-03-24 13:14:23 UTC
This happens on Mandriva Cooker with pidgin 2.5.5 and gstreamer 0.10.22 on x86_64. When pidgin is exited, it crashes in the gst_deinit function:

  • #0 raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #1 abort
    at abort.c line 88
  • #2 __libc_message
    at ../sysdeps/unix/sysv/linux/libc_fatal.c line 170
  • #3 malloc_printerr
  • #4 __libc_free
    at malloc.c line 3625
  • #5 IA__g_strfreev
    at gstrfuncs.c line 2558
  • #6 gst_plugin_ext_dep_free
    at gstplugin.c line 1407
  • #7 IA__g_list_foreach
    at glist.c line 789
  • #8 gst_plugin_finalize
    at gstplugin.c line 140
  • #9 IA__g_object_unref
    at gobject.c line 2421
  • #10 gst_registry_finalize
    at gstregistry.c line 200
  • #11 IA__g_object_unref
    at gobject.c line 2421
  • #12 gst_deinit
    at gst.c line 1344
  • #13 pidgin_sound_uninit
    at gtksound.c line 350
  • #14 purple_sound_uninit
    at sound.c line 143
  • #15 purple_core_quit
    at core.c line 235
  • #16 IA__g_closure_invoke
    at gclosure.c line 767
  • #17 signal_emit_unlocked_R
    at gsignal.c line 3244
  • #18 IA__g_signal_emit_valist
    at gsignal.c line 2977
  • #19 IA__g_signal_emit
    at gsignal.c line 3034
  • #20 IA__gtk_widget_activate
    at gtkwidget.c line 4792
  • #21 IA__gtk_menu_shell_activate_item
    at gtkmenushell.c line 1139
  • #22 gtk_menu_shell_button_release
    at gtkmenushell.c line 678
  • #23 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 84
  • #24 IA__g_closure_invoke
    at gclosure.c line 767
  • #25 signal_emit_unlocked_R
    at gsignal.c line 3282
  • #26 IA__g_signal_emit_valist
    at gsignal.c line 2987
  • #27 IA__g_signal_emit
    at gsignal.c line 3034
  • #28 gtk_widget_event_internal
    at gtkwidget.c line 4761
  • #29 IA__gtk_propagate_event
    at gtkmain.c line 2396
  • #30 IA__gtk_main_do_event
    at gtkmain.c line 1601
  • #31 gdk_event_dispatch
    at gdkevents-x11.c line 2364
  • #32 IA__g_main_context_dispatch
    at gmain.c line 1814
  • #33 g_main_context_iterate
    at gmain.c line 2448
  • #34 IA__g_main_loop_run
    at gmain.c line 2656
  • #35 IA__gtk_main
    at gtkmain.c line 1205
  • #36 main
    at gtkmain.c line 881



The bug was also reported to the pidgin devs, they have redirected it here:
http://developer.pidgin.im/ticket/8766#comment:2
Comment 1 Tim-Philipp Müller 2009-03-24 13:39:01 UTC
This looks like it might be related to this fix in git:

http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=a626dff72c6dea80bfab31cf1810db724bc45afb

which, however, should as far as I understand it only be a problem on linux if registry forking is disabled explicitly (e.g. via the environment variable or API), ie. not in the default setup.

Also: why does pidgin use gst_deinit()? That's really not recommended for applications, it's primarily meant for unit tests and the like.
Comment 2 Götz Waschk 2009-03-24 13:47:14 UTC
I'll check the patch. Yes, pidgin explicitly disables forking:

/* By default, gstreamer forks when you initialize it, and waitpids for the     
 * child.  But if libpurple reaps the child rather than leaving it to           
 * gstreamer, gstreamer's initialization fails.  So, we wait a second before    
 * reaping child processes, to give gst a chance to reap it if it wants to.     
 *                                                                              
 * This is not needed in later gstreamers, which let us disable the forking.    
 * And, it breaks the world on some Real Unices.                                
 */
Comment 3 Tim-Philipp Müller 2009-03-24 14:09:12 UTC
> /* By default, gstreamer forks when you initialize it, and waitpids for the     
>  * child.  But if libpurple reaps the child rather than leaving it to           
>  * gstreamer, gstreamer's initialization fails.  So, we wait a second before    
>  * reaping child processes, to give gst a chance to reap it if it wants to.     
>  *                                                                              
>  * This is not needed in later gstreamers, which let us disable the forking.    
>  * And, it breaks the world on some Real Unices.                                
>  */

I'd be curious about how it breaks on Real Unices? (And which ones?)

The one-second timeout seems rather arbitrary, you can't realy rely on that, since it might depend on all kinds of things (disk access/spin-up etc.).

Also, I'm not sure how future-proof this all is. I think there are plans to move the actual plugin scanning into an external helper program at some point, which would probably be called via g_spawn_*(). Not sure if the plan includes a way to disable that.
Comment 4 Götz Waschk 2009-03-24 14:14:55 UTC
Good questions. You should ask them to the Pidgin devs in the mentioned ticket.
Comment 5 Tim-Philipp Müller 2009-03-24 20:23:35 UTC
> Good questions. You should ask them to the Pidgin devs in the mentioned ticket.

I don't think I can be bothered to register there just for this. Luckily this bug is referenced in the ticket, so hopefully some of the devs will find their way here.
 

Comment 6 Götz Waschk 2009-03-25 08:08:38 UTC
The patch helped according to the original reporter.
Comment 7 Etan Reisner 2009-03-25 14:18:09 UTC
I believe the referent of "it" in "it breaks the world on some Real Unices" is the signal hack needed for versions of GStreamer that do not allow pidgin to disable forking. Or at least that is what my reading of http://developer.pidgin.im/ticket/1496 is.

It appears that we (the pidgin developers) might be able to move this child reaping to another part of pidgin which may or may not be beneficial to the original problem here (and to any new problems that may come up if GStreamer moves to g_spawn:ing a helper program). I don't know enough to say.

And yes, the one second time out was entirely arbitrary but it appears to have worked well enough so far (for those few people using GStreamer versions older than 0.10.10).