Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when initializing app built and run from Ubuntu 18.04 #5000

Closed
Whishay opened this issue Jun 22, 2020 · 11 comments
Closed

Crash when initializing app built and run from Ubuntu 18.04 #5000

Whishay opened this issue Jun 22, 2020 · 11 comments
Labels
Type: Bug Something isn't working correctly
Milestone

Comments

@Whishay
Copy link

Whishay commented Jun 22, 2020

Anyone met this?
Crash when initialization built and run from Ubuntu 18.04

Stack and env:

(gdb) c
Continuing.
Thread 1 "SlicerApp-real" received signal SIGSEGV, Segmentation fault.
__strcmp_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:31
31	../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S: No such file or directory.
(gdb) bt
#0  0x00007febe0724e8a in __strcmp_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:31
#1  0x00007fec04e94add in lh_insert () at /sdc/src/Slicer-local/Slicer-DebugBuild/OpenSSL/libcrypto.so.1.0.0
#2  0x00007fec04dddf5b in OBJ_NAME_add () at /sdc/src/Slicer-local/Slicer-DebugBuild/OpenSSL/libcrypto.so.1.0.0
#3  0x00007febb34cae5e in  () at /usr/lib/x86_64-linux-gnu/libssl.so.1.1
#4  0x00007febf0050827 in __pthread_once_slow (once_control=0x7febb3723928, init_routine=0x7febb34cad70) at pthread_once.c:116
#5  0x00007febb39038f9 in CRYPTO_THREAD_run_once () at /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
#6  0x00007febb34cb07b in OPENSSL_init_ssl () at /usr/lib/x86_64-linux-gnu/libssl.so.1.1
#7  0x00007fec0441282c in  () at /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#8  0x00007fec0efe6e5b in qSlicerCoreApplicationPrivate::init() (this=0x559905e622f0) at /sdc/src/Slicer-local/Slicer-src/Base/QTCore/qSlicerCoreApplication.cxx:265
#9  0x00007fec10ac3532 in qSlicerApplicationPrivate::init() (this=0x559905e622f0) at /sdc/src/Slicer-local/Slicer-src/Base/QTGUI/qSlicerApplication.cxx:203
#10 0x00007fec10ac45de in qSlicerApplication::qSlicerApplication(int&, char**) (this=0x7ffdc467c2b0, _argc=@0x7ffdc467c25c: 2, _argv=0x7ffdc467c418)
    at /sdc/src/Slicer-local/Slicer-src/Base/QTGUI/qSlicerApplication.cxx:357
