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 530317 - GType registration error - race condition when parallel creation of pipelines
GType registration error - race condition when parallel creation of pipelines
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.18
Other All
: Normal critical
: 0.10.20
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-04-28 09:11 UTC by Mattias Barthel
Modified: 2008-04-28 09:21 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16



Description Mattias Barthel 2008-04-28 09:11:09 UTC
Steps to reproduce:
1. Two threads(pthreads) create each a pipeline at the "same time"
2. Gstreamer try to register "GstClock" in Glib
3. This was produced with Glib 2.16.3


Stack trace:
(testlib:32651): GLib-GObject-WARNING **: cannot register existing type `GstClock'

(testlib:32651): GLib-GObject-WARNING **: gtype.c:3368: type id `0' is invalid

(testlib:32651): GLib-GObject-WARNING **: can't peek value table for type `<invalid>' which is not currently referenced

(testlib:32651): GLib-GObject-WARNING **: gvalue.c:96: cannot initialize GValue with type `(null)', this type has no GTypeValueTable implementation

(testlib:32651): GLib-GObject-WARNING **: gtype.c:3368: type id `0' is invalid

(testlib:32651): GLib-GObject-WARNING **: can't peek value table for type `<invalid>' which is not currently referenced

Core was generated by `./testlib'.
Program terminated with signal 11, Segmentation fault.
  • #0 gst_structure_set_valist
    at gststructure.c line 527
  • #0 gst_structure_set_valist
    at gststructure.c line 527
  • #1 gst_structure_new_valist
    at gststructure.c line 242
  • #2 gst_structure_new
    at gststructure.c line 210
  • #3 gst_message_new_clock_provide
    at gstmessage.c line 541
  • #4 gst_bin_add_func
    at gstbin.c line 915
  • #5 gst_bin_add
    at gstbin.c line 1046
  • #6 gst_bin_add_many
    at gstutils.c line 2212
  • #7 playerSimpleCreate
    at playerSimple.c line 411
  • #8 flowPipelineCreate
    at vicoFlow.c line 150
  • #9 vicoFlowInit
    at vicoFlow.c line 202
  • #10 vicoRun
    at vico.c line 609
  • #11 start_thread
    from /lib/tls/i686/cmov/libpthread.so.0
  • #12 clone
    from /lib/tls/i686/cmov/libc.so.6

Other information:
Comment 1 Sebastian Dröge (slomo) 2008-04-28 09:21:32 UTC
In theory glib 2.16 should have the type registration race conditions fixed... I wonder why this still happens. I've added a workaround for this in CVS, could you check if it fixes your issue?

2008-04-28  Sebastian Dröge  <slomo@circular-chaos.org>

        * gst/gst.c:
        Register GstClock type from a type-safe context. Fixes bug #530317.