[Bug 692953] alsa modules are silent or noisy after several hours of use (Gst 0.10.30 and Gst 1.0.4)

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Aug 21 06:27:01 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=692953
  GStreamer | gst-plugins-base | 1.0.4

--- Comment #8 from Thomas DEBESSE <thomas.debesse at rcf.fr> 2013-08-21 13:26:54 UTC ---
Good News, I have a "silent pipeline" near to me ! :)

(from developer mail list) :
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 "silent pipeline" with gdb attached on it near to me.

Yesterday I have launched this pipeline (without alsa software mixer or
converter) :

gst-launch-1.0 -v alsasrc device="hw:1" ! audioconvert ! audioresample !
"audio/x-raw, format=S16LE, channels=2" ! alsasink device="hw:1" sync=false

Same audio interface, same sampling (audio interface physically configured to
44100), same format.

The Interface is a Zoom H2n http://www.zoom.co.jp/products/h2n/ which is cool
to do some test :
* no hardware mixer (does not allow multiple recording or multiple playing
simultaneously)
* hardware volume control of input and output can't be controlled from software
* hardware volume control can only be controlled manually on the interface
(analogic input volume control, numeric output volume control)
* vumeter integrated to the interface (shows input level)
* the sampling configuration (48000 or 44100) is set manually on the audio
interface at power on and cannot be changed on the fly

There is no doubt with this audio interface : I am testing on the PC only
Gstreamer and alsa, not another hidden thing.

===== Software versions : =======

illwieckz at computer ~ $ lsb_release -i -c -r
Distributor ID:    Ubuntu
Release:    13.04
Codename:    raring

illwieckz at computer ~ $ uname -s -r -v -p -o
Linux 3.8.0-29-generic #42-Ubuntu SMP Tue Aug 13 19:40:39 UTC 2013 x86_64
GNU/Linux

illwieckz at computer ~ $ gst-inspect-1.0 alsasrc | grep Version
  Version:        1.0.6
illwieckz at computer ~ $ gst-inspect-1.0 alsasink | grep Version
  Version:        1.0.6

illwieckz at computer ~ $ apt-cache show gstreamer1.0-tools | grep Version
Version: 1.0.6-1
illwieckz at computer ~ $ apt-cache show gstreamer1.0-alsa | grep Version
Version: 1.0.6-1
Gstreamer-Version: 1.0
illwieckz at computer ~ $ apt-cache show alsa-base | grep Version
Version: 1.0.25+dfsg-0ubuntu4

=================================

This the stdios (nothing since yesterday) :

---8<-------------------------------------------------------------------------
illwieckz at computer ~ $ gst-launch-1.0 -v alsasrc device="$alsa_iface" !
audioconvert ! audioresample ! "audio/x-raw, format=S16LE, channels=2" !
alsasink device="$alsa_iface" sync=false
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 yesterday, nothing printed when bug appears)


More than 18 hours later (just now), the pipeline become silent.

I hear the audio source (physically) , also, the audio interface has an
integrated vu-metter showing the input level, the audio input is ok (vu-metter
showing the volume of the sound and variations).
But the output of the audio interface is silent.

====== schema, yesterday ======

physical audio source
↓
[→ physical speaker (sound ok)
↓
physical input of audiointerface (vu metter ok)
[computer with gstreamer "alsasrc ! … ! alsasink" pipeline]
physical output of audiointerface
↓
physical speaker (sound ok)

============================

====== schema, today ==========

physical audio source
↓
[→ physical speaker (sound ok)
↓
physical input of audiointerface (vu metter ok)
[computer with gstreamer "alsasrc ! … ! alsasink" pipeline]
physical output of audiointerface
↓
physical speaker (sound not ok, silence)

============================

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<-------------------------------------------------------------------------
(endlessly)

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<-------------------------------------------------------------------------
(endlessly)

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<-------------------------------------------------------------------------

I'm not familiar with gdb, what can I do for you ?

I can keep the bugged processes alive some hours or day if you have some things
to ask me to do. And pray that I do not have power outages. :)

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list