Jack clients segfaults when started simultaneously on multiple CPU Cores
- PipeWire version (
pipewire --version
):
pipewire
Compiled with libpipewire 0.3.51
Linked with libpipewire 0.3.51
-
Distribution and distribution version (
PRETTY_NAME
from/etc/os-release
): Alpine Linux v3.16 (Edge) -
Desktop Environment: Wayland / Sway
-
Kernel version (
uname -r
): 5.15.41-0-lts
Description of Problem:
When a client loads plugins via jack simultaneously, it crashes with Segmentation Fault. Reproduced with carla and calfjackhost.
Issue also registered with the Carla Project
How Reproducible:
9 out of 10 times
Steps to Reproduce:
With Carla:
- Go to Carla Settings -> Engine
- Make sure Audio Driver is set to JACK and Process Mode is set to Multiple Clients
- Add plugins to the rack (I have 11 plugins configured, the more you have the more likely it crashes)
- Save the project to a file, i e carla.carxp
- Start carla with the project file carla ./carla.carxp
With calfjackhost:
- cut and paste the following into a terminal running bash (or compatible shell):
c=1
while [ $c -le 10 ] ; do
c=$(($c + 1))
calfjackhost -c "Calf Rack $c" mono ! eq5 ! multibandgate ! compressor ! limiter multibandgate compressor ! limiter &
done
Actual Results:
With Carla:
It crashes after loading one or more plugins
masa@gurkhost (3:503) [~]$ carla ./carla.carxp
Carla 2.4.3 started, status:
Python version: 3.10.4
Qt version: 5.15.3
PyQt version: 5.15.6
Binary dir: /usr/lib/carla
Resources dir: /usr/share/carla/resources
Frontend pixel ratio is 1.0
libjack.so.0 loaded successfully!
[carla] Will use UI-Bridge for 'Meetings Proc Input', binary: "/usr/lib/carla/carla-bridge-lv2-x11"
Segmentation fault
From dmesg (after multiple retries):
[152779.124433] pw-Analyzer - A[7064]: segfault at 0 ip 0000000000000000 sp 00007fdf65ddc880 error 14 in python3.10[55aed5da6000+1000]
[152779.124443] Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
[152781.907985] pw-Compressor S[7155]: segfault at 0 ip 0000000000000000 sp 00007f8bacaa4870 error 14 in python3.10[55fe2da76000+1000]
[152781.907995] Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
[152784.767966] pw-Mic delay[7244]: segfault at 0 ip 0000000000000000 sp 00007fd555dad870 error 14 in python3.10[556132d7f000+1000]
[152784.767980] Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
[152787.122643] pw-Meetings Pro[7314]: segfault at 0 ip 0000000000000000 sp 00007ff2b77ec890 error 14 in python3.10[559253cc8000+1000]
[152787.122653] Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
[152789.404721] pw-Meetings Pro[7361]: segfault at 0 ip 0000000000000000 sp 00007f4de045a890 error 14 in python3.10[55e6ebd8d000+1000]
[152789.404731] Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
[152791.966971] pw-Analyzer - M[7437]: segfault at 0 ip 0000000000000000 sp 00007f7136cee870 error 14 in python3.10[55924c327000+1000]
[152791.966981] Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
With calfjackhost:
One or more of the processes crashes with Segmentation Fault
[29145.071683] pw-Calf Rack 2[14916]: segfault at 0 ip 0000000000000000 sp 00007f6565358030 error 14 in calfjackhost[559d8fb32000+15000]
[29145.071696] Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
Expected Results:
No crashes and clients created correctly
Additional Info (as attachments):
Workaround for Carla
By pinning carla to just one CPU core with taskset 0x01 carla ./carla.carxp it does not crash
Workaround for calfjackhost
Start one process at a time by adding a sleep in the loop
-
pw-dump > pw-dump.log
:pw-dump.log