Can't start Slicer on Linux on one machine

I get the following message when launching Slicer :

$ ./Slicer
error: [/home/user/programs/Slicer-4.11.0-2019-08-22-linux-amd64/bin/SlicerApp-real] exit abnormally -
Report the problem.

This happens on my desktop machine only, it launches normally on my laptop. It happens with both home built Slicher unchanged and with packages from your repository.
Unfortunately, there are no hints in the console message. This started after the major ITK/CTK updates.

I suspect a system library problem, but can’t get to it. But could be another root cause.

Using Qt 5.13.0 on both machines. I’ll provide other useful information you may need to resolve this. I fear it will be a lengthy process without error messages.

Regards.

Can you get a call stack?

If you build Slicer with debug information and run it in a debugger then you get detailed information about what goes wrong.

Another debugging approach (works with the binary download or local build):

First create a shell with Slicer’s environment:

./Slicer --launch xterm

Then in the new window:

strace ./bin/SlicerApp-real

This will give you a log of system calls and typically the last operations will indicate what was going on at the time of the crash (e.g. what file or library was being loaded).

$ LC_ALL=C LANG=C strace ./bin/SlicerApp-real
execve(“./bin/SlicerApp-real”, [“./bin/SlicerApp-real”], 0x7ffef0915fc0 /* 86 vars /) = 0
brk(NULL) = 0x5615e14c0000
arch_prctl(0x3001 /
ARCH_??? */, 0x7fff7595d240) = -1 EINVAL (Invalid argument)
access(“/etc/ld.so.preload”, R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, “/etc/ld.so.cache”, O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=336853, …}) = 0
mmap(NULL, 336853, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fb626511000
close(3) = 0
openat(AT_FDCWD, “/usr/lib/tls/x86_64/x86_64/libqSlicerApp.so”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat(“/usr/lib/tls/x86_64/x86_64”, 0x7fff7595c480) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, “/usr/lib/tls/x86_64/libqSlicerApp.so”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat(“/usr/lib/tls/x86_64”, 0x7fff7595c480) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, “/usr/lib/tls/x86_64/libqSlicerApp.so”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat(“/usr/lib/tls/x86_64”, 0x7fff7595c480) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, “/usr/lib/tls/libqSlicerApp.so”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat(“/usr/lib/tls”, 0x7fff7595c480) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, “/usr/lib/x86_64/x86_64/libqSlicerApp.so”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat(“/usr/lib/x86_64/x86_64”, 0x7fff7595c480) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, “/usr/lib/x86_64/libqSlicerApp.so”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat(“/usr/lib/x86_64”, 0x7fff7595c480) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, “/usr/lib/x86_64/libqSlicerApp.so”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat(“/usr/lib/x86_64”, 0x7fff7595c480) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, “/usr/lib/libqSlicerApp.so”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat(“/usr/lib”, {st_mode=S_IFDIR|0755, st_size=299008, …}) = 0
writev(2, [{iov_base=“./bin/SlicerApp-real”, iov_len=20}, {iov_base=“: “, iov_len=2}, {iov_base=“error while loading shared libra”…, iov_len=36}, {iov_base=”: “, iov_len=2}, {iov_base
=“libqSlicerApp.so”, iov_len=16}, {iov_base=”: “, iov_len=2}, {iov_base=“cannot open shared object file”, iov_len=30}, {iov_base=”: “, iov_len=2}, {iov_base=“No such file or directory”,
iov_len=25}, {iov_base=”\n”, iov_len=1}], 10./bin/SlicerApp-real: error while loading shared libraries: libqSlicerApp.so: cannot open shared object file: No such file or directory
) = 136
exit_group(127) = ?
+++ exited with 127 +++

It seems it could not find libqSlicerApp.so, file that is present of course.

If I set LD_LIBRARY_PATH to ./lib/Slicer-4.11, it outputs similar results but for every library it tries to load.

Now I don’t have any kind of special setup on that particular machine.

I’m ready to try with a debug build, but won’t be able to do it before a few days.

Thanks.

Have you executed strace ./bin/SlicerApp-real in a terminal created by ./Slicer --launch (your-terminal-executable-here)?

Yes, the result is just one post above.

It looks like something is interfering with Slicer’s paths. Does your environment have any special variables set (e.g. LD_PRELOAD?)

Could you copy-paste here the value of environment variables you have in the terminal where you attempted to run SlicerApp-real?

I’ll post the env variables when I get back to work. Thanks.

Here are the environment variables in the relevant terminal. All variables are in this sorted list, though some values have been masked.

_=/bin/env
COLORFGBG=15;0
COLORTERM=truecolor
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus
DESKTOP_SESSION=/usr/share/xsessions/plasma
DISPLAY=:0
EDITOR=/usr/bin/vim
GS_LIB=/home/user/.fonts
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/user/.gtkrc-2.0:/home/user/.config/gtkrc-2.0
GTK_MODULES=canberra-gtk-module
GTK_RC_FILES=/etc/gtk/gtkrc:/home/user/.gtkrc:/home/user/.config/gtkrc
HISTCONTROL=ignoreboth:erasedups
HOME=/home/user
KDE_FULL_SESSION=true
KDE_SESSION_UID=1001
KDE_SESSION_VERSION=5
KONSOLE_DBUS_SERVICE=:1.31
KONSOLE_DBUS_SESSION=/Sessions/7
KONSOLE_PROFILE_NAME=Shell
KONSOLE_VERSION=190403
LANG=fr_FR.UTF-8
LANGUAGE=fr
LC_ADDRESS=fr_FR.UTF-8
LC_COLLATE=fr_FR.UTF-8
LC_CTYPE=fr_FR.UTF-8
LC_IDENTIFICATION=fr_FR.UTF-8
LC_MEASUREMENT=fr_FR.UTF-8
LC_MESSAGES=fr_FR.UTF-8
LC_MONETARY=fr_FR.UTF-8
LC_NAME=fr_FR.UTF-8
LC_NUMERIC=fr_FR.UTF-8
LC_PAPER=fr_FR.UTF-8
LC_TELEPHONE=fr_FR.UTF-8
LC_TIME=fr_FR.UTF-8
LL_HP=%eth0
LL_SEC1L=%eth0
LL_SEC1=%eth0
LL_SEC2L=%eth0
LL_SEC2=%eth0
LL_U2=%eth0
LL_U3=%eth0
LL_VASC1=%eth0
LL_VASC2=%eth0
LL_Z2P=%eth0
LOGNAME=user
MAC_SEC1=
MAC_SEC2=
MAC_U2=
MAC_U3=
MAC_VASC1=
MAC_VASC2=
MAIL=/var/spool/mail/user
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
OLDPWD=/home/user
PAM_KWALLET5_LOGIN=/run/user/1001/kwallet5.socket
PATH=/home/user/.bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
PROFILEHOME=
PS1=#[\u@\h \W][\033[01;32m][${PIPESTATUS[@]}][\033[00m]$
PWD=/home/user/programs/Slicer-4.11.0-2019-08-22-linux-amd64
QT_AUTO_SCREEN_SCALE_FACTOR=0
QT_SCREEN_SCALE_FACTORS=DisplayPort-0=1;DisplayPort-1=1;DisplayPort-2=1;HDMI-A-0=1;DVI-D-0=1;
SESSION_MANAGER=local/vasc2.chirvasc-60.pro:@/tmp/.ICE-unix/819,unix/vasc2.chirvasc-60.pro:/tmp/.ICE-unix/819
SHELL=/bin/bash
SHELL_SESSION_ID=7659513d5ce046b9b392de66453524a6
SHLVL=2
SSH_AGENT_PID=707
SSH_AUTH_SOCK=/tmp/ssh-vEy99OqlN3Qy/agent.706
TERM=xterm-256color
USER=user
WINDOWID=50331655
XAUTHORITY=/tmp/xauth-1001-_0
XCURSOR_THEME=breeze_cursors
XDG_CONFIG_HOME=/home/user/.config
XDG_CURRENT_DESKTOP=KDE
XDG_DATA_DIRS=/usr/share:/usr/share:/usr/local/share
XDG_RUNTIME_DIR=/run/user/1001
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SEAT=seat0
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=KDE
XDG_SESSION_ID=c1
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SESSION_TYPE=x11
XDG_VTNR=1
XZ_DEFAULTS=-T0

Is this the shell where you try to run Slicer? You should be seeing a lot of Slicer-related environment variables when you start with the launcher. Like custom PATH and LD_LIBRARY_PATH and APPLAUNCHER variables.

E.g. if you run this command:

./Downloads/Slicer-4.11.0-2019-08-22-linux-amd64/Slicer --launch env

Maybe there’s something resetting your environment.

If that’s not the issue you might compare /etc/ld.so.conf and /etc/ld.so.conf.d contents across systems.

Well, the program ‘xterm’ was not installed on my machine ! Hence all logs I posted above are irrelevant.

Please find the new log data here.

Sorry for the inconvenience.

Could you post strace output and environment that you get on the computer where Slicer starts correctly?

Here is the console output for strace and env, on my laptop, where the same Slicer build works fine.

Thanks.

Looks like the same zipfile link twice?

Oops ! Here’s the right zip file (tiresome day), sorry.

No worries :smile:

Unfortunately I don’t see anything definitive in the traces - maybe something to do with gnutls, which is being accessed right before the crash. Could be some kind of incompatibility. Unless you see something probably it makes sense to create a debug build.

I’ll end up doing the debug build, ASAP. For now, I found this in dmesg, everytime I run the problematic build :

[21639.829126] traps: SlicerApp-real[15453] trap invalid opcode ip:7f8aa07fa1c8 sp:7ffce616fca8 error:0 in libitkgdcmcharls-5.0.so.1[7f8aa07e4000+84000]

It points out at least one library. ldd on this file does not reveal missing dependency.

Maybe the file is corrupted? invalid opcode indicates something pretty low level is going on.

Hi,

I built Slicer in debug mode and it does not crash surprisingly.

Then I built with RelWithDebInfo and this one does not start. I next ran

./Slicer --launch xterm

and in the new terminal

gdb ./bin/SlicerApp-real
Fatal Python error: initsite: Failed to import the site module
Traceback (most recent call last):
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Python/lib/python3.6/site.py”, line 553, in
main()
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Python/lib/python3.6/site.py”, line 539, in main
known_paths = addusersitepackages(known_paths)
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Python/lib/python3.6/site.py”, line 282, in addusersitepackages
user_site = getusersitepackages()
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Python/lib/python3.6/site.py”, line 258, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/bin/…/lib/Python/lib/python3.6/site.py”, line 248, in getuserbase
USER_BASE = get_config_var(‘userbase’)
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/lib/python3.6/sysconfig.py”, line 601, in get_config_var
return get_config_vars().get(name)
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/lib/python3.6/sysconfig.py”, line 550, in get_config_vars
_init_posix(_CONFIG_VARS)
File “/home/user/programs/Test/Slicer-4.11.0-2019-08-22-linux-amd64-RelWithDebInfo-O2/lib/Python/lib/python3.6/sysconfig.py”, line 421, in _init_posix
_temp = import(name, globals(), locals(), [‘build_time_vars’], 0)
ModuleNotFoundError: No module named ‘_sysconfigdata_m_linux_x86_64-linux-gnu’

It seems that Python in the Slicer tree is looking for an unknown module in non-debug builds. On this single machine at least.

I’ll be using the debug build, and hope for a fix.

Regards.