Re: [pulseaudio-discuss] realtime kernel RLIMIT_RTTIME crashes, rewinds
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=0xb590, 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=0xb590, 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=0xb854) 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? -- Tanu ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] realtime kernel RLIMIT_RTTIME crashes, rewinds
On 2011-05-04 08:19, Tanu Kaskinen wrote: 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=0xb590, 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=0xb590, 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=0xb854) 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? My rewind patches are both in Natty and stable-queue, but this bug is something different. IIRC I had a quick look at it, didn't have time to look really deep, so I just responded in the launchpad bug Dan also posted in (see https://bugs.launchpad.net/ubuntu/+source/linux-rt/+bug/367671 ) -- David Henningsson http://launchpad.net/~diwic ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] realtime kernel RLIMIT_RTTIME crashes, rewinds
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=0xb590, 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=0xb590, 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=0xb854) 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. -- Dan Make rlimit_rttime soft limit smaller to enable debugging Index: pulseaudio-0.9.22+stable-queue-24-g67d18/src/daemon/main.c === --- pulseaudio-0.9.22+stable-queue-24-g67d18.orig/src/daemon/main.c 2011-04-26 19:04:36.321455493 +0300 +++ pulseaudio-0.9.22+stable-queue-24-g67d18/src/daemon/main.c 2011-04-26 19:05:41.481378151 +0300 @@ -292,6 +292,9 @@ return 0; rl.rlim_cur = rl.rlim_max = r-value; +#ifdef RLIMIT_RTTIME +rl.rlim_cur *= 0.85; +#endif if (setrlimit(resource, rl) 0) { pa_log_info(_(setrlimit(%s, (%u, %u)) failed: %s), name, (unsigned) r-value, (unsigned) r-value, pa_cstrerror(errno)); ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss