Hello audio developers,
I have been working slowly on a port of a radio automation system I
originally wrote for OSX to a more general, cross-platform design using
jack-audio and gstreamer instead of Apple's Core audio API. As part of
the design change, I have separated the mix-engine and media handling
into separate processes, where the mixer forks media players, which
connect back the core mixer via jack, then are disconnected by the
mixer when finished, prior to the media player instance shutting down.
It appears to me that there is a problem with jackd crashing after a
day or two of the core mixer (arServer4) running new media player
clients, connecting, disconnecting, and then quitting, as music is
loaded and played in a test automation scenario, on an Ubuntu 19.10
test setup. I have been debugging both the core-mixer programs and the
the media players over the course of the last few months. I don't see
any memory leaks any more, and all thread safety issues appear to have
been resolved. I am not calling jack calls in the real-time render
thread that are not intended for use in that thread. All jack client
client call backs are handles through a message queue, so they to are
also safe. All other jack calls are protected by a thread
lock. Again, my programs are not crashing, jackd is. And nothing
crashes for weeks when I keep one media player connected to my core-
mixer, playing the same file over and over. So it really does appear
to be the connections and disconnections that are causing the
trouble. As a side note, Carla is also crashing, but about 3 time more
often than jackd is.
Here is what I get from my arServer4 core-mixer program's stderr
(registered to jackd as "ars9550"), just before the jack-server
shutdown call back fires off:
Cannot read socket fd = 7 err = Success
CheckRes error
JackSocketClientChannel read fail
SuspendRefNum error
JackClient::Execute error name = ars9550
Server is not running
I am running jackd in a shell so I can watch it crash, and it just
appears to just die after a few days... no special messages.
jackd -v yields:
jackdmp 1.9.12
[copyright stuff...]
Which, even though it is version 1.9.12, I believe is a jack2 server
correct? This is supposed to support live client connection and
disconnection, so I don't think I am doing anything wrong.
I would like to run jackd in gdb so I can see where it is failing, but
I am unsure how to build it without breaking my system's installed jack
package, which is of course built without debugging enabled.
Any help would be appreciated.
Ethan Funk
Audiorack4 project hosted at:
https://github.com/eafunk/audiorack