Open tokiclover opened 6 years ago
Was jack built with gcc7? gcc4 to gcc5 changed the c++ ABI, so applications compiled with gcc4 cannot load plugins or external c++ modules made with gcc >= 5. I recommend you to rebuild jack and applications that use it, then see if the issue still happens. let me know how that goes, thank you.
As you can see above (libjack.so
library linkage), JACK was recompiled with GCC-7.3.0 as all packages linked against libstdc++.so
.
This what happen a client, alsa_out here, try to connect to JACK:
gdb -- alsa_out
(gdb) run -j playback_palp -d palp -q1
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/bin/alsa_out -j playback_palp -d palp -q1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff7fb5700 (LWP 28469)]
[New Thread 0x7ffff7f34700 (LWP 28475)]
selected sample format: float
[New Thread 0x7ffff7eb3700 (LWP 28484)]
Thread 4 "alsa_out" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7eb3700 (LWP 28484)]
Jack::JackClient::WaitSync (this=0x555555779df0) at ../common/JackClient.cpp:626
626 ../common/JackClient.cpp: No such file or directory.
../common/JackClient.cpp:
623 inline bool JackClient::WaitSync()
624 {
625 // Suspend itself: wait on the input synchro
626 if (GetGraphManager()->SuspendRefNum(GetClientControl(), fSynchroTable, 0x7FFFFFFF) < 0) {
627 jack_error("SuspendRefNum error");
628 return false;
629 } else {
630 return true;
631 }
632
This issue is already a bit old, but I got a same or similar problem when (finally) switching from Jack 1 to Jack 2 (1.9.13) on my Gentoo system (GCC 9.2), with all Jack clients crashing.
On my system it seems it was caused by having enabled LTO optimizations by default. Disabling LTO for jack2 build fixed all the crashes, it's working fine without it. It seems it also works correctly when building jack2 with LTO using Clang 9 instead of GCC.
So it looks like it may be the same cause as #485
Did you by change had LTO enabled when this happened ? (Note: Jack v1 was working correctly when built with LTO)
Maybe this one can help: https://gist.github.com/SudoNova/89a17c8e8d3e62b6ed0a17d06a877053 Also:
=================================================================
Package Settings
=================================================================
media-sound/jack2-1.9.14::gentoo was built with the following:
USE="alsa classic dbus ieee1394 libsamplerate metadata opus pam readline sndfile -doc" PYTHON_SINGLE_TARGET="python3_8"
CFLAGS="-O2 -march=native -mtune=native -malign-data=cacheline -mtls-dialect=gnu2 -mfpmath=both -fPIC -fuse-linker-plugin -flto=auto -flto-compression-level=0 -flto-partition=balanced -pthread -ftracer -ftree-vectorize -floop-unroll-and-jam -ftree-loop-distribution -ftree-loop-ivcanon -fpredictive-commoning -floop-interchange -fgraphite-identity -floop-nest-optimize -fno-math-errno -fno-trapping-math -fipa-pta -fno-plt -ggdb3 -fdevirtualize-at-ltrans -fno-semantic-interposition -fweb -falign-functions=32:13:16 -falign-loops=32:13:16 -falign-jumps=32:13:16 -falign-labels=32:13:16 -fgcse-sm -fgcse-las -fgcse-after-reload -fgcse-sm -fgcse-las -fgcse-after-reload -fgcse-sm -fgcse-las -fgcse-after-reload -fgcse-sm -fgcse-las -fgcse-after-reload -fgcse-sm -fgcse-las -fgcse-after-reload -fgcse-sm -fgcse-las -fgcse-after-reload -fgcse-sm -fgcse-las -fgcse-after-reload -fno-common -fstack-protector-explicit -fdiagnostics-color=always"
CXXFLAGS="-O2 -march=native -mtune=native -malign-data=cacheline -mtls-dialect=gnu2 -mfpmath=both -fPIC -fuse-linker-plugin -flto=auto -flto-compression-level=0 -flto-partition=balanced -pthread -ftracer -ftree-vectorize -floop-unroll-and-jam -ftree-loop-distribution -ftree-loop-ivcanon -fpredictive-commoning -floop-interchange -fgraphite-identity -floop-nest-optimize -fno-math-errno -fno-trapping-math -fipa-pta -fno-plt -ggdb3 -fdevirtualize-at-ltrans -fno-semantic-interposition -fweb -falign-functions=32:13:16 -falign-loops=32:13:16 -falign-jumps=32:13:16 -falign-labels=32:13:16 -fgcse-sm -fgcse-las -fgcse-after-reload -fgcse-sm -fgcse-las -fgcse-after-reload -fgcse-sm -fgcse-las -fgcse-after-reload -fgcse-sm -fgcse-las -fgcse-after-reload -fgcse-sm -fgcse-las -fgcse-after-reload -fgcse-sm -fgcse-las -fgcse-after-reload -fgcse-sm -fgcse-las -fgcse-after-reload -fno-common -fstack-protector-explicit -fdiagnostics-color=always -fvisibility-inlines-hidden
LDFLAGS="-Wl,-O2 -Wl,--as-needed -Wl,-z,combreloc -Wl,-z,now -Wl,-z,relro -Wl,--sort-common -pthread"
I know those flags are overkill, but I can compile with whatever flag you advise to narrow down the problem, if needed.
I upgraded a Gentoo system from GCC-4.9.4 to GCC-7.3.0. I won't report the details, but JACK does no function properly.
libjack.so
segfaults for simple operations like client connection or automatic client renaming.A typical error when trying to connect to JACK is:
with this segmentation fault:
May 20 10:35:42 localhost kernel: alsa_in[30147]: segfault at 7fc640bcb08e ip 00007fc63f758488 sp 00007fc63fe2ae20 error 4 in libjack.so.0.1.0[7fc63f73f000+3a000]
When trying to test JACK with
jack_test
, I got this:with this segmentation fault:
May 20 10:38:42 localhost kernel: jack_test[30190]: segfault at 7f2c2ac9c096 ip 00007f2c2983c465 sp 00007ffcbb734870 error 4 in libjack.so.0.1.0[7f2c2982d000+3a000]
JACK is built with ALSA, dBus, FFADO, samplerate, PAM, readline and sndfile support.
libjack.so
is only linked to GLibc GCC and ALSA:GCC-5.x.y transitioned to c++11 standard as a
g++
default. So, GCC-7.3.0 compiles JACK to c++11 in the absence of a-std=STANDARD
argument tog++
. But there is no argument whatsoever passed to the C++ compiler. Should I add anything to CXXFLAGS? The compilation and linkage goes fine without any error.