[gstreamer-bugs] [Bug 349410] New: Problems with type handling

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Mon Jul 31 03:32:29 PDT 2006


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=349410
 GStreamer | gstreamer (core) | Ver: HEAD CVS

           Summary: Problems with type handling
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: thaytan at mad.scientist.com
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


Filing this bug so I don't forget about it.

Revision 1.8 of tests/check/pipelines/parse-launch.c in GStreamer core causes
intermittent errors, on multi-core machines at least. I can't reproduce the
problem on a single core machine.

It manifests in a couple of different ways, that centre around serialisation of
an enum:

Running suite(s): Parse Launch syntax
GLib-GObject-ERROR **: g_type_plugin_*() invalidly modified type `GstFormat'
aborting...

OR

Running suite(s): Parse Launch syntax
GLib-GObject-ERROR **: file gtype.c: line 1809 (type_class_init_Wm): assertion
failed: (node->is_classed && node->data && node->data->class.class_size &&
!node->data->class.class && node->data->class.init_state == UNINITIALIZED)
aborting...

Grabbing a backtrace shows:

Thread 5 (process 19704):
#0  0x00002aaaab4e6ecb in __lll_mutex_lock_wait () from /lib/libpthread.so.0
#1  0x0000000000000048 in ?? ()
#2  0x0000000000000000 in ?? ()

Thread 4 (process 19706):
#0  0x00002aaaab4e4a9a in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/libpthread.so.0
#1  0x00002aaaab38b7db in IA__g_static_rw_lock_writer_lock (
    lock=0x2aaaab03de20) at gthread.c:742
#2  0x00002aaaaaf2642f in IA__g_type_class_ref (type=<value optimized out>)
    at gtype.c:1874
#3  0x00002aaaaad71643 in gst_value_serialize_enum (value=0x572ba8)
    at gstvalue.c:1874
#4  0x00002aaaaad74c0c in gst_value_serialize (value=0x572ba8)
    at gstvalue.c:3082
#5  0x00002aaaaad4f945 in gst_structure_to_string (structure=0x5707d0)
    at gststructure.c:1459
#6  0x00002aaaabe1f5f4 in gst_fake_sink_event (bsink=0x56a380, event=0x5639c0)
    at gstfakesink.c:323
#7  0x00002aaaabf5aa57 in gst_base_sink_render_object (basesink=0x56a380,
    pad=0x568450, obj=0x5639c0) at gstbasesink.c:1498
#8  0x00002aaaabf5b404 in gst_base_sink_queue_object_unlocked (
    basesink=0x56a380, pad=0x568450, obj=0x577e40, prerollable=1)
    at gstbasesink.c:1649
#9  0x00002aaaabf5c54d in gst_base_sink_chain_unlocked (basesink=0x56a380,
    pad=0x568450, buf=0x577e40) at gstbasesink.c:1905
#10 0x00002aaaabf5c6fe in gst_base_sink_chain (pad=0x568450, buf=0x577e40)
    at gstbasesink.c:1939
#11 0x00002aaaaad3a31d in gst_pad_chain_unchecked (pad=0x568450,
    buffer=0x577e40) at gstpad.c:3319
#12 0x00002aaaaad3adf5 in gst_pad_push (pad=0x56e220, buffer=0x577e40)
    at gstpad.c:3486
#13 0x00002aaaaad1e74d in gst_proxy_pad_do_chain (pad=0x56f190,
    buffer=0x577e40) at gstghostpad.c:194
#14 0x00002aaaaad3a31d in gst_pad_chain_unchecked (pad=0x56f190,
    buffer=0x577e40) at gstpad.c:3319
#15 0x00002aaaaad3adf5 in gst_pad_push (pad=0x5682e0, buffer=0x577e40)
    at gstpad.c:3486
#16 0x00002aaaabf63152 in gst_base_src_loop (pad=0x5682e0) at gstbasesrc.c:1525
#17 0x00002aaaaad5a500 in gst_task_func (task=0x5708d0, tclass=0x56dee0)
    at gsttask.c:193
#18 0x00002aaaab38ccdc in g_thread_pool_thread_proxy (
    data=<value optimized out>) at gthreadpool.c:265
#19 0x00002aaaab38ab6b in g_thread_create_proxy (data=<value optimized out>)
    at gthread.c:582
#20 0x00002aaaab4e20fa in start_thread () from /lib/libpthread.so.0
#21 0x00002aaaab6b8ce2 in clone () from /lib/libc.so.6
#22 0x0000000000000000 in ?? ()

Thread 3 (process 19707):
#0  0x00002aaaab4e6ecb in __lll_mutex_lock_wait () from /lib/libpthread.so.0
#1  0x00002aaaab4e3bb0 in pthread_mutex_destroy () from /lib/libpthread.so.0
#2  0x0000000000000020 in ?? ()
#3  0x00002aaaab4e3d06 in pthread_mutex_lock () from /lib/libpthread.so.0
#4  0x0000000000000000 in ?? ()

Thread 2 (process 19708):
#0  0x00002aaaab6b8ca3 in clone () from /lib/libc.so.6
#1  0x00002aaaab4e2070 in __free_tcb () from /lib/libpthread.so.0
#2  0x0000000040803960 in ?? ()
#3  0x0000000000000000 in ?? ()

Thread 1 (process 19705):
#0  0x00002aaaab62011d in raise () from /lib/libc.so.6
#1  0x00002aaaab62184e in abort () from /lib/libc.so.6
---Type <return> to continue, or q <return> to quit---
#2  0x00002aaaab37742f in IA__g_logv (
    log_domain=0x2aaaaaf2cf49 "GLib-GObject", log_level=<value optimized out>,
    format=0x2aaaab39ec98 "file %s: line %d (%s): assertion failed: (%s)",
    args1=0x401ff710) at gmessages.c:497
#3  0x00002aaaab3774b3 in IA__g_log (
    log_domain=0x4cf8 <Address 0x4cf8 out of bounds>, log_level=19705,
    format=0x6 <Address 0x6 out of bounds>) at gmessages.c:517
#4  0x00002aaaab377536 in IA__g_assert_warning (
    log_domain=0x2aaaaaf2cf49 "GLib-GObject", file=0x2aaaaaf3203b "gtype.c",
    line=1773, pretty_function=0x2aaaaaf31ec0 "type_class_init_Wm",
    expression=0x2aaaaaf33980 "node->is_classed && node->data &&
node->data->class.class_size && !node->data->class.class &&
node->data->class.init_state == UNINITIALIZED") at gmessages.c:552
#5  0x00002aaaaaf264c6 in IA__g_type_class_ref (type=<value optimized out>)
    at gtype.c:1770
#6  0x00002aaaaad71643 in gst_value_serialize_enum (value=0x56dd18)
    at gstvalue.c:1874
#7  0x00002aaaaad74c0c in gst_value_serialize (value=0x56dd18)
    at gstvalue.c:3082
#8  0x00002aaaaad4f945 in gst_structure_to_string (structure=0x565120)
    at gststructure.c:1459
#9  0x00002aaaabe1f5f4 in gst_fake_sink_event (bsink=0x56a060, event=0x513380)
    at gstfakesink.c:323
#10 0x00002aaaabf5aa57 in gst_base_sink_render_object (basesink=0x56a060,
    pad=0x568170, obj=0x513380) at gstbasesink.c:1498
#11 0x00002aaaabf5b404 in gst_base_sink_queue_object_unlocked (
    basesink=0x56a060, pad=0x568170, obj=0x577840, prerollable=1)
    at gstbasesink.c:1649
#12 0x00002aaaabf5c54d in gst_base_sink_chain_unlocked (basesink=0x56a060,
    pad=0x568170, buf=0x577840) at gstbasesink.c:1905
#13 0x00002aaaabf5c6fe in gst_base_sink_chain (pad=0x568170, buf=0x577840)
    at gstbasesink.c:1939
#14 0x00002aaaaad3a31d in gst_pad_chain_unchecked (pad=0x568170,
    buffer=0x577840) at gstpad.c:3319
#15 0x00002aaaaad3adf5 in gst_pad_push (pad=0x56e070, buffer=0x577840)
    at gstpad.c:3486
#16 0x00002aaaaad1e74d in gst_proxy_pad_do_chain (pad=0x56f000,
    buffer=0x577840) at gstghostpad.c:194
#17 0x00002aaaaad3a31d in gst_pad_chain_unchecked (pad=0x56f000,
    buffer=0x577840) at gstpad.c:3319
#18 0x00002aaaaad3adf5 in gst_pad_push (pad=0x568000, buffer=0x577840)
    at gstpad.c:3486
#19 0x00002aaaabf63152 in gst_base_src_loop (pad=0x568000) at gstbasesrc.c:1525
#20 0x00002aaaaad5a500 in gst_task_func (task=0x570830, tclass=0x56dee0)
    at gsttask.c:193
#21 0x00002aaaab38ccdc in g_thread_pool_thread_proxy (
    data=<value optimized out>) at gthreadpool.c:265
#22 0x00002aaaab38ab6b in g_thread_create_proxy (data=<value optimized out>)
    at gthread.c:582
#23 0x00002aaaab4e20fa in start_thread () from /lib/libpthread.so.0
#24 0x00002aaaab6b8ce2 in clone () from /lib/libc.so.6
#25 0x0000000000000000 in ?? ()

The fault seems to lie inside GLib somewhere. I suspect it is failing when 2
threads simultaneously increment the refcount of a class, possibly because it
is the first access to the type. The GstFormat type itself is registered inside
gst_init, but no instance is created until and the class is unused except for
GstValue transformations afaics.

Changing the tests to have silent=true for fakesink and identity masks the
problem by avoiding serialisation of NewSegment events.


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list