[pulseaudio-discuss] Frequent trivially-reproducible client hangs with stable-queue PA

Nix nix at esperi.org.uk
Mon Feb 22 10:50:00 PST 2010


Ever since I started using PA 0.9.21 (and possibly before: it's been
long enough that my memory has faded), lots of applications have started
hanging hard when fast-forwarded/rewound. This includes MPD and every
single video player I own capable of fullscreen playback. As you might
imagine, having to stop PA playing back sound and forcing all my video
and music players not to use PA renders it... less useful than it might
be, and the constant need to pay attention to ALSA volume levels makes
PA's otherwise admirable ALSA volume-level frotzing annoying as
well. (I'd use the ALSA->PA plugin, but as reported earlier, this
doesn't work either, stuttering like crazy and frequently locking up.
It may be that the ALSA plugin lockup is a special case of this one.)

It seems unlikely to me that every one of these applications is buggy:
the problem more probably lies in PA itself.

This is still reproducible with stable-queue HEAD.

In all cases they seem to get stuck waiting for PA to send something
that it never sends (or, at least, all are stuck in poll()...)

Examples, with client backtraces, include:

 - mpd 0.15.x (4..HEAD tested). Hangs when a track is rewound,
   fast-forwarded or restarted from scratch withot stopping it first.
   kill -9 required to get rid of it.

   Apparently PA-related client backtraces (there are other threads,
   but they're not inside libpulse and just seem to be waiting for it):

#0  0x00007f9f560932b3 in poll () from /lib/libc.so.6
#1  0x00007f9f568c0f5f in poll_func () from /usr/lib/libpulse.so.0
#2  0x00007f9f568b0db6 in pa_mainloop_poll () from /usr/lib/libpulse.so.0
#3  0x00007f9f568b2199 in pa_mainloop_iterate () from /usr/lib/libpulse.so.0
#4  0x00007f9f568b2250 in pa_mainloop_run () from /usr/lib/libpulse.so.0
#5  0x00007f9f568c0d5b in thread () from /usr/lib/libpulse.so.0
#6  0x00007f9f5315dc87 in internal_thread_func () from /usr/lib/libpulsecommon-0.9.21.so
#7  0x00007f9f56fbc71a in start_thread () from /lib/libpthread.so.0
#8  0x00007f9f5609d96d in clone () from /lib/libc.so.6
#9  0x0000000000000000 in ?? ()

#0  0x00007f9f56fc0d87 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f9f568c083f in pa_threaded_mainloop_wait () from /usr/lib/libpulse.so.0
#2  0x00007f9f56ad7116 in pa_simple_write () from /usr/lib/libpulse-simple.so.0
#3  0x0000000000419dc7 in pulse_play ()
#4  0x0000000000416f17 in audio_output_task ()
#5  0x00007f9f5a72815b in g_thread_create_proxy (data=<value optimized out>) at gthread.c:635
#6  0x00007f9f56fbc71a in start_thread () from /lib/libpthread.so.0
#7  0x00007f9f5609d96d in clone () from /lib/libc.so.6
#8  0x0000000000000000 in ?? ()

 - xine (1.1.16.3 -- 1.1.17 HEAD tested). Sound vanishes when a movie is
   first rewound or fast-forwarded: xine locks up and requires a kill -9
   on subsequent rewind/fast-forward/pause. Apparently-relevant backtraces
   (ew, it's using libao? still, this is the only libao user in this set
   of hanging programs, so it can't be an ao-pulse bug):

#0  0x00007ff0d8701d87 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007ff0c7ce983f in pa_threaded_mainloop_wait (m=0x26b0f80) at pulse/thread-mainloop.c:212
#2  0x00007ff0c7f001fe in ao_pulse_write (this_gen=0x26b0e30, data=0x26fd360, num_frames=<value optimized out>) at audio_pulse_out.c:467
#3  0x00007ff0da0d47ae in ao_loop (this_gen=<value optimized out>) at audio_out.c:1245
#4  0x00007ff0d86fd71a in start_thread () from /lib/libpthread.so.0
#5  0x00007ff0d89df96d in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

#0  0x00007ff0d89d52b3 in poll () from /lib/libc.so.6
#1  0x00007ff0c7ce9f5f in poll_func (ufds=0x26b2d80, nfds=2, timeout=1500, userdata=0x26b1120) at pulse/thread-mainloop.c:75
#2  0x00007ff0c7cd9db6 in pa_mainloop_poll (m=0x26b11a0) at pulse/mainloop.c:879
#3  0x00007ff0c7cdb199 in pa_mainloop_iterate (m=0x26b11a0, block=<value optimized out>, retval=0x0) at pulse/mainloop.c:961
#4  0x00007ff0c7cdb250 in pa_mainloop_run (m=0x26b11a0, retval=0x0) at pulse/mainloop.c:979
#5  0x00007ff0c7ce9d5b in thread (userdata=0x26b0f80) at pulse/thread-mainloop.c:94
#6  0x00007ff0c7aa7c87 in internal_thread_func (userdata=0x26b1320) at pulsecore/thread-posix.c:72
#7  0x00007ff0d86fd71a in start_thread () from /lib/libpthread.so.0
#8  0x00007ff0d89df96d in clone () from /lib/libc.so.6
#9  0x0000000000000000 in ?? ()

 - mplayer, similar to xine, but killable with SIGINT and SIGTERM as well
   as SIGKILL; no libao use here. Only has two threads, one doing nothing
   but waiting for this one:

#0  0x00007ffdd156b2b3 in poll () from /lib/libc.so.6
#1  0x00007ffdd5a73f5f in poll_func (ufds=0x16a3730, nfds=2, timeout=1500, userdata=0x16dc2c0) at pulse/thread-mainloop.c:75
#2  0x00007ffdd5a63db6 in pa_mainloop_poll (m=0x16dc1c0) at pulse/mainloop.c:879
#3  0x00007ffdd5a65199 in pa_mainloop_iterate (m=0x16dc1c0, block=<value optimized out>, retval=0x0) at pulse/mainloop.c:961
#4  0x00007ffdd5a65250 in pa_mainloop_run (m=0x16dc1c0, retval=0x0) at pulse/mainloop.c:979
#5  0x00007ffdd5a73d5b in thread (userdata=0x16b4680) at pulse/thread-mainloop.c:94
#6  0x00007ffdcfc91c87 in internal_thread_func (userdata=0x16dc550) at pulsecore/thread-posix.c:72
#7  0x00007ffdd72b671a in start_thread () from /lib/libpthread.so.0
#8  0x00007ffdd157596d in clone () from /lib/libc.so.6
#9  0x0000000000000000 in ?? ()



More information about the pulseaudio-discuss mailing list