Opened 7 years ago

Closed 6 years ago

#1673 closed defect (fixed)

Linux flavor ABI incompatibility

Reported by: tic20@… Owned by: Conrad Huang
Priority: major Milestone: 1.0
Component: Tool Shed Version:
Keywords: Cc: Greg Couch, Eric Pettersen
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Relevant part of traceback below. The offending line in rota.cpp is innocuous:

Rotamer::Rotamer(Residue *res, Rota_Mgr *mgr): _residue(res), _mgr(mgr)
{

auto rname = res->name(); segfault

Seems a straightforward case of ABI incompatibility. As far as I'm aware the ToolShed doesn't have the ability to serve different binaries for different Linux flavours. How is progress going on a controlled environment for building in Linux?

#0 0x00007fffedd2532b in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x00007fff3faf0419 in isolde::Rotamer::Rotamer (this=0x7f01480, res=0x79b5670, mgr=0x561c4d0) at src/validation/rota.cpp:39
#2 0x00007fff3faf0d3b in isolde::Rota_Mgr::new_rotamer (this=0x561c4d0, residue=0x79b5670) at src/validation/rota.cpp:150
#3 0x00007fff3faf0e3b in isolde::Rota_Mgr::get_rotamer (this=this@entry=0x561c4d0, residue=<optimized out>) at src/validation/rota.cpp:169
#4 0x00007fff3fb2863c in rota_mgr_get_rotamer (mgr=0x561c4d0, residue=0x7c7d3d0, n=229) at src/validation/rota_ext.h:167
#5 0x00007ffff270ae40 in ffi_call_unix64 () from /usr/lib/x86_64-linux-gnu/libffi.so.6

Forwarded email below. I've asked him if he can run GDB on it to get a full traceback, but it looks like my bundles built against the CentOS .rpm build are incompatible with the Ubuntu .deb.


Subject: Isolde Crash on Ubuntu 16.04
Date: 2019-02-01 10:22
From: Hubert Santuz <hubert.santuz@…>
To: tic20@…

Hi Tristan Croll,

I'm trying to use your tool Isolde with ChimeraX 0.8 on an Ubuntu 16.04.
I successfully installed both ChimeraX and Isolde from package
framework.

Unfortunately, when I press the "load demo" button, ChimeraX instantly
crashed with a segmentation fault :

Fatal Python error: Segmentation fault

Current thread 0x00007fca1c729700 (most recent call first):

File

"/ibpc/sablons/santuz/.local/share/ChimeraX/0.8/site-packages/chimerax/isolde/molobject.py",
line 1371 in get_rotamers

File

"/ibpc/sablons/santuz/.local/share/ChimeraX/0.8/site-packages/chimerax/isolde/validation/rota_annotation.py",
line 110 in track_whole_model

File

"/usr/lib/ucsf-chimerax/lib/python3.6/site-packages/chimerax/core/graphics/drawing.py",
line 228 in setattr

File

"/ibpc/sablons/santuz/.local/share/ChimeraX/0.8/site-packages/chimerax/isolde/validation/rota_annotation.py",
line 75 in init

File

"/ibpc/sablons/santuz/.local/share/ChimeraX/0.8/site-packages/chimerax/isolde/session_extensions.py",
line 206 in get_rota_annotator

File

"/ibpc/sablons/santuz/.local/share/ChimeraX/0.8/site-packages/chimerax/isolde/isolde.py",
line 2328 in _change_selected_model

File

"/ibpc/sablons/santuz/.local/share/ChimeraX/0.8/site-packages/chimerax/isolde/isolde.py",
line 970 in _update_model_list

File

"/usr/lib/ucsf-chimerax/lib/python3.6/site-packages/chimerax/core/triggerset.py",
line 130 in invoke

File

"/usr/lib/ucsf-chimerax/lib/python3.6/site-packages/chimerax/core/triggerset.py",
line 190 in activate

File

"/usr/lib/ucsf-chimerax/lib/python3.6/site-packages/chimerax/core/triggerset.py",
line 325 in activate_trigger

File

"/usr/lib/ucsf-chimerax/lib/python3.6/site-packages/chimerax/core/models.py",
line 456 in add

File

"/ibpc/sablons/santuz/.local/share/ChimeraX/0.8/site-packages/chimerax/clipper/symmetry.py",
line 430 in init

File

"/ibpc/sablons/santuz/.local/share/ChimeraX/0.8/site-packages/chimerax/clipper/symmetry.py",
line 145 in get_symmetry_handler

File

"/ibpc/sablons/santuz/.local/share/ChimeraX/0.8/site-packages/chimerax/isolde/isolde.py",
line 2314 in _change_selected_model

File

"/ibpc/sablons/santuz/.local/share/ChimeraX/0.8/site-packages/chimerax/isolde/isolde.py",
line 970 in _update_model_list

File

"/usr/lib/ucsf-chimerax/lib/python3.6/site-packages/chimerax/core/triggerset.py",
line 130 in invoke

File

"/usr/lib/ucsf-chimerax/lib/python3.6/site-packages/chimerax/core/triggerset.py",
line 190 in activate

File

"/usr/lib/ucsf-chimerax/lib/python3.6/site-packages/chimerax/core/triggerset.py",
line 325 in activate_trigger

File

"/usr/lib/ucsf-chimerax/lib/python3.6/site-packages/chimerax/core/models.py",
line 456 in add

File

"/usr/lib/ucsf-chimerax/lib/python3.6/site-packages/chimerax/core/models.py",
line 602 in open

File

"/usr/lib/ucsf-chimerax/lib/python3.6/site-packages/chimerax/core/commands/open.py",
line 62 in handle_unknown_kw

File

"/usr/lib/ucsf-chimerax/lib/python3.6/site-packages/chimerax/core/commands/open.py",
line 117 in open

File

"/ibpc/sablons/santuz/.local/share/ChimeraX/0.8/site-packages/chimerax/isolde/isolde.py",
line 3107 in load_demo_data

File

"/usr/lib/ucsf-chimerax/lib/python3.6/site-packages/chimerax/ui/gui.py",
line 227 in event_loop

File

"/usr/lib/ucsf-chimerax/lib/python3.6/site-packages/ChimeraX_main.py",
line 715 in init

File

"/usr/lib/ucsf-chimerax/lib/python3.6/site-packages/ChimeraX_main.py",
line 807 in <module>

File "/usr/lib/ucsf-chimerax/lib/python3.6/runpy.py", line 85 in

_run_code

File "/usr/lib/ucsf-chimerax/lib/python3.6/runpy.py", line 193 in

_run_module_as_main
Segmentation fault (core dumped)

I have the same behavior, when I have already a pdb loaded and when I
hit the button "Isolde".
Do you have an idea to solve this ?

Thanks,
Hubert

--
Hubert Santuz
UPR 9080 - Laboratoire de Biochimie Théorique
Institut de Biologie Physico-Chimique
13, rue Pierre et Marie Curie, 75005 Paris
Tél: 01 58 41 51 32

Attachments (1)

centos-7.def (1.7 KB ) - added by Greg Couch 7 years ago.
script to make CentOS 7 singularity container for building ChimeraX

Download all attachments as: .zip

Change History (13)

by Greg Couch, 7 years ago

Attachment: centos-7.def added

script to make CentOS 7 singularity container for building ChimeraX

comment:1 by Greg Couch, 7 years ago

Yes, C++ runtime issues are a pain. Are you using devtoolset-3 to build your ChimeraX extensions on CentOS? The compiler in devtoolset-3 should be old enough. For reference, I've attached the script used to build the singularity container that is used to build ChimeraX on CentOS 7. It could easily be adapted for docker, or be used to configuration a virtual machine.

in reply to:  3 comment:2 by tic20@…, 7 years ago

All my release builds were done in devtoolset-3 on my CentOS 7 machine, against the CentOS rpm build of ChimeraX 0.8. 

 
 
Tristan Croll
Research Fellow
Cambridge Institute for Medical Research
University of Cambridge CB2 0XY
 

 


comment:3 by Greg Couch, 7 years ago

For reference, the compilers currently used are:

gcc 4.9.2 -- CentOS 7
gcc 5.4.0 -- Ubuntu 16.04
gcc 7.3.0 -- Ubuntu 18.04
gcc 4.9.2 -- Generic Linux version (Debian 8)
clang-900.0.39.2 -- macOS 10.9 target
MSVC 2015 -- Windows

We will probably switch to MSVC 2017 for Windows before the 0.9 release, since that is what python.org is now using.

comment:4 by Tristan Croll, 7 years ago

Is there any way to make the singularity script automatically pull and install the latest ChimeraX daily build? That would make make it really ideal for bundle building purposes.

comment:5 by Greg Couch, 7 years ago

We could easily create different singularity containers with ChimeraX embedded, and those would work well in nogui mode. They might work with remote OpenGL, but are unlikely to work locally, because singularity containers are designed for server applications. For workstation applications, flatpak (or snap) sandboxing would work better.

Flatpak support is more common now in Linux distributions, so it probably time to create one and see how well it works.

in reply to:  7 comment:6 by tic20@…, 7 years ago

I’m mainly interested in a controlled environment for a build bot, so nogui mode is fine. 

 
 
Tristan Croll
Research Fellow
Cambridge Institute for Medical Research
University of Cambridge CB2 0XY
 

 


comment:7 by Tristan Croll, 7 years ago

Just returning to the "headline" question again: given that I'm using the atomstruct API extensively, unless I'm missing something (which is far from impossible) it's not going to be possible for me to make a single build of ISOLDE that's compatible with all four different ChimeraX Linux builds (CentOS and "generic linux" yes, others no). Providing ISOLDE and Clipper as source builds is probably a non-starter (I think you'd need to provide GCC in the ChimeraX distribution to be sure to use the right one), which really just leaves either providing multiple Linux builds on the ToolShed and relying on the user to pick the right one for their OS, or restricting ISOLDE to only work with the generic Linux and CentOS builds? Or is there another option?

comment:8 by Eric Pettersen, 6 years ago

Cc: Eric Pettersen added

Right now if I'm running Ubuntu and I go to the toolshed to install ISOLDE, I see an enabled "Install" button and nothing to indicate that ISOLDE will not run on my machine. Can this situation be improved somehow?

comment:9 by Tristan Croll, 6 years ago

A new cloud on the horizon with respect to this: over in OpenMM world, Peter Eastman has just put a huge amount of work into unifying the OpenCL and CUDA code into a single framework. Unfortunately, to do so he's used one of the few C++11 features that isn't implemented in GCC 4.9 (see https://github.com/openmm/openmm/issues/2545).

comment:10 by Greg Couch, 6 years ago

Will switch CentOS builds to use gcc/g++ from one of the devtoolsets. How about devtoolset-8?

in reply to:  12 comment:11 by Tristan Croll, 6 years ago

I take it you’d then bundle in the relevant runtime library?

I see CentOS 8 jumps all the way to GCC 8.something, so aiming to match that seems sensible.
 

 


comment:12 by Greg Couch, 6 years ago

Resolution: fixed
Status: assignedclosed

Currently using CentOS 7 binary bundles on all Linux variants, so there is a common ABI.

Note: See TracTickets for help on using tickets.