[pulseaudio-discuss] Mono and SIGPWR interaction

Jay L. T. Cornwall jay at jcornwall.me.uk
Tue Dec 2 18:01:33 PST 2008


I am working on an application written in C# with the Mono framework on 
Linux. I have built a managed/unmanaged interface and successfully 
played back audio with the PulseAudio client library in a GTK 
application with libpulse-mainloop-glib.

For performance reasons I would like to use the threaded main loop API 
instead. I set up the thread and call pa_threaded_mainloop_start and all 
seems well. However, when I hit a Mono DNS lookup in a completely 
unrelated thread the application ceases to respond. An strace reveals 
these as the last few events:

poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=15, 
events=POLLIN|POLLPRI}, {fd=17, events=POLLIN|POLLPRI}, {fd=18, 
events=POLLIN|POLLPRI}, {fd=19, events=POLLIN|POLLPRI}, {fd=25, 
events=POLLIN}], 7, -1) = ? ERESTART_RESTARTBLOCK (To be restarted)
--- SIGPWR (Power failure) @ 0 (0) ---
futex(0x8941a0, 0x81 /* FUTEX_??? */, 1) = 1
rt_sigsuspend(~[INT QUIT ABRT TERM XCPU RTMIN RT_1] <unfinished ...>

As explained on this page Mono makes use of the SIGPWR signal:


I suspect that the PulseAudio threaded main loop API is stealing signals 
that Mono needs to rely upon, as this does not occur if I omit the 
pa_threaded_mainloop_start call. Would this analysis be correct and is 
there a way to make PulseAudio act more conservatively in its thread?


Jay L. T. Cornwall

More information about the pulseaudio-discuss mailing list