Segmentation Fault with AWS

1,400 views
Skip to first unread message

Vinicius Vollrath

unread,
Aug 7, 2013, 2:14:44 PM8/7/13
to orthan...@googlegroups.com
Hi!

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?

Thanks,
Vinicius

Sébastien Jodogne

unread,
Aug 7, 2013, 2:34:30 PM8/7/13
to orthan...@googlegroups.com
Hi,

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".

Sébastien-

Sébastien Jodogne

unread,
Aug 7, 2013, 2:35:31 PM8/7/13
to orthan...@googlegroups.com
Also, please try running the unit tests.

Vinicius Vollrath

unread,
Aug 20, 2013, 3:44:05 PM8/20/13
to orthan...@googlegroups.com
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
  • # yum groupinstall "Development Tools"
  • yum install kernel-devel kernel-headers
  • yum install -y mercurial
  • yum install -y uuid-perl libuuid-devel uuid-devel
  • cmake-2.8.10.2
  • cmake -DSTANDALONE_BUILD=ON -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Debug /home/pacsadmin/Orthanc
  • make
  • make doc
Export Orthanc and UnitTests binaries to AWS - Amazon Linux AMI - 3.4.57-48.42.amzn1.i686
  • # cd  /home/pacsadmin/
  • wget .... /Orthanc and UnitTests
  • chmod +x Orthanc
  • ./Orthanc
  • Segmentation Fault
  • ./UnitTests
  • Segmentation Fault
# vi /var/log/audit/audit.log
type=ANOM_ABEND msg=audit(1377022470.779:32): auid=222 uid=0 gid=0 ses=1 pid=1311 comm="Orthanc" reason="memory violation" sig=11

Any other tips?
What am I doing wrong?

Thanks!
Vinicius

Vinicius Vollrath

unread,
Aug 20, 2013, 4:02:30 PM8/20/13
to orthan...@googlegroups.com
I forgot:

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

Sébastien Jodogne

unread,
Aug 20, 2013, 4:27:19 PM8/20/13
to orthan...@googlegroups.com
Hello,

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.

HTH,
Sébastien-

Vinicius Vollrath

unread,
Aug 20, 2013, 5:01:49 PM8/20/13
to Sébastien Jodogne, orthan...@googlegroups.com
I will follow the suggestion to build on Amazon.
Thank you!
Vinicius
Reply all
Reply to author
Forward
0 new messages