Bug#705435: [kfreebsd] hangs on pulseaudio --start

Petr Salinger Petr.Salinger at seznam.cz
Tue Apr 16 06:36:05 UTC 2013


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

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
> properly);

This one is due to usage of sigprocmask(), it behaviour is unspecified
in a multi-threaded process, see
http://pubs.opengroup.org/onlinepubs/9699919799/functions/sigprocmask.html

Upstream should fix it by:

--- src/pulsecore/core-util.c
+++ src/pulsecore/core-util.c
@@ -2503,7 +2503,14 @@
          if (sigaddset(&ss, except[i]) < 0)
              return -1;

+    /* If POSIX threads are supported use thread-aware
+     * pthread_sigmask() function */
+
+# ifdef HAVE_PTHREAD
+    return pthread_sigmask(SIG_SETMASK, &ss, NULL);
+# else
      return sigprocmask(SIG_SETMASK, &ss, NULL);
+# endif
  #else
      return 0;
  #endif

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

Petr



More information about the pkg-pulseaudio-devel mailing list