Re: Bug#705435: [kfreebsd] hangs on pulseaudio --start
On my system the daemon fails to start in any case with 'Daemon startup
failed', but that is a separate issue and less serious. There seem to
be two separate places where pulseaudio --start may hang indefinitely on
On my system, it is slightly better:
E: [(null)] client-conf-x11.c: xcb_connection_has_error() returned true
I: [(null)] main.c: Daemon startup successful.
1. after printing 'Daemon startup failed' - the attached patch fixes
this hang (I believe some real-time signals are being blocked, which are
necessary for kFreeBSD's threads implementation, LinuxThreads, to work
This one is due to usage of sigprocmask(), it behaviour is unspecified
in a multi-threaded process, see
Upstream should fix it by:
@@ -2503,7 +2503,14 @@
if (sigaddset(&ss, except[i]) < 0)
+ /* If POSIX threads are supported use thread-aware
+ * pthread_sigmask() function */
+# ifdef HAVE_PTHREAD
+ return pthread_sigmask(SIG_SETMASK, &ss, NULL);
return sigprocmask(SIG_SETMASK, &ss, NULL);
2. before printing 'Daemon startup failed' - this happens approx. 10x
less frequently (so applying the patch is already an improvement) - I'm
not sure yet what causes this.
It is not fixed by the patch above.