random segfault in extended playout example

otopolsky topolsky at maindata.sk
Fri Oct 23 01:04:11 PDT 2015


Hi,

I have modified the playout example in
gst-plugins-bad/tests/examples/playout.c
I added tee and appsink on the output part of the pipeline and code for
looping the playlist(which is recreating uridecodebin but keeping playout
item).

The playback goes well for several minutes (42 minutes last time) doing lot
of switches (I use 2 sec videos).

After some time I get these warnings (these logs are repeating every run):

---
0:02:58.760798085  8700       0x657800 DEBUG                playout
playout.c:774:playout_remove_pad: Releasing some pad 0x7fff54aa02d0
0:02:58.762099364  8700 0x7fffc0011590 WARN              aggregator
gstaggregator.c:1368:gst_aggregator_query_latency_unlocked:<mixer> Latency
query failed
0:02:58.762261768  8700 0x7fffc0011590 WARN              aggregator
gstaggregator.c:1368:gst_aggregator_query_latency_unlocked:<mixer> Latency
query failed
0:02:58.762468353  8700 0x7fffc0011590 WARN                     bin
gstbin.c:2524:gst_bin_do_latency_func:<pipeline> did not really configure
latency of 0:00:00.000000000
0:02:58.762702111  8700 0x7fffc0011590 WARN              aggregator
gstaggregator.c:1368:gst_aggregator_query_latency_unlocked:<mixer> Latency
query failed
0:02:58.762762396  8700 0x7fffc0011590 WARN                     bin
gstbin.c:2524:gst_bin_do_latency_func:<autovideosink0> did not really
configure latency of 0:00:00.000000000
(cplayout:8700): GStreamer-CRITICAL **:
Trying to dispose element glcolorconvertelement94, but it is in PLAYING
instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.
---

I added G_DEBUG=fatal-warnings and see this backtrace for this critical log:

>~"#0  0x00007ffff6cadc13 in g_logv () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0\n"
>~"#1  0x00007ffff6cadd72 in g_log () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0\n"
>~"#2  0x00007ffff6f7ad2c in g_object_unref () from
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0\n"
>~"#3  0x00007ffff6f9ad8c in g_value_reset () from
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0\n"
>~"#4  0x00007ffff7af6e08 in gst_bin_change_state_func (element=0x82d160,
transition=36) at gstbin.c:2752\n"
>~"#5  0x00007ffff4aa21fd in gst_gl_mixer_bin_change_state
(element=0x82d160, transition=36) at gstglmixerbin.c:511\n"
>~"#6  0x00007ffff7b16d32 in gst_element_change_state
(element=element at entry=0x82d160, transition=transition at entry=36) at
gstelement.c:2604\n"
>~"#7  0x00007ffff7b1740c in gst_element_set_state_func (element=0x82d160,
state=GST_STATE_PLAYING) at gstelement.c:2560\n"
>~"#8  0x00007ffff7af71d9 in gst_bin_element_set_state
(next=GST_STATE_PLAYING, current=GST_STATE_PAUSED, start_time=0,
base_time=0, element=0x82d160, bin=0x814120) at gstbin.c:2341\n"
>~"#9  gst_bin_change_state_func (element=0x814120,
transition=GST_STATE_CHANGE_PAUSED_TO_PLAYING) at gstbin.c:2694\n"
>~"#10 0x00007ffff7b16d32 in gst_element_change_state
(element=element at entry=0x814120,
transition=transition at entry=GST_STATE_CHANGE_PAUSED_TO_PLAYING) at
gstelement.c:2604\n"
>~"#11 0x00007ffff7af0539 in gst_bin_continue_func (data=0x7fff8c002510) at
gstbin.c:3001\n"
>~"#12 0x00007ffff6ccc88c in ?? () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0\n"
>~"#13 0x00007ffff6ccbf05 in ?? () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0\n"
>~"#14 0x00007ffff5d6d182 in start_thread (arg=0x7fff4bfff700) at
pthread_create.c:312\n"
>~"#15 0x00007ffff699347d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:111\n"

Later I get similar Gstreamer-CRITICAL warning and then the app crashes
either with SIGABRT or SEGFAULT:

...
(cplayout:16217): GStreamer-CRITICAL **: 
Trying to dispose element queue2604, but it is in PAUSED instead of the NULL
state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.


(cplayout:16217): GStreamer-CRITICAL **: 
Trying to dispose element bin1302, but it is in READY instead of the NULL
state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.

The backtrace of segfault:
>~"#0  pthread_cond_wait@@GLIBC_2.3.2 () at
../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:134\n"
>~"#1  0x00007ffff6ce8bf7 in g_cond_wait () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0\n"
>~"#2  0x00007ffff0ae5f7d in gst_queue_loop (pad=<optimized out>) at
gstqueue.c:1471\n"
>~"#3  0x00007ffff7b5b451 in gst_task_func (task=0x7fffbc062b90) at
gsttask.c:331\n"
>~"#4  0x00007ffff6ccc88c in ?? () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0\n"
>~"#5  0x00007ffff6ccbf05 in ?? () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0\n"
>~"#6  0x00007ffff5d6d182 in start_thread (arg=0x7fffb56cc700) at
pthread_create.c:312\n"
>~"#7  0x00007ffff699347d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:111\n" 

I noticed that at time of switch the video part is going eos sooner than
audio part(which is not happening with same videos without tee and appsink)
0:41:34.261967322 16217 0x7fff78022b70 WARN playout
playout.c:977:playout_item_pad_probe_event: v/run2s_07.mp4: video pad went
EOS before audio pad! There will be audio/video glitches while switching.

When I run without tee and appsink I do not get this segfault/sigabrt
(tested for 50+ hours)

I am attaching the modified example (running with just -t switch and 4 short
- 2secs - videos)   playout.c
<http://gstreamer-devel.966125.n4.nabble.com/file/n4674225/playout.c>  

I am stuck with this problem for a week not moving anywhere tried all
debugging techniques I am capable of, so any help/hint will be appreciated.

All the best,
Ondrej



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/random-segfault-in-extended-playout-example-tp4674225.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list