#11 0x000055990390fb1e in (anonymous namespace)::SlicerAppMain(int, char**) (argc=2, argv=0x7ffdc467c418) at /sdc/src/Slicer-local/Slicer-src/Applications/SlicerApp/Main.cxx:40
#12 0x000055990390fe2f in main(int, char**) (argc=2, argv=0x7ffdc467c418) at /sdc/src/Slicer-local/Slicer-src/Base/QTApp/qSlicerApplicationMainWrapper.cxx:56
./Slicer  --launcher-verbose
info: AdditionalSettingsFilePath []
info: LauncherSplashImagePath [/sdc/src/Slicer-local/Slicer-src/Applications/SlicerApp/Resources/Images/Slicer-SplashScreen.png]
info: LauncherSplashScreenHideDelayMs [3000]
info: ApplicationToLaunch [/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build/bin/./SlicerApp-real]
info: ApplicationToLaunchArguments []
info: AdditionalSettingsFilePath []
info: LauncherDir [/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build]
info: LauncherName [Slicer]
info: OrganizationDomain [www.na-mic.org]
info: OrganizationName [NA-MIC]
info: ApplicationName [Slicer]
info: ApplicationRevision [28858]
info: SettingsFileName [/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build/./SlicerLauncherSettings.ini]
info: SettingsDir [/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build]
info: UserAdditionalSettingsDir [/home/wei/.config/NA-MIC]
info: UserAdditionalSettingsFileName []
info: UserAdditionalSettingsFileBaseName []
info: AdditionalSettingsDir []
info: AdditionalSettingsExcludeGroups []
info: LauncherNoSplashScreen [0]
info: AdditionalLauncherHelpShortArgument [-h]
info: AdditionalLauncherHelpLongArgument [--help]
info: AdditionalLauncherNoSplashArguments [--no-splash,--help,--version,--home,--program-path,--no-main-window,--settings-path,--temporary-path]
info: DetachApplicationToLaunch [0]
info: LoadEnvironment [-1]
info: LauncherSplashImagePath [/sdc/src/Slicer-local/Slicer-src/Applications/SlicerApp/Resources/Images/Slicer-SplashScreen.png]
info: LauncherSplashScreenHideDelayMs [3000]
info: ApplicationToLaunch [/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build/bin/./SlicerApp-real]
info: ApplicationToLaunchArguments []
info: <APPLAUNCHER_DIR> -> [/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build]
info: <APPLAUNCHER_NAME> -> [Slicer]
info: <APPLAUNCHER_SETTINGS_DIR> (RegularSettings) -> [/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build]
info: <APPLAUNCHER_SETTINGS_DIR> (UserAdditionalSettings) -> [<APPLAUNCHER_SETTINGS_DIR-NOTFOUND>]
info: <APPLAUNCHER_SETTINGS_DIR> (AdditionalSettings) -> [<APPLAUNCHER_SETTINGS_DIR-NOTFOUND>]
info: <PATHSEP> -> [:]
info: Setting env. variable [SLICER_HOME]:/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build
info: Setting env. variable [PIP_REQUIRE_VIRTUALENV]:0
info: Setting env. variable [ITK_AUTOLOAD_PATH]:/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build/lib/Slicer-4.11/ITKFactories/.
info: Setting env. variable [PYTHONNOUSERSITE]:1
info: Setting env. variable [PYTHONHOME]:/sdc/src/Slicer-local/Slicer-DebugBuild/python-install
info: Setting env. variable [SSL_CERT_FILE]:/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build/share/Slicer-4.11/Slicer.crt
info: Setting env. variable [LD_LIBRARY_PATH]:/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build/bin/.:../lib/Slicer-4.11/qt-loadable-modules:/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build/lib/Slicer-4.11/cli-modules/.:/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build/lib/Slicer-4.11/qt-loadable-modules/.:/sdc/src/Slicer-local/Slicer-DebugBuild/OpenSSL:/sdc/src/Slicer-local/Slicer-DebugBuild/python-install/lib:/sdc/src/Slicer-local/Slicer-DebugBuild/VTK-build/lib/.:/sdc/src/Slicer-local/Slicer-DebugBuild/teem-build/bin/.:/sdc/src/Slicer-local/Slicer-DebugBuild/DCMTK-build/lib/.:/sdc/src/Slicer-local/Slicer-DebugBuild/ITK-build/lib/.:/sdc/src/Slicer-local/Slicer-DebugBuild/CTK-build/CTK-build/bin/.:/sdc/src/Slicer-local/Slicer-DebugBuild/CTK-build/QtTesting-build/.:/sdc/src/Slicer-local/Slicer-DebugBuild/CTK-build/PythonQt-build/.:/sdc/src/Slicer-local/Slicer-DebugBuild/LibArchive-install/lib:/sdc/src/Slicer-local/Slicer-DebugBuild/SimpleITK-build/SimpleITK-build/lib/.:/sdc/src/Slicer-local/Slicer-DebugBuild/JsonCpp-build/src/lib_json/.:/sdc/src/Slicer-local/Slicer-DebugBuild/ParameterSerializer-build/lib/.:/sdc/src/Slicer-local/Slicer-DebugBuild/SlicerExecutionModel-build/ModuleDescriptionParser/bin/.:/sdc/src/Slicer-local/Slicer-DebugBuild/python-install/lib/python3.6/site-packages/numpy/core:/sdc/src/Slicer-local/Slicer-DebugBuild/python-install/lib/python3.6/site-packages/numpy/lib
info: Setting env. variable [PATH]:/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build/bin/.:/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build/lib/Slicer-4.11/cli-modules/.:/sdc/src/Slicer-local/Slicer-DebugBuild/python-install/bin:/sdc/src/Slicer-local/Slicer-DebugBuild/teem-build/bin/.
info: Setting env. variable [QT_PLUGIN_PATH]:/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build/bin:/sdc/src/Slicer-local/Slicer-DebugBuild/CTK-build/CTK-build/bin:/usr/lib/plugins
info: Setting env. variable [PYTHONPATH]:/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build/bin/.:/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build/bin/Python:/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build/lib/Slicer-4.11/qt-loadable-modules/.:/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build/lib/Slicer-4.11/qt-loadable-modules/Python:/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build/lib/Slicer-4.11/qt-scripted-modules:/sdc/src/Slicer-local/Slicer-DebugBuild/python-install/lib/python3.6:/sdc/src/Slicer-local/Slicer-DebugBuild/python-install/lib/python3.6/lib-dynload:/sdc/src/Slicer-local/Slicer-DebugBuild/python-install/lib/python3.6/site-packages:/sdc/src/Slicer-local/Slicer-DebugBuild/VTK-build/lib/python3.6/site-packages:/sdc/src/Slicer-local/Slicer-DebugBuild/CTK-build/CTK-build/bin/Python:/sdc/src/Slicer-local/Slicer-DebugBuild/CTK-build/CTK-build/bin/.
info: Starting [/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build/bin/./SlicerApp-real]
info: launcher-timeout (ms) [-1000]
info: DisableSplash [0]
error: [/sdc/src/Slicer-local/Slicer-DebugBuild/Slicer-build/bin/./SlicerApp-real] exit abnormally - Report the problem.

