[gstreamer-bugs] [Bug 316809] New: bug in gstinfo.c -> _gst_debug_register_funcptr
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Tue Sep 20 13:15:33 PDT 2005
Do not reply to this email. You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=316809
GStreamer | gstreamer (core) | Ver: 0.8.7
Summary: bug in gstinfo.c -> _gst_debug_register_funcptr
Product: GStreamer
Version: 0.8.7
Platform: Other
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gstreamer (core)
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: francis_labonte at hotmail.com
QAContact: gstreamer-bugs at lists.sourceforge.net
CC: all-bugs at bugzilla.gnome.org
I'me running 4 gst-launch at the same time in a loop, with all the same pipeline
having 2 spiders in 2 thread (1 spider / thread).
somthing like:
gst-launch {src ! spider ... ! queue} mux {src ! spider .. ! queue } mux
I found that sometimes, my process is stuck somewhere and take 100% of it's
current CPU.
I think this is cause by the fact that we should have a mutex to serialize the
_gst_debug_register_funcptr. If I add a new mutex that lock/unlock at the
begin/end of this function, it fix the problem.
Does it make sens?
Francis
_______________
This addition fix the problem
_______________
...
GHashTable *__gst_function_pointers = NULL;
+static GStaticMutex __dbg_functions = G_STATIC_MUTEX_INIT;
...
..
void *
_gst_debug_register_funcptr (void *ptr, gchar * ptrname)
{
+ g_static_mutex_lock(&__dbg_functions);
if (!__gst_function_pointers)
__gst_function_pointers = g_hash_table_new (g_direct_hash, g_direct_equal);
if (!g_hash_table_lookup (__gst_function_pointers, ptr))
g_hash_table_insert (__gst_function_pointers, ptr, ptrname);
+ g_static_mutex_unlock(&__dbg_functions);
return ptr;
}
_______________________________________________________
backtrace if I attach gdb when gst-launch run at 100%
______________________________________________________
#0 0xb7345be4 in g_direct_equal (v1=0xb74f1808, v2=0xb5b31b00) at gutils.c:1039
#1 0xb7320b6d in g_hash_table_lookup (hash_table=0x8052ea8, key=0xb5b31b64) at
ghash.c:201
#2 0xb750720b in _gst_debug_register_funcptr (ptr=0xb5b31b64,
ptrname=0xb5d44e31 "gst_ffmpegdec_event")
at gstinfo.c:1074
#3 0xb5b318a3 in gst_ffmpegdec_init (ffmpegdec=0x80da730) at gstffmpegdec.c:269
#4 0xb7395428 in g_type_create_instance (type=3048413176) at gtype.c:1441
#5 0xb7384129 in g_object_constructor (type=135645368,
n_construct_properties=0, construct_params=0x0)
at gobject.c:860
#6 0xb74eeeda in gst_object_constructor (type=135645368,
n_construct_properties=0, construct_params=0x0)
at gstobject.c:197
#7 0xb7383a8d in g_object_newv (object_type=135645368, n_parameters=0,
parameters=0x0) at gobject.c:758
#8 0xb73840cb in g_object_new_valist (object_type=135645368,
first_property_name=0x0,
var_args=0xbfffe8b8 "�����(P�h�\025\b Q\005\b��S��m\020\b") at gobject.c:797
#9 0xb7383893 in g_object_new (object_type=135645368, first_property_name=0x0)
at gobject.c:651
#10 0xb75028f6 in gst_element_factory_create (factory=0x81080c0, name=0x0) at
gstelementfactory.c:315
#11 0xb6de4718 in gst_spider_create_and_plug (conn=0x8142f90,
plugpath=0x8125d84) at gstspider.c:576
#12 0xb6de4d64 in gst_spider_plug_from_srcpad (conn=0x8142f90, srcpad=0x0) at
gstspider.c:736
#13 0xb6de4b47 in gst_spider_plug (conn=0x8142f90) at gstspider.c:665
#14 0xb6de428c in gst_spider_identity_plug (ident=0x8143098) at gstspider.c:513
#15 0xb6de5d60 in gst_spider_identity_change_state (element=0x8143098) at
gstspideridentity.c:400
...
..
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are the QA contact for the bug.
More information about the Gstreamer-bugs
mailing list