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 352958 - pad_alloc_buffer and stream lock
pad_alloc_buffer and stream lock
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.10
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-08-26 08:46 UTC by Tim-Philipp Müller
Modified: 2006-08-29 09:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim-Philipp Müller 2006-08-26 08:46:39 UTC
Were we going to do something about this:

~/gst-ffmpeg/tests/check$ G_DEBUG=fatal_warnings make generic/libavcodec-locking.forever
Running suite(s): Pipelines
GStreamer-CRITICAL **: gst_caps_ref: assertion `GST_CAPS_REFCOUNT_VALUE (caps) > 0' failed
aborting...

THREAD 1:
....
  • #4 IA__g_log
    at gmessages.c line 517
  • #5 IA__g_return_if_fail_warning
    at gmessages.c line 532
  • #6 gst_caps_ref
    at gstcaps.c line 368
  • #7 gst_caps_replace
    at gstcaps.c line 1566
  • #8 gst_buffer_set_caps
    at gstbuffer.c line 339
  • #9 gst_pad_alloc_buffer_full
    at gstpad.c line 2598
  • #10 gst_ffmpegdec_frame
    at gstffmpegdec.c line 1094
  • #11 gst_ffmpegdec_chain
    at gstffmpegdec.c line 1797
  • #12 gst_pad_chain_unchecked
    at gstpad.c line 3334
  • #9 gst_pad_alloc_buffer_full
    at gstpad.c line 2598
  • #0 __kernel_vsyscall
  • #1 __lll_mutex_lock_wait
    from /lib/tls/i686/cmov/libpthread.so.0
  • #2 _L_mutex_lock_33
    from /lib/tls/i686/cmov/libpthread.so.0
  • #3 ??
  • #4 g_thread_equal_posix_impl
    at gthread-posix.c line 412
  • #5 IA__g_static_rec_mutex_lock
    at gthread.c line 286
  • #6 post_activate
    at gstpad.c line 598
  • #7 gst_pad_activate_push
    at gstpad.c line 861
  • #8 gst_pad_set_active
    at gstpad.c line 654
  • #9 activate_pads
    at gstelement.c line 2261
  • #10 gst_iterator_fold
    at gstiterator.c line 503
  • #11 iterator_activate_fold_with_resync
    at gstelement.c line 2285
  • #12 gst_element_pads_activate
    at gstelement.c line 2327
  • #13 gst_element_change_state_func
    at gstelement.c line 2386
  • #14 gst_ffmpegdec_change_state
    at gstffmpegdec.c line 1862
  • #15 gst_element_change_state
    at gstelement.c line 2182
  • #16 gst_element_set_state_func
    at gstelement.c line 2144
  • #17 gst_element_set_state
    at gstelement.c line 2054
  • #18 gst_bin_change_state_func
    at gstbin.c line 1759
  • #19 gst_pipeline_change_state
    at gstpipeline.c line 490
  • #20 gst_element_change_state
    at gstelement.c line 2182
  • #21 gst_element_change_state
    at gstelement.c line 2215
  • #22 gst_element_set_state_func
    at gstelement.c line 2144
  • #23 gst_element_set_state
    at gstelement.c line 2054
  • #24 test_libavcodec_locks
    at generic/libavcodec-locking.c line 93


Please close if not, just didn't want it to get lost.
Comment 1 Edward Hervey 2006-08-28 09:16:18 UTC
ffmpeg is passing GST_PAD_CAPS (ffmpegdec->srcpad) , whereas:
_ There's no check as to the pad having caps
_ That piece of code doesn't have the lock on the pad, so the caps could change.

Maybe we should get the caps at the beginning of that function (via gst_pad_get_caps()) and unref it at the end.

I can't reproduce that error though :(
Comment 2 Tim-Philipp Müller 2006-08-28 10:37:30 UTC
> I can't reproduce that error though :(

I can reproduce it very rarely myself, the window for it to happen is very small. Need the -forever checks usually. It does happen on the p5 build bot occasionally though. Might also be the cause for other spurious failures on the fc4 build bot. 

Ask wtay for more details, we talked about it shortly on IRC, I just filed it so it doesn't get lost.

Comment 3 Wim Taymans 2006-08-29 09:58:59 UTC
            * gst/gstelement.c: (activate_pads), (clear_caps),
            (iterator_activate_fold_with_resync), (gst_element_pads_activate):
            Clear the pad caps when the element shut down all of the pads and
            is not streaming data that could modify the caps.
            Fixes #352958.