Segmentation fault in executable, but not in source

44 views
Skip to first unread message

James Loy

unread,
Oct 31, 2019, 8:33:11 AM10/31/19
to PyInstaller
Hi Folks-

I have a situation that I'm having a tough time debugging.  I'm new to PyInstaller, and I'm also dealing with a very hacked together code base with A LOT of dependencies.

I am able to freeze my code on MacOS mojave, and run with no problem.  However, when I freeze the code on CentOS 7.7 I encounter a seg fault.  When I run the code straight from source (i.e., python myscript.py), the seg fault doesn't pop up and everything runs as expected (on both MacOS and CentOS 7.7).

So my question is: what sort of things would cause an executable to seg fault, but not the python script?  My first hunch is some binary compatibility issue with external libraries and the CentOS, but how does that explain that the python script works perfectly fine?  I say this because, when I change some of the dependencies, I get errors about not being able to find the right version of GLIBCXX.

Anyone have any thoughts?  Thanks in advance.
-James


CONFIDENTIALITY NOTICE: This email message and any attachments may contain material that is confidential, privileged and/or attorney work product for the sole use of the intended recipient.  Any review, disclosure, reliance or distribution by others or forwarding without express permission is strictly prohibited.  If you are not the intended recipient, please contact the sender and delete all copies including any attachments.

 

SparkCognition, Inc. or any of its affiliates may monitor electronic communications sent or received by our networks in order to protect our business and verify compliance with our policies and relevant legal requirements. Any personal information contained or referred to within this electronic communication will be processed in accordance with our privacy standards available at https://www.sparkcognition.com/privacy/.

James Loy

unread,
Oct 31, 2019, 11:34:42 AM10/31/19
to PyInstaller
Just a little more context.  I'm working on a machine learning project that makes use of a lot of open source libraries for computation such as tensorflow, sklearn, pandas, and xgboost.  The versioning of each of the libraries hasn't been closely tracked, unfortunately.

I've attached the output of the build procedure in this comment.  In particular, I'm also curious about these few lines:

ldd: warning: you do not have execution permission for `/root/miniconda3/envs/rte/lib/python3.6/site-packages/cryptography-2.5-py3.6-linux-x86_64.egg/cryptography/hazmat/bindings/_constant_time.abi3.so'
ldd: warning: you do not have execution permission for `/root/miniconda3/envs/rte/lib/python3.6/site-packages/cryptography-2.5-py3.6-linux-x86_64.egg/cryptography/hazmat/bindings/_openssl.abi3.so'
ldd: warning: you do not have execution permission for `/root/miniconda3/envs/rte/lib/python3.6/site-packages/cryptography-2.5-py3.6-linux-x86_64.egg/cryptography/hazmat/bindings/_padding.abi3.so'
ldd: warning: you do not have execution permission for `/root/miniconda3/envs/rte/lib/python3.6/site-packages/coverage-5.0a8-py3.6-linux-x86_64.egg/coverage/tracer.cpython-36m-x86_64-linux-gnu.so'
/root/miniconda3/envs/rte/lib/python3.6/site-packages/numba/npyufunc/tbbpool.cpython-36m-x86_64-linux-gnu.so: /lib64/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /root/miniconda3/envs/rte/lib/python3.6/site-packages/numba/npyufunc/../.libs/libtbb-52872150.so.2)
/root/miniconda3/envs/rte/lib/python3.6/site-packages/numba/npyufunc/tbbpool.cpython-36m-x86_64-linux-gnu.so: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /root/miniconda3/envs/rte/lib/python3.6/site-packages/numba/npyufunc/../.libs/libtbb-52872150.so.2)
/root/miniconda3/envs/rte/lib/python3.6/site-packages/numba/npyufunc/tbbpool.cpython-36m-x86_64-linux-gnu.so: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /root/miniconda3/envs/rte/lib/python3.6/site-packages/numba/npyufunc/../.libs/libtbb-52872150.so.2)
ldd: warning: you do not have execution permission for `/root/miniconda3/envs/rte/plugins/imageformats/../../lib/libgcc_s.so.1'
/root/miniconda3/envs/rte/lib/python3.6/site-packages/numba/npyufunc/../.libs/libtbb-52872150.so.2: /lib64/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /root/miniconda3/envs/rte/lib/python3.6/site-packages/numba/npyufunc/../.libs/libtbb-52872150.so.2)
/root/miniconda3/envs/rte/lib/python3.6/site-packages/numba/npyufunc/../.libs/libtbb-52872150.so.2: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /root/miniconda3/envs/rte/lib/python3.6/site-packages/numba/npyufunc/../.libs/libtbb-52872150.so.2)
/root/miniconda3/envs/rte/lib/python3.6/site-packages/numba/npyufunc/../.libs/libtbb-52872150.so.2: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /root/miniconda3/envs/rte/lib/python3.6/site-packages/numba/npyufunc/../.libs/libtbb-52872150.so.2)

I don't see any of these errors when building on MacOS.
pyInstaller_out.txt
Reply all
Reply to author
Forward
0 new messages