Steps to reproduce

Build and run on Ubuntu 18.04

Environment

  • Slicer version: Slicer-4.??.?-YYYY-MM-DD
    $ git log
    commit da65fbc (HEAD -> master, origin/master, origin/HEAD)
    Author: Jean-Christophe Fillion-Robin jchris.fillionr@kitware.com
    Date: Wed Mar 18 23:46:47 2020 -0400

  • Operating system: Windows / Linux / Mac + which version
    Ubuntu 18.04

@Whishay Whishay added the Type: Bug Something isn't working correctly label Jun 22, 2020
@Whishay Whishay changed the title Crash when initialization built and run from Ubuntu 18.04 Crash when initializing app built and run from Ubuntu 18.04 Jun 22, 2020
@Whishay
Copy link
Author

Whishay commented Jun 22, 2020

Is it something related to QT version? I built it with QT5 but got something like Qt4 from env:

env | grep -i qt
declare -x QT4_IM_MODULE="xim"
declare -x QT_ACCESSIBILITY="1"
declare -x QT_IM_MODULE="xim"

@jcfr
Copy link
Member

jcfr commented Jun 22, 2020

Thanks for the report

The good news is that we are working on addressing the OpenSSL issue in #4992

Optional: Waiting the corresponding branch is integrated, you could check out the branch associated with the PR and test locally:

@lassoan lassoan added this to the Slicer 4.11.0 milestone Jun 23, 2020
@Whishay
Copy link
Author

Whishay commented Jun 23, 2020

Thanks for the info.

I checked out the branch but got an error with libcurl when rebuilding it. The output is like below:
anyone knows how to fix it?

[ 27%] Built target MRMLCLIPython
make[5]: *** No rule to make target '/sda/src/Slicer-DebugBuild-fix-linux-crash/curl-install/lib/libcurl.a', needed by 'bin/libRemoteIO.so'. Stop.
CMakeFiles/Makefile2:1776: recipe for target 'Libs/RemoteIO/CMakeFiles/RemoteIO.dir/all' failed
make[4]: *** [Libs/RemoteIO/CMakeFiles/RemoteIO.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make[3]: *** [all] Error 2
CMakeFiles/Slicer.dir/build.make:143: recipe for target 'Slicer-prefix/src/Slicer-stamp/Slicer-build' failed
make[2]: *** [Slicer-prefix/src/Slicer-stamp/Slicer-build] Error 2
CMakeFiles/Makefile2:435: recipe for target 'CMakeFiles/Slicer.dir/all' failed
make[1]: *** [CMakeFiles/Slicer.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

@Whishay
Copy link
Author

Whishay commented Jun 23, 2020

Is it a conflict of curl? I don't see libcurl.a but libcurl-d.a instead of that.

There are 4 folders for curl and I have no idea how to rebuild it.
curl/ curl-build/ curl-install/ curl-prefix/

I am not familiar with the building process and cmake, anyone can help how to build a component(curl here) with an older branch?

#ls curl-build/lib
CMakeFiles cmake_install.cmake curl_config.h libcurl-d.a Makefile Makefile.inc.cmake

@jcfr
Copy link
Member

jcfr commented Jun 23, 2020

Building Slicer is tested daily and only require to have Qt5, git, cmake and a compiler installed.

There is usually no need to apply manual patches.

But, since we are in the middle of integrating some major changes, there are issues to be addressed.

The one you reported is also captured in our QA system, See
http://slicer.cdash.org/viewBuildError.php?buildid=1946165

I am working on a fix.

@Whishay
Copy link
Author

Whishay commented Jun 23, 2020

Hi Jean,
Thank you very much for your feedback and looking forward to your fix.

Btw, is it a general issue for win/linux/mac or just linux specific? If there is a recommended or preferred platform(like win or osx or specific linux distro and version) to build slicer(4.11.0), I would like to use it as well.

I tried Debian 10, Ubuntu 16.04 and Fedora 30/31 but none of them works.

@jcfr
Copy link
Member

jcfr commented Jun 23, 2020

Slicer is cross platform and built on all three platforms (packages are built daily for these. See https://download.slicer.org), you should use the platform you are familiar with or the platform that is relevant for your research (e.g due to hardware availability on a specific platform only, ... )

Will post back here when the issue is fixed.

@Whishay
Copy link
Author

Whishay commented Jun 23, 2020

thanks.

@jcfr
Copy link
Member

jcfr commented Jun 23, 2020

The following error:

No rule to make target '/sda/src/Slicer-DebugBuild-fix-linux-crash/curl-install/lib/libcurl.a', needed by 'bin/libRemoteIO.so'. Stop.

happens because curl is installed in folder lib64 instead of lib and we assume is it lib in SuperBuild/External_curl.cmake#L124

jcfr added a commit to jcfr/Slicer that referenced this issue Jun 23, 2020
…tory

This commit fixes the following error:

  error: '/work/Preview/Slicer-0-build/curl-install/lib/libcurl.a', needed by 'bin/libRemoteIO.so', missing and no known rule to make it

It fixes a regression originally introduced in 128fb86 (ENH: Update
curl from 7.34 to 7.70)

See Slicer#5000 and Slicer#4992
jcfr added a commit to jcfr/Slicer that referenced this issue Jun 23, 2020
…tory

This commit fixes the following error:

  error: '/work/Preview/Slicer-0-build/curl-install/lib/libcurl.a', needed by 'bin/libRemoteIO.so', missing and no known rule to make it

It fixes a regression originally introduced in 128fb86 (ENH: Update
curl from 7.34 to 7.70)

See Slicer#5000 and Slicer#4992
jcfr added a commit that referenced this issue Jun 23, 2020
…tory

This commit fixes the following error:

  error: '/work/Preview/Slicer-0-build/curl-install/lib/libcurl.a', needed by 'bin/libRemoteIO.so', missing and no known rule to make it

It fixes a regression originally introduced in 128fb86 (ENH: Update
curl from 7.34 to 7.70)

See #5000 and #4992
@Whishay
Copy link
Author

Whishay commented Jun 24, 2020

Thanks Jean.

The fix works for the compilation but it crashes again. I am not able to print the backtrace this time which probably caused by I
didn't build it with debug info(file Slicer shows it is stripped).

Do you know how to generate a debug profile? I tried cmake-gui and add 'CMAKE_BUILD_TYPE' to 'Debug' as a string value but it is not saved.

@jcfr
Copy link
Member

jcfr commented Jun 25, 2020

Do you know how to generate a debug profile?

On macOS or Linux, building passing -DCMAKE_BUILD_TYPE:STRING=Debug will generate a debug build.

By default, a debug build will be created it means you do not have to do anything special.
See https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build_Instructions#Unix-like

Crash when initialization built and run from Ubuntu 18.04

I am closing this issue. This crash is expected to be fixed by #4992 that just got integrated.

@jcfr jcfr closed this as completed Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working correctly
Development

No branches or pull requests

3 participants