GNOME Bugzilla – Bug 474823
tee unit test failure
Last modified: 2007-11-01 20:14:10 UTC
This has been observed on the ppc64 build bot, and I can reproduce it both locally (on x86-64) and on the ppc64 machine with make elements/tee.forever. The failure is either: Running suite(s): tee GLib-GObject-ERROR **: g_type_plugin_*() invalidly modified type `GstFormat' aborting... 50%: Checks: 2, Failures: 0, Errors: 1 elements/tee.c:69:E:general:test_num_buffers:0: (after this point) Received signal 6 (Aborted) FAIL: elements/tee or running suite(s): tee GLib-GObject-ERROR **: file /build/buildd/glib2.0-2.14.0/gobject/gtype.c: line 1775 (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... 50%: Checks: 2, Failures: 0, Errors: 1 elements/tee.c:69:E:general:test_num_buffers:0: (after this point) Received signal 6 (Aborted) It looks a bit like another one of those class_ref races that we had elsewhere (for buffer and mini object types etc.).
Can't reproduce it in gdb, but when running $ GST_DEBUG=*:4 make elements/tee.forever 2>dbg.log I get this: Unexpected critical/warning: gst_pad_push_event: assertion `GST_IS_PAD (pad)' failed 50%: Checks: 2, Failures: 1, Errors: 0 gstcheck.c:66:F:general:test_stress:0: Unexpected critical/warning: gst_pad_push_event: assertion `GST_IS_PAD (pad)' failed [gst-head] tpm@zingle:~/uninstalled/head/gstreamer/tests/check$ tail dbg.log 0:00:02.992196000 4910 0x645310 DEBUG GST_PADS gstpad.c:4344:gst_pad_pause_task:<queue0:src> pause task 0:00:02.992207000 4910 0x645310 DEBUG task gsttask.c:476:gst_task_pause:<task0> Pausing task 0x655040 0:00:02.992209000 4910 0x602250 DEBUG GST_PADS gstpad.c:896:gst_pad_activate_push:<t:src4528> deactivated in push mode 0:00:02.992224000 4910 0x602250 INFO GST_ELEMENT_PADS gstelement.c:746:gst_element_remove_pad:<t> removing pad 'src4528' 0:00:02.992235000 4910 0x602250 DEBUG GST_REFCOUNTING gstpad.c:371:gst_pad_dispose:<'':src4528> dispose 0:00:02.992265000 4910 0x602250 DEBUG GST_BUS gstbus.c:800:gst_bus_add_watch_full:<bus1> New source 0x2aaab0000950 0:00:02.992276000 4910 0x602250 DEBUG GST_BUS gstbus.c:936:gst_bus_poll: running mainloop 0x2aaab0000930 0:00:02.992289000 4910 0x602250 DEBUG GST_BUS gstbus.c:525:gst_bus_timed_pop:<bus1> pop from bus, have 1 messages, got message 0x65ac70, eos 0:00:02.992303000 4910 0x602250 DEBUG GST_BUS gstbus.c:701:gst_bus_source_dispatch:<bus1> source 0x2aaab0000950 calling dispatch with 0x65ac70 0:00:02.992316000 4910 0x602250 DEBUG GST_BUS gstbus.c:848:poll_func: mainloop 0x2aaab0000930 quit
This seems to reproduce it even faster: $ GST_CHECKS=test_num_buffers make elements/tee.forever
The mystery crashes/aborts seem to come from the gst_structure_to_string () in: static gboolean gst_fake_sink_event (GstBaseSink * bsink, GstEvent * event) { GstFakeSink *sink = GST_FAKE_SINK (bsink); if (!sink->silent) { const GstStructure *s; gchar *sstr; GST_OBJECT_LOCK (sink); g_free (sink->last_message); if ((s = gst_event_get_structure (event))) sstr = gst_structure_to_string (s); else sstr = g_strdup (""); ... change last message, unlock and notify ... } }
Turns out this is just our old friend bug #349410, as should have been immediately obvious from the messages too *sigh*: 2007-11-01 Tim-Philipp Müller <tim at centricular dot net> * gst/gstformat.c: (_gst_format_initialize): g_type_class_ref() our GstFormat type to make sure we avoid the thread-unsafe bits of the GObject/GType system, ie. bug #349410 and bug #64764. Should fix intermittent tee unit test failures (#474823). Will make sure this is done for other types as well.