long run gstreamer stops working without message

Thomas DEBESSE thomas.debesse at rcf.fr
Wed Aug 21 06:37:37 PDT 2013


2013/8/19 Robert Krakora <rob.krakora at messagenetsystems.com>:
> Hi Thomas,
> Have you used gdb to attach to the process running your pipeline and
> examined the back traces on each thread?  That would be helpful.

OK, I have a "crashed pipeline" with gdb attached on it near to me.
I posted traces on the bugzilla :
https://bugzilla.gnome.org/show_bug.cgi?id=692953

Perhaps it is better to continue the discussion on the bugzilla to do
not split/duplicating information.

But the bugzilla is buggy (had truncated my traces)
If you want them :

This is the stdios (nothing since yesterday) :

---8<-------------------------------------------------------------------------
gst-launch-1.0 -v alsasrc device="$alsa_iface" ! audioconvert !
audioresample ! "audio/x-raw, format=S16LE, channels=2" ! alsasink
device="$alsa_iface" sync=false
Définition du pipeline à PAUSED...
Le pipeline est actif et n'a pas besoin de phase PREROLL...
0:00:00.126688143  8539      0x1265370 FIXME                default
gstutils.c:3622:gst_pad_create_stream_id_printf_valist:<alsasrc0:src>
Creating random stream-id, consider implementing a deterministic way
of creating a stream-id
Passage du pipeline à la phase PLAYING...
New clock: GstAudioSrcClock
0:00:00.128505331  8539      0x1265370 WARN                    alsa
pcm_hw.c:1401:_snd_pcm_hw_open: alsalib error: Invalid value for card
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-buffer-time = 200000
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-latency-time = 10000
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0.GstPad:src: caps =
audio/x-raw, layout=(string)interleaved, rate=(int)44100,
format=(string)S16LE, channels=(int)2,
channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps
= audio/x-raw, layout=(string)interleaved, rate=(int)44100,
format=(string)S16LE, channels=(int)2,
channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstAudioResample:audioresample0.GstPad:src:
caps = audio/x-raw, layout=(string)interleaved, rate=(int)44100,
format=(string)S16LE, channels=(int)2,
channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps =
audio/x-raw, layout=(string)interleaved, rate=(int)44100,
format=(string)S16LE, channels=(int)2,
channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps =
audio/x-raw, layout=(string)interleaved, rate=(int)44100,
format=(string)S16LE, channels=(int)2,
channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps =
audio/x-raw, layout=(string)interleaved, rate=(int)44100,
format=(string)S16LE, channels=(int)2,
channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstAudioResample:audioresample0.GstPad:sink:
caps = audio/x-raw, layout=(string)interleaved, rate=(int)44100,
format=(string)S16LE, channels=(int)2,
channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps
= audio/x-raw, layout=(string)interleaved, rate=(int)44100,
format=(string)S16LE, channels=(int)2,
channel-mask=(bitmask)0x0000000000000003
---8<-------------------------------------------------------------------------
(nothing new since yersteday, nothing printed when bug appears)

This is a strace BEFORE bug (yesterday) :

---8<-------------------------------------------------------------------------
poll([{fd=9, events=POLLIN}, {fd=7, events=POLLIN}], 2, 250) = 0 (Timeout)
poll([{fd=9, events=POLLIN}, {fd=7, events=POLLIN}], 2, 250) = 0 (Timeout)
poll([{fd=9, events=POLLIN}, {fd=7, events=POLLIN}], 2, 250) = 0 (Timeout)
poll([{fd=9, events=POLLIN}, {fd=7, events=POLLIN}], 2, 250) = 0 (Timeout)
poll([{fd=9, events=POLLIN}, {fd=7, events=POLLIN}], 2, 250) = 0 (Timeout)
poll([{fd=9, events=POLLIN}, {fd=7, events=POLLIN}], 2, 250) = 0 (Timeout)
poll([{fd=9, events=POLLIN}, {fd=7, events=POLLIN}], 2, 250) = 0 (Timeout)
---8<-------------------------------------------------------------------------

This a gdb trace BEFORE bug (yesterday) :

---8<-------------------------------------------------------------------------
warning: no loadable sections found in added symbol-file
system-supplied DSO at 0x7fff7268b000
0x00007f045fb233cd in poll () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) info threads
  Id   Target Id         Frame
  4    Thread 0x7f045a7d1700 (LWP 8540) "alsasrc0:src"
0x00007f045fe09ca4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/x86_64-linux-gnu/libpthread.so.0
  3    Thread 0x7f0459fd0700 (LWP 8541) "audiosrc-ringbu"
0x00007f045fb27747 in ioctl () from /lib/x86_64-linux-gnu/libc.so.6
  2    Thread 0x7f04597cf700 (LWP 8542) "audiosink-ringb"
0x00007f045fb233cd in poll () from /lib/x86_64-linux-gnu/libc.so.6
* 1    Thread 0x7f0460a42740 (LWP 8539) "gst-launch-1.0"
0x00007f045fb233cd in poll () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) thread apply all backtrace

Thread 4 (Thread 0x7f045a7d1700 (LWP 8540)):
#0  0x00007f045fe09ca4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f04600a4aaf in g_cond_wait () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f045e78f233 in wait_segment (buf=buf at entry=0x12d0550) at
gstaudioringbuffer.c:1282
#3  0x00007f045e79144c in gst_audio_ring_buffer_read
(buf=buf at entry=0x12d0550, sample=sample at entry=4875696,
data=data at entry=0x7f0454018160 "\377\377", len=len at entry=441,
    timestamp=timestamp at entry=0x7f045a7d0a88) at gstaudioringbuffer.c:1724
#4  0x00007f045e7a9e41 in gst_audio_base_src_create (bsrc=0x12ad1f0,
offset=<optimized out>, length=<optimized out>, outbuf=0x7f045a7d0c28)
at gstaudiobasesrc.c:815
#5  0x00007f045e0363c2 in gst_base_src_get_range
(src=src at entry=0x12ad1f0, offset=offset at entry=18446744073709551615,
length=length at entry=0, buf=buf at entry=0x7f045a7d0d38) at
gstbasesrc.c:2355
#6  0x00007f045e037c1b in gst_base_src_loop (pad=0x12ae030) at gstbasesrc.c:2613
#7  0x00007f04605f6a71 in gst_task_func (task=0x12f9050) at gsttask.c:316
#8  0x00007f0460089712 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x00007f0460088ed5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x00007f045fe05f8e in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0
#11 0x00007f045fb2fe1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 3 (Thread 0x7f0459fd0700 (LWP 8541)):
#0  0x00007f045fb27747 in ioctl () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f045e4ecbc4 in ?? () from /usr/lib/x86_64-linux-gnu/libasound.so.2
#2  0x00007f045e9cfa0b in gst_alsasrc_read (asrc=0x12ad1f0,
data=<optimized out>, length=1764, timestamp=0x7f0459fcfe38) at
gstalsasrc.c:906
#3  0x00007f045e7ae5fe in audioringbuffer_thread_func (buf=0x12d0550)
at gstaudiosrc.c:239
#4  0x00007f0460088ed5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f045fe05f8e in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007f045fb2fe1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 2 (Thread 0x7f04597cf700 (LWP 8542)):
#0  0x00007f045fb233cd in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f045e4e048f in ?? () from /usr/lib/x86_64-linux-gnu/libasound.so.2
#2  0x00007f045e9cc1a4 in gst_alsasink_write (asink=0x12c5a30,
data=<optimized out>, length=1764) at gstalsasink.c:1012
#3  0x00007f045e7ad939 in audioringbuffer_thread_func (buf=0x12d01c0)
at gstaudiosink.c:252
#4  0x00007f0460088ed5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f045fe05f8e in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007f045fb2fe1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 1 (Thread 0x7f0460a42740 (LWP 8539)):
#0  0x00007f045fb233cd in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f04600644fc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f04600649ca in g_main_loop_run () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f04605a5485 in gst_bus_poll (bus=bus at entry=0x12a1260,
events=events at entry=GST_MESSAGE_ANY,
timeout=timeout at entry=18446744073709551615) at gstbus.c:1086
#4  0x0000000000403b97 in event_loop (pipeline=0x12c8090,
blocking=blocking at entry=1,
target_state=target_state at entry=GST_STATE_PLAYING) at gst-launch.c:592
#5  0x00000000004035b1 in main (argc=13, argv=0x7fff72671fb8) at
gst-launch.c:1114
---8<-------------------------------------------------------------------------

But now, I can't interrupt process from gdb ! :o
I killed gdb then reattach gdb to the process

This is a strace AFTER bug (today) :

---8<-------------------------------------------------------------------------
poll([{fd=12, events=POLLIN}, {fd=7, events=POLLIN}], 2, 250) = 0 (Timeout)
poll([{fd=12, events=POLLIN}, {fd=7, events=POLLIN}], 2, 250) = 0 (Timeout)
poll([{fd=12, events=POLLIN}, {fd=7, events=POLLIN}], 2, 250) = 0 (Timeout)
poll([{fd=12, events=POLLIN}, {fd=7, events=POLLIN}], 2, 250) = 0 (Timeout)
poll([{fd=12, events=POLLIN}, {fd=7, events=POLLIN}], 2, 250) = 0 (Timeout)
poll([{fd=12, events=POLLIN}, {fd=7, events=POLLIN}], 2, 250) = 0 (Timeout)
poll([{fd=12, events=POLLIN}, {fd=7, events=POLLIN}], 2, 250) = 0 (Timeout)
poll([{fd=12, events=POLLIN}, {fd=7, events=POLLIN}], 2, 250) = 0 (Timeout)
poll([{fd=12, events=POLLIN}, {fd=7, events=POLLIN}], 2, 250) = 0 (Timeout)
poll([{fd=12, events=POLLIN}, {fd=7, events=POLLIN}], 2, 250) = 0 (Timeout)
---8<-------------------------------------------------------------------------

This is a gdb trace AFTER bug (today)

---8<-------------------------------------------------------------------------
warning: no loadable sections found in added symbol-file
system-supplied DSO at 0x7fff7268b000
0x00007f045fb233cd in poll () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) info threads
  Id   Target Id         Frame
  4    Thread 0x7f045a7d1700 (LWP 8540) "alsasrc0:src"
0x00007f045fe09ca4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/x86_64-linux-gnu/libpthread.so.0
  3    Thread 0x7f0459fd0700 (LWP 8541) "audiosrc-ringbu"
0x00007f045fb27747 in ioctl () from /lib/x86_64-linux-gnu/libc.so.6
  2    Thread 0x7f04597cf700 (LWP 8542) "audiosink-ringb"
0x00007f045fb233cd in poll () from /lib/x86_64-linux-gnu/libc.so.6
* 1    Thread 0x7f0460a42740 (LWP 8539) "gst-launch-1.0"
0x00007f045fb233cd in poll () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) thread apply all backtrace

Thread 4 (Thread 0x7f045a7d1700 (LWP 8540)):
#0  0x00007f045fe09ca4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f04600a4aaf in g_cond_wait (cond=cond at entry=0x12d05a8,
mutex=mutex at entry=0x12d0568) at
/build/buildd/glib2.0-2.37.6~git20130819.01156b12/./glib/gthread-posix.c:759
#2  0x00007f045e78f233 in wait_segment (buf=buf at entry=0x12d0550) at
gstaudioringbuffer.c:1282
#3  0x00007f045e79144c in gst_audio_ring_buffer_read
(buf=buf at entry=0x12d0550, sample=sample at entry=2997045261,
    data=data at entry=0x7f0454018160
"\213L\vK\373NhM\366PhO\335R2Q\203T\313R\233U\321StV\227T\rW6U2WMU\340V\vU,VHT8U?S\023T!R\232R\270P\271P\341N\210N\256L\371K:J4IvG\024FaD\241B\006A\016?u=
;\251\071",
    len=len at entry=441, timestamp=timestamp at entry=0x7f045a7d0a88) at
gstaudioringbuffer.c:1724
#4  0x00007f045e7a9e41 in gst_audio_base_src_create (bsrc=0x12ad1f0,
offset=<optimized out>, length=<optimized out>, outbuf=0x7f045a7d0c28)
at gstaudiobasesrc.c:815
#5  0x00007f045e0363c2 in gst_base_src_get_range
(src=src at entry=0x12ad1f0, offset=offset at entry=18446744073709551615,
length=length at entry=0, buf=buf at entry=0x7f045a7d0d38) at
gstbasesrc.c:2355
#6  0x00007f045e037c1b in gst_base_src_loop (pad=0x12ae030) at gstbasesrc.c:2613
#7  0x00007f04605f6a71 in gst_task_func (task=0x12f9050) at gsttask.c:316
#8  0x00007f0460089712 in g_thread_pool_thread_proxy (data=<optimized
out>) at /build/buildd/glib2.0-2.37.6~git20130819.01156b12/./glib/gthreadpool.c:309
#9  0x00007f0460088ed5 in g_thread_proxy (data=0x1265370) at
/build/buildd/glib2.0-2.37.6~git20130819.01156b12/./glib/gthread.c:798
#10 0x00007f045fe05f8e in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0
#11 0x00007f045fb2fe1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 3 (Thread 0x7f0459fd0700 (LWP 8541)):
#0  0x00007f045fb27747 in ioctl () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f045e4ecbc4 in ?? () from /usr/lib/x86_64-linux-gnu/libasound.so.2
#2  0x00007f045e9cfa0b in gst_alsasrc_read (asrc=0x12ad1f0,
data=<optimized out>, length=1764, timestamp=0x7f0459fcfe38) at
gstalsasrc.c:906
#3  0x00007f045e7ae5fe in audioringbuffer_thread_func (buf=0x12d0550)
at gstaudiosrc.c:239
#4  0x00007f0460088ed5 in g_thread_proxy (data=0x7f0454002450) at
/build/buildd/glib2.0-2.37.6~git20130819.01156b12/./glib/gthread.c:798
#5  0x00007f045fe05f8e in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007f045fb2fe1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 2 (Thread 0x7f04597cf700 (LWP 8542)):
#0  0x00007f045fb233cd in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f045e4e048f in ?? () from /usr/lib/x86_64-linux-gnu/libasound.so.2
#2  0x00007f045e9cc1a4 in gst_alsasink_write (asink=0x12c5a30,
data=<optimized out>, length=1764) at gstalsasink.c:1012
#3  0x00007f045e7ad939 in audioringbuffer_thread_func (buf=0x12d01c0)
at gstaudiosink.c:252
#4  0x00007f0460088ed5 in g_thread_proxy (data=0x1265770) at
/build/buildd/glib2.0-2.37.6~git20130819.01156b12/./glib/gthread.c:798
#5  0x00007f045fe05f8e in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007f045fb2fe1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 1 (Thread 0x7f0460a42740 (LWP 8539)):
#0  0x00007f045fb233cd in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f04600644fc in g_main_context_poll (n_fds=2, fds=0x12a4ab0,
timeout=250, context=0x12e1620, priority=<optimized out>) at
/build/buildd/glib2.0-2.37.6~git20130819.01156b12/./glib/gmain.c:4006
#2  g_main_context_iterate (context=0x12e1620, block=block at entry=1,
dispatch=dispatch at entry=1, self=<optimized out>) at
/build/buildd/glib2.0-2.37.6~git20130819.01156b12/./glib/gmain.c:3707
#3  0x00007f04600649ca in g_main_loop_run (loop=0x12f7860) at
/build/buildd/glib2.0-2.37.6~git20130819.01156b12/./glib/gmain.c:3906
#4  0x00007f04605a5485 in gst_bus_poll (bus=bus at entry=0x12a1260,
events=events at entry=GST_MESSAGE_ANY,
timeout=timeout at entry=18446744073709551615) at gstbus.c:1086
#5  0x0000000000403b97 in event_loop (pipeline=0x12c8090,
blocking=blocking at entry=1,
target_state=target_state at entry=GST_STATE_PLAYING) at gst-launch.c:592
#6  0x00000000004035b1 in main (argc=13, argv=0x7fff72671fb8) at
gst-launch.c:1114
---8<-------------------------------------------------------------------------

-- 
Thomas DEBESSE
RCF Méditerrannée


More information about the gstreamer-devel mailing list