Segmentation Fault with AWS


Deploy Orthanc to Amazon EC2 Micro Instance (t1.micro).

Two different micro instance:

  1. Amazon Linux AMI (CentOS 32 bit)
  2. Debian 7.1 (32 bit)

Daemon could not be started (./Orthanc).
Return: Segmentation Fault.

Any idea what could be wrong?




Hard to answer… We have never tried running Orthanc on a cloud framework. To better understand the problem, try and follow the instructions of the following post to gather more information about the crash:

Especially, try to use gdb after compiling Orthanc with the CMake flag “-DCMAKE_BUILD_TYPE=Debug”.


Also, please try running the unit tests.

I am sorry for the long delay.

Performed the tests suggested.

I build Orthanc in CentOS 6.4 i386 (VirtualBox). - 2.6.32-358.14.1.el6.i686

I forgot:

./Orthanc --verbose and ./Orthanc --trace
result: Segmentation Fault


It looks to me that it is a binary compatibility problem between versions of libc. You compile Orthanc on CentOS and use it on another Linux distribution (Amazon). Because binary compatibility is not guaranteed between Linux distributions, your Orthanc binaries might badly use the symbols of the system shared libraries in the Amazon distribution, which results in a hard crash. Even when Orthanc is statically linked, there indeed remain dependencies on a handful of shared libraries (notably libc).

To solve this problem, I would suggest you to build Orthanc directly on the Amazon distribution. In this way, you would be sure that the binary compatibility is fulfilled.

Another option would be to compile Orthanc with the Linux Standard Base (LSB) SDK:

An executable that is produced by the LSB version of g++ should be binary compatible with any Linux version. Unfortunately, I have not been able to easily compile DCMTK with LSB. Maybe it is possible to do so, but it would require patching the DCMTK source code.

A final alternative would be to compile Orthanc on a Linux distribution that is shipped with an older version of libc, such as Ubuntu 8.04. Because to the best of my knowledge, backward compatibility is ensured by libc, this binary should work on modern distributions. This is however clearly not a recommended, clean solution.


I will follow the suggestion to build on Amazon.

Thank you!