[pulseaudio-discuss] realtime kernel RLIMIT_RTTIME crashes, rewinds

Tanu Kaskinen tanuk at iki.fi
Wed May 4 00:19:07 PDT 2011

Sorry for the delayed reply.

On Wed, 2011-04-27 at 13:23 +0300, Dan Muresan wrote:
> I've patched (as in attachment) src/daemon/main.c to set the soft
> rttime limit lower than the hard limit. This way I was able to get a
> backtrace in gdb when pulseaudio received SIGXCPU due to excessive
> real-time CPU usage:
> #0  0x0012d422 in ?? ()
> #1  0x00475edb in write () at ../sysdeps/unix/syscall-template.S:82
> #2  0x00153a55 in pa_fdsem_post (f=0x806e178) at pulsecore/fdsem.c:205
> #3  0x0013cb0f in push (l=0x8071bc8, p=0x8, wait_op=false) at
> pulsecore/asyncq.c:161
> #4  0x0013d291 in pa_asyncq_post (l=0x8071bc8, p=0x80736d8) at
> pulsecore/asyncq.c:203
> #5  0x0013c1ee in pa_asyncmsgq_post (a=0x8071a90, object=0xb6a16a08,
> code=7, userdata=0x0, offset=0, chunk=0xbffff590, free_cb=0) at
> pulsecore/asyncmsgq.c:139
> #6  0x009811d7 in pstream_memblock_callback (p=0x808cf78, channel=0,
> offset=0, seek=PA_SEEK_RELATIVE, chunk=0xbffff590, userdata=0x80b6480)
> at pulsecore/protocol-native.c:4445
> #7  0x001dd20b in ?? () from /usr/lib/libpulsecommon-0.9.22.so
> #8  0x001c823e in ?? () from /usr/lib/libpulsecommon-0.9.22.so
> #9  0x0021b5fb in pa_mainloop_dispatch () from /usr/lib/libpulse.so.0
> #10 0x0021bb11 in pa_mainloop_iterate () from /usr/lib/libpulse.so.0
> #11 0x0021bbd4 in pa_mainloop_run () from /usr/lib/libpulse.so.0
> #12 0x08052e85 in main (argc=1, argv=0xbffff854) at daemon/main.c:974
> Can someone point out the likely cause, or is this not enough
> information? This is pulseaudio 0.9.22 from Ubuntu Natty.

I would guess that the excessive cpu use is caused by doing rewinds in
rapid succession. That's just a guess, though - the backtrace doesn't
really give any clue. There have been issues with rewinds happening in
some kind of a loop. David Henningson has been working on this problem
and he has made at least a few patches that help with the problem. The
patches are in Pulseaudio's git repository at least. Since David works
for Canonical, I would expect the fixes to be also in Ubuntu, but I
don't know for sure.

David, what's the status of the "fighting rewinds" patches in Ubuntu
Natty? Is the problem supposed to be fixed already?


More information about the pulseaudio-discuss mailing list