[pulseaudio-discuss] Pulseaudio inside docker container

Sean Greenslade sean at seangreenslade.com
Sat Dec 12 00:25:38 UTC 2020


On Wed, Dec 09, 2020 at 07:37:22AM +1300, Gino Lisignoli wrote:
> I've been trying to create a lightweight docker container that runs a
> single application with wine and xvfb, except the application requires
> pulseaudio otherwise it crashes. Specifically with the error:
> 
> Assertion 'clock_gettime(CLOCK_REALTIME, &ts) == 0' failed at
> pulsecore/core-rtclock.c:93, function pa_rtclock_get(). Aborting.
> 
> I'm using the following startup script:
> 
> /root/.config/pulse/default.pa
>   .include /etc/pulse/default.pa
>   load-module module-native-protocol-unix auth-anonymous=1
> socket=/tmp/pulse-socket
> 
> Then starting pulseaudio with:
> pulseaudio -v --start --log-target=file:/root/pulse.log
> 
> One line that seems relevant to me is:
> I: [null-sink] util.c: Failed to acquire real-time scheduling:
> Input/output error
> 
> That's as far as I have gotten. If  there any ideas on how I could
> troubleshoot this that would be awesome. Thanks!

Not being someone who uses docker, all I can do is give you some general
hints at places to look.

clock_gettime() returning an error is pretty weird. CLOCK_REALTIME is
supposed to always be available, and the vast majority of possible
errors are related only to settime, not gettime. My guess would be that
docker is doing something weird and breaking the clock_gettime syscall
somehow. A quick google didn't turn up anything relevant, so this may be
a question for a docker support forum.

The line you mentioned in the logs:

> I: [null-sink] util.c: Failed to acquire real-time scheduling:

Is not relevent to this issue. It's referring to getting high-priority
"real-time" scheduling from the CPU scheduler. The assert fail is about
reading the wall clock time of the computer. The scheduling warning will
not hurt anything, real-time scheduling is not required for Pulse to
work.

--Sean



More information about the pulseaudio-discuss mailing list