Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Nov 2018 08:57:23 +0100
From:      Matthias Apitz <guru@unixarea.de>
To:        freebsd-questions@freebsd.org, freebsd-multimedia@freebsd.org
Subject:   pulseaudio fails on start
Message-ID:  <20181127075723.GA27384@sh4-5.1blu.de>

Next in thread | Raw E-Mail | Index | Archive | Help

Hello,

I'm trying to port the OpenSource Mycroft AI Open Source Voice Assistant
to FreeBSD. Written in Python for Linux (i.e. with a lot of Linux
specials) I have the command line client already working: The assistant
is taking commands/request given as speech and answers in text, but not
in speech. Details of the solved problems on the port can be read here:
https://community.mycroft.ai/t/mycroft-on-freebsd/5119

At the moment I'm struggling with the pulseaudio on FreeBSD which is
used by the Mycroft, but does not start on FreeBSD, even not from the
cmd line without thinking in Mycroft.

When I do:

$ truss -f -o tr -s128 pulseaudio --start --log-level=4
W: [(null)] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.
D: [(null)] conf-parser.c: Parsing configuration file '/usr/local/etc/pulse/client.conf'
D: [(null)] conf-parser.c: /usr/local/etc/pulse/client.conf.d does not exist, ignoring.
E: [(null)] main.c: Daemon startup failed.

it gives in /var/log/debug.log the messages attached below. The truss
output shows that some part of pulseaudio daemon is crashing:

...
 2369: sendto(3,"<14>Nov 27 08:41:49 pulseaudio[2369]: [(null)]
module-oss.c: Output -- 4 fragments of size 4096.",96,0x0,NULL,0x0) = 96
(0x60)
 2369: mmap(0x0,16384,PROT_WRITE,MAP_SHARED,11,0x0) = 34366627840
(0x800692000)
 2369: getpid()                                  = 2369 (0x941)
 2369: sendto(3,"<15>Nov 27 08:41:49 pulseaudio[2369]: [(null)]
module-oss.c: Successfully mmap()ed output buffer.",97,0x0,NULL,0x0) =
97 (0x61)
 2369: SIGNAL 11 (SIGSEGV)
 2369: sigprocmask(SIG_SETMASK,{ SIGSEGV },0x0)  = 0 (0x0)
 2369: write(2,"Failed to handle SIGBUS.\n",25)  = 25 (0x19)
 2369: sigprocmask(SIG_SETMASK,{
SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2
},0x0) = 0 (0x0)
 2369: thr_self(0x7fffffffc950)                  = 0 (0x0)
 2369: thr_kill(100527,SIGABRT)                  = 0 (0x0)
 2369: SIGNAL 6 (SIGABRT)
...

Here is the debug.log, any ideas how to get this to work?


Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] core-util.c: Failed to acquire high-priority scheduling: Operation not supported
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: This is PulseAudio 10.0
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Compilation host: amd64-portbld-freebsd12.0
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Compilation host: amd64-portbld-freebsd12.0
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Compilation CFLAGS: -O2 -pipe  -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -Wall -W -Wextra -Wno-long-long -Wno-overlength-strings -Wundef -Wformat=2 -Wsign-compare -Wformat-security -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Compilation CFLAGS: -O2 -pipe  -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -Wall -W -Wextra -Wno-long-long -Wno-overlength-strings -Wundef -Wformat=2 -Wsign-compare -Wformat-security -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Running on host: FreeBSD amd64 12.0-CURRENT FreeBSD 12.0-CURRENT #1 r314251M: Fri Jun 30 08:50:03 CEST 2017     guru@c720-r314251:/usr/obj/usr/src/sys/GENERIC
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Running on host: FreeBSD amd64 12.0-CURRENT FreeBSD 12.0-CURRENT #1 r314251M: Fri Jun 30 08:50:03 CEST 2017     guru@c720-r314251:/usr/obj/usr/src/sys/GENERIC
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Found 2 CPUs.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Found 2 CPUs.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Page size is 4096 bytes
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Compiled with Valgrind support: no
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Compiled with Valgrind support: no
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Running in valgrind mode: no
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Running in valgrind mode: no
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Running in VM: no
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Running in VM: no
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Optimized build: yes
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Optimized build: yes
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: FASTPATH defined, only fast path asserts disabled.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: FASTPATH defined, only fast path asserts disabled.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Machine ID is 41807f6b8965d38bc4110b3a55be1713.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Using runtime directory /home/guru/.config/pulse/41807f6b8965d38bc4110b3a55be1713-runtime.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Using state directory /home/guru/.config/pulse.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Using modules directory /usr/local/lib/pulse-10.0/modules.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: Running in system mode: no
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] pid.c: Stale PID file, overwriting.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] main.c: System supports high resolution timers
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] memblock.c: Using shared posix-shm memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65472
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] memblock.c: Using shared posix-shm memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65472
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] cpu-x86.c: CPU flags: CMOV MMX SSE SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] svolume_mmx.c: Initialising MMX optimized volume functions.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] remap_mmx.c: Initialising MMX optimized remappers.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] svolume_sse.c: Initialising SSE2 optimized volume functions.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] remap_sse.c: Initialising SSE2 optimized remappers.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] sconv_sse.c: Initialising SSE2 optimized conversions.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] svolume_orc.c: Initialising ORC optimized volume functions.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] module-device-restore.c: Successfully opened database file '/home/guru/.config/pulse/41807f6b8965d38bc4110b3a55be1713-device-volumes'.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] module.c: Loaded "module-device-restore" (index: #0; argument: "").
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] module-stream-restore.c: Successfully opened database file '/home/guru/.config/pulse/41807f6b8965d38bc4110b3a55be1713-stream-volumes'.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1 added for object /org/pulseaudio/stream_restore1
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1 added for object /org/pulseaudio/stream_restore1
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] module.c: Loaded "module-stream-restore" (index: #1; argument: "").
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] module-card-restore.c: Successfully opened database file '/home/guru/.config/pulse/41807f6b8965d38bc4110b3a55be1713-card-database'.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] module.c: Loaded "module-card-restore" (index: #2; argument: "").
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] module.c: Loaded "module-augment-properties" (index: #3; argument: "").
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] module.c: Loaded "module-switch-on-port-available" (index: #4; argument: "").
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] module.c: Checking for existence of '/usr/local/lib/pulse-10.0/modules/module-detect.so': success
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] module.c: Checking for existence of '/usr/local/lib/pulse-10.0/modules/module-detect.so': success
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] oss-util.c: '/dev/dsp0' doesn't support full duplex
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] oss-util.c: capabilities: MMAP REALTIME TRIGGER
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] oss-util.c: capabilities: MMAP REALTIME TRIGGER
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] module-oss.c: Device opened in O_WRONLY mode.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] oss-util.c: Asking for 4 fragments of size 4096 (requested 4408)
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] oss-util.c: Asking for 4 fragments of size 4096 (requested 4408)
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] module-oss.c: Output -- 4 fragments of size 4096.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] module-oss.c: Successfully mmap()ed output buffer.
Nov 27 08:41:49 c720-r314251 pulseaudio[2369]: [(null)] module-oss.c: Successfully mmap()ed output buffer.
Nov 27 08:41:49 c720-r314251 kernel: pid 2369 (pulseaudio), uid 1001: exited on signal 6
-- 
Matthias Apitz, ‚úČ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
October, 7 -- The GDR was different: Peace instead of Bundeswehr and wars, Druschba
instead of Nazis, to live instead of to survive.



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20181127075723.GA27384>