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.


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

Reply via email to