jackaudio / jack2

jack2 codebase
GNU General Public License v2.0
2.21k stars 376 forks source link

32 bit clients can't connect to a 64 bit server #221

Closed Ace17 closed 7 years ago

Ace17 commented 8 years ago

Here's a script showing the issue. It builds JACK in 64 bits, then in 32 bits in another output directory. Then, it launches the 64-bit JACK server. Then, it launches a 32-bit example client, whose "process" function is never called.

$ cat reproduce_issue.sh
#!/usr/bin/env bash
set -euo pipefail

export JACK_DEFAULT_SERVER=dummy

readonly tmpDir=/tmp/jack-test
rm -rf $tmpDir
mkdir -p $tmpDir

git clone --depth=1 git://github.com/jackaudio/jack2.git $tmpDir/jack

pushd $tmpDir/jack

CC='gcc -m64' CXX='g++ -m64' LD='g++ -m64' \
  ./waf configure --doxygen=no --alsa=yes --portaudio=no --opus=no --classic --debug --samplerate=no --sndfile=no -o bin/64
./waf build

CC='gcc -m32 ' CXX='g++ -m32 ' LD='g++ -m32 ' \
  ./waf configure --doxygen=no --alsa=yes --portaudio=no --opus=no --classic --debug --samplerate=no --sndfile=no -o bin/32
./waf build

export LD_LIBRARY_PATH=$tmpDir/jack/bin/64/common:$tmpDir/jack/bin/32/common

$tmpDir/jack/bin/64/jackd --name $JACK_DEFAULT_SERVER -d dummy &
#pid=$!

sleep 2

#64 bit client: OK
# $tmpDir/jack/bin/64/example-clients/jack_simple_client

#32 bit client: Failure
$tmpDir/jack/bin/32/example-clients/jack_simple_client

Here's the output I get:

Cloning into '/tmp/jack-test/jack'...
/tmp/jack-test/jack ~/source/jack2
Setting top to                           : /tmp/jack-test/jack 
Setting out to                           : /tmp/jack-test/jack/bin/64 
Checking for 'g++' (C++ compiler)        : g++ -m64 
Checking for 'gcc' (C compiler)          : gcc -m64 
Checking platform                        : Linux 
Checking for program 'pkg-config'        : /usr/bin/pkg-config 
Checking for 'alsa' >= 1.0.18            : yes 
Checking for 'libffado' >= 1.999.17      : not found 
Checking for 'libfreebob' >= 1.0.0       : not found 
Checking for 'gtkIOStream' >= 1.4.0      : not found 
Checking for 'eigen3' >= 3.1.2           : not found 
Checking for header mmsystem.h           : not found 
Checking for 'celt' >= 0.11.0            : not found 
Checking for 'celt' >= 0.8.0             : not found 
Checking for 'celt' >= 0.7.0             : not found 
Checking for 'celt' >= 0.5.0             : not found 
Checking for library readline            : yes 
Checking for header readline/readline.h  : yes 
Checking for function ppoll              : yes 

==================
JACK 1.9.11 svn revision will checked and eventually updated during build
Maximum JACK clients                     : 64 
Maximum ports per application            : 768 
Install prefix                           : /usr/local 
Library directory                        : /usr/local/lib 
Drivers directory                        : /usr/local/lib/jack 
Build debuggable binaries                : yes 
C compiler flags                         : ['-Wall', '-g'] 
C++ compiler flags                       : ['-Wall', '-g'] 
Linker flags                             : ['-g'] 
Build with engine profiling              : no 
Build with 32/64 bits mixed mode         : no 
Build standard JACK (jackd)              : yes 
Build D-Bus JACK (jackdbus)              : no 
Autostart method                         : classic 
Build doxygen documentation              : no 
Enable ALSA driver                       : yes 
Enable FireWire driver (FFADO)           : no 
Enable FreeBob driver                    : no 
Enable IIO driver                        : no 
Enable Portaudio driver                  : no 
Enable WinMME driver                     : no 
Build with CELT                          : no 
Build Opus netjack2                      : no 
Build with libsamplerate                 : no 
Build with libsndfile                    : no 
Build with readline                      : yes 

'configure' finished successfully (0.365s)
Waf: Entering directory `/tmp/jack-test/jack/bin/64'
[  2/210] Compiling jack.pc.in
[  2/210] Compiling svnversion_regenerate.sh
Generated /tmp/jack-test/jack/bin/64/svnversion.h (0+ff1ed2c4524095055140370c1008a2d9cccc5645)

[  3/210] Compiling example-clients/ipunload.c
[  4/210] Compiling example-clients/latent_client.c
[  5/210] Compiling example-clients/simple_session_client.c
[  6/210] Compiling example-clients/zombie.c
[  7/210] Compiling example-clients/metro.c
[  8/210] Compiling example-clients/lsp.c
[  9/210] Compiling example-clients/session_notify.c
* snip *
[204/210] Linking bin/64/example-clients/jack_server_control
[205/210] Linking bin/64/common/profiler.so
[206/210] Linking bin/64/jackd
[207/210] Linking bin/64/example-clients/inprocess.so
[208/210] Linking bin/64/common/netmanager.so
[209/210] Symlinking bin/64/common/libjack.so
[210/210] Symlinking bin/64/common/libjackserver.so
Waf: Leaving directory `/tmp/jack-test/jack/bin/64'
'build' finished successfully (7.416s)
Setting top to                           : /tmp/jack-test/jack 
Setting out to                           : /tmp/jack-test/jack/bin/32 
Checking for 'g++' (C++ compiler)        : g++ -m32 
Checking for 'gcc' (C compiler)          : gcc -m32 
Checking platform                        : Linux 
Checking for program 'pkg-config'        : /usr/bin/pkg-config 
Checking for 'alsa' >= 1.0.18            : yes 
Checking for 'libffado' >= 1.999.17      : not found 
Checking for 'libfreebob' >= 1.0.0       : not found 
Checking for 'gtkIOStream' >= 1.4.0      : not found 
Checking for 'eigen3' >= 3.1.2           : not found 
Checking for header mmsystem.h           : not found 
Checking for 'celt' >= 0.11.0            : not found 
Checking for 'celt' >= 0.8.0             : not found 
Checking for 'celt' >= 0.7.0             : not found 
Checking for 'celt' >= 0.5.0             : not found 
Checking for library readline            : not found 
Checking for header readline/readline.h  : yes 
Checking for function ppoll              : yes 

==================
JACK 1.9.11 svn revision will checked and eventually updated during build
Maximum JACK clients                     : 64 
Maximum ports per application            : 768 
Install prefix                           : /usr/local 
Library directory                        : /usr/local/lib 
Drivers directory                        : /usr/local/lib/jack 
Build debuggable binaries                : yes 
C compiler flags                         : ['-Wall', '-g'] 
C++ compiler flags                       : ['-Wall', '-g'] 
Linker flags                             : ['-g'] 
Build with engine profiling              : no 
Build with 32/64 bits mixed mode         : no 
Build standard JACK (jackd)              : yes 
Build D-Bus JACK (jackdbus)              : no 
Autostart method                         : classic 
Build doxygen documentation              : no 
Enable ALSA driver                       : yes 
Enable FireWire driver (FFADO)           : no 
Enable FreeBob driver                    : no 
Enable IIO driver                        : no 
Enable Portaudio driver                  : no 
Enable WinMME driver                     : no 
Build with CELT                          : no 
Build Opus netjack2                      : no 
Build with libsamplerate                 : no 
Build with libsndfile                    : no 
Build with readline                      : no 

'configure' finished successfully (0.243s)
Waf: Entering directory `/tmp/jack-test/jack/bin/32'
[  1/208] Compiling jack.pc.in
[  2/208] Compiling svnversion_regenerate.sh
Generated /tmp/jack-test/jack/bin/32/svnversion.h (0+ff1ed2c4524095055140370c1008a2d9cccc5645)

[  3/208] Compiling tests/cpu.c
[  4/208] Compiling example-clients/inprocess.c
[  5/208] Compiling common/netjack_packet.c
[  6/208] Compiling example-clients/wait.c
* snip *
[198/208] Linking bin/32/example-clients/jack_samplerate
[199/208] Linking bin/32/tests/jack_test
[200/208] Linking bin/32/common/libjackserver.so
[201/208] Linking bin/32/jack_net.so
[202/208] Linking bin/32/example-clients/inprocess.so
[203/208] Linking bin/32/common/profiler.so
[204/208] Linking bin/32/example-clients/jack_server_control
[205/208] Linking bin/32/jackd
[206/208] Linking bin/32/common/netmanager.so
[207/208] Symlinking bin/32/common/libjackserver.so
[208/208] Symlinking bin/32/common/libjack.so
Waf: Leaving directory `/tmp/jack-test/jack/bin/32'
'build' finished successfully (7.235s)
jackdmp 1.9.11
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
JackEngine::XRun: client = jack_simple_client was not finished, state = Triggered
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = jack_simple_client was not finished, state = Triggered
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = jack_simple_client was not finished, state = Triggered
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = jack_simple_client was not finished, state = Triggered
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = jack_simple_client was not finished, state = Triggered
JackEngine::XRun: client = jack_simple_client was not finished, state = Triggered
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = jack_simple_client was not finished, state = Triggered
falkTX commented 8 years ago

Duplicated. see #183 A fix is already available for testing.

Ace17 commented 8 years ago

Thanks!

falkTX commented 7 years ago

Should be fixed in latest git, via #219.