Segmentation fault with ORK

Hi

I would like to recognize objects, so I use Object Recognition Kitchen (ORK) to achieve.
Then I follow the web site (http://wg-perception.github.io/ork_tutorials/tutorial03/tutorial.html#setup-the-working-environment) to setup environment.
The issue is that when I train date, the segmentation fault will happen. And I reinstall it again, the result is the same. Besides, I install it on x86 ubuntu desktop to check if it is software issue or platform issue, the consequence of installing ORK on desktop is that segmentation fault would not happen.
Had anyone been used ORK in TK1 ? can you provide me some information ?
Or anyone could give me some advise ?

Thank in advance.

Is it possible to build a debug version of this and run it from gdb? You’d get a stack frame at the time of failure which would point directly at whatever causes the failure.

Alternatively, you would get a lot of output running the program under strace (sudo apt-get install strace), but in about the last 100 lines or so (ignore the millions of lines before that) you might see a note on the segmentation fault. E.G., “strace -otrace_log.txt /path/to/exefilename”, then “tail -n 100 trace_log.txt”.

It isn’t unusual for a failure to be related to a library the program links against, you might also want to run ldd on the executable to see what is linked.

Hi linuxdev,

I run the program with gdb, according to message, I’m not sure it is related to OpenCV.
Can you please help me to check it ?
I post the message :

gdb --args python ./training -c rospack find object_recognition_linemod/conf/training.ork --visualize
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright © 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type “show copying”
and “show warranty” for details.
This GDB was configured as “arm-linux-gnueabihf”.
Type “show configuration” for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type “help”.
Type “apropos word” to search for commands related to “word”…
Reading symbols from python…(no debugging symbols found)…done.
(gdb) r
Starting program: /usr/bin/python ./training -c /home/ubuntu/catkin_ws/src/ork/linemod/conf/training.ork --visualize
[Thread debugging using libthread_db enabled]
Using host libthread_db library “/lib/arm-linux-gnueabihf/libthread_db.so.1”.
[New Thread 0xadd21460 (LWP 3417)]
Training 1 objects.
computing object_id: f3f45b3ae96a87c3508e19cf6d000405
[New Thread 0xad4a1460 (LWP 3419)]
[Thread 0xad4a1460 (LWP 3419) exited]

Program received signal SIGSEGV, Segmentation fault.
_Construct<cv::Ptrcv::linemod::Modality, cv::Ptrcv::linemod::Modality > (__value=…, __p=0x774b9008)
at /usr/include/c++/4.8/bits/stl_construct.h:83
83 ::new(static_cast<void*>(__p)) _T1(__value);
(gdb)

Thank you for your reply.

Can you run the backtrace command, “bt”? Then the “l” to list source command? Although it shows cv:: namespace in use, the failure looks to be within a template…so it could be something invalid for the template to contain, or the object the template contains has an error.

Hi linuxdev,

The message is quit long, but it seems the root cause at /home/ubuntu/catkin_ws/src/ork/linemod/src/linemod_train.cpp:159

(gdb) bt
#0 _Construct<cv::Ptrcv::linemod::Modality, cv::Ptrcv::linemod::Modality > (__value=…, __p=0x774b9008)
at /usr/include/c++/4.8/bits/stl_construct.h:83
#1 __uninit_copy<__gnu_cxx::__normal_iterator<cv::Ptrcv::linemod::Modality const*, std::vector<cv::Ptrcv::linemod::Modality > >, cv::Ptrcv::linemod::Modality> (__result=0x774b9008, __last=…, __first=…) at /usr/include/c++/4.8/bits/stl_uninitialized.h:75
#2 uninitialized_copy<__gnu_cxx::__normal_iterator<cv::Ptrcv::linemod::Modality const
, std::vector<cv::Ptrcv::linemod::Modality > >, cv::Ptrcv::linemod::Modality> (__result=0x774b9008, __last=…, __first=…)
at /usr/include/c++/4.8/bits/stl_uninitialized.h:117
#3 __uninitialized_copy_a<__gnu_cxx::__normal_iterator<cv::Ptrcv::linemod::Modality const
, std::vector<cv::Ptrcv::linemod::Modality > >, cv::Ptrcv::linemod::Modality, cv::Ptrcv::linemod::Modality > (__result=0x774b9008,
__last=<error reading variable: Cannot access memory at address 0x35646d22>, __first=…)
at /usr/include/c++/4.8/bits/stl_uninitialized.h:258
#4 _M_allocate_and_copy<__gnu_cxx::__normal_iterator<cv::Ptrcv::linemod::Modality const
, std::vector<cv::Ptrcv::linemod::Modality > > > (this=0x38efdc, __last=…, __first=…, __n=111971748) at /usr/include/c++/4.8/bits/stl_vector.h:1141
#5 std::vector<cv::Ptrcv::linemod::Modality, std::allocator<cv::Ptrcv::linemod::Modality > >::operator= (
this=this@entry=0x38efdc, __x=std::vector of length 111971748, capacity 141151269 = {…})
at /usr/include/c++/4.8/bits/vector.tcc:188
#6 0xb1e2d338 in operator= (this=0x38efdc) at /opt/ros/indigo/include/opencv-3.1.0-dev/opencv2/rgbd/linemod.hpp:321
#7 ecto_linemod::Trainer::process (this=0x820480, inputs=…, outputs=…)
at /home/ubuntu/catkin_ws/src/ork/linemod/src/linemod_train.cpp:159
#8 0xb6530962 in ecto::cell::process_with_only_these_inputs(ecto::tendrils const&) () from /opt/ros/indigo/lib/libecto.so.0.6
#9 0xb659d978 in ecto::graph::invoke_process(ecto::graph::graph_t&, unsigned int) () from /opt/ros/indigo/lib/libecto.so.0.6
#10 0xb6598096 in ecto::scheduler::execute_iter(unsigned int, unsigned int, unsigned int) () from /opt/ros/indigo/lib/libecto.so.0.6
#11 0xb6599704 in boost::asio::detail::completion_handler<boost::_bi::bind_t<void, boost::_mfi::mf3<void, ecto::scheduler, unsigned int, unsigned int, unsigned int>, boost::_bi::list4<boost::_bi::valueecto::scheduler*, boost::_bi::value, boost::_bi::value, boost::bi::value > > >::do_complete(boost::asio::detail::task_io_service*, boost::asio::detail::task_io_service_operation*, boost::system::error_code const&, unsigned int) () from /opt/ros/indigo/lib/libecto.so.0.6
#12 0xb659a0fc in boost::asio::detail::task_io_service::do_run_one(boost::asio::detail::scoped_lockboost::asio::detail::posix_mutex&, boost::asio::detail::task_io_service_thread_info&, boost::system::error_code const&) () from /opt/ros/indigo/lib/libecto.so.0.6
#13 0xb659a5c6 in boost::asio::detail::task_io_service::run(boost::system::error_code&) () from /opt/ros/indigo/lib/libecto.so.0.6
#14 0xb6598942 in ecto::scheduler::run() () from /opt/ros/indigo/lib/libecto.so.0.6
#15 0xb65989ce in ecto::scheduler::execute(unsigned int) () from /opt/ros/indigo/lib/libecto.so.0.6
#16 0xb3a58fd8 in ecto::cell
ecto::py::BlackBox::dispatch_process(ecto::tendrils const&, ecto::tendrils const&) ()
from /opt/ros/indigo/lib/python2.7/dist-packages/ecto/ecto_main.so
#17 0xb6530962 in ecto::cell::process_with_only_these_inputs(ecto::tendrils const&) () from /opt/ros/indigo/lib/libecto.so.0.6
#18 0xb659d978 in ecto::graph::invoke_process(ecto::graph::graph_t&, unsigned int) () from /opt/ros/indigo/lib/libecto.so.0.6
#19 0xb6598096 in ecto::scheduler::execute_iter(unsigned int, unsigned int, unsigned int) () from /opt/ros/indigo/lib/libecto.so.0.6
#20 0xb6599658 in boost::asio::detail::completion_handler<boost::_bi::bind_t<void, boost::_mfi::mf3<void, ecto::scheduler, unsigned int, unsigned int, unsigned int>, boost::_bi::list4<boost::_bi::valueecto::scheduler*, boost::_bi::value, boost::_bi::value, boost::_bi::value > > >::do_complete(boost::asio::detail::task_io_service*, boost::asio::detail::task_io_service_operation*, boost::system::error_code const&, unsigned int) () from /opt/ros/indigo/lib/libecto.so.0.6
#21 0xb659a0fc in boost::asio::detail::task_io_service::do_run_one(boost::asio::detail::scoped_lockboost::asio::detail::posix_mutex&, boost::asio::detail::task_io_service_thread_info&, boost::system::error_code const&) () from /opt/ros/indigo/lib/libecto.so.0.6
#22 0xb659a5c6 in boost::asio::detail::task_io_service::run(boost::system::error_code&) () from /opt/ros/indigo/lib/libecto.so.0.6
#23 0xb6598942 in ecto::scheduler::run() () from /opt/ros/indigo/lib/libecto.so.0.6
#24 0xb65989ce in ecto::scheduler::execute(unsigned int) () from /opt/ros/indigo/lib/libecto.so.0.6
#25 0xb3a6f00a in ecto::plasm_wrapper::plasm_execute(boost::shared_ptrecto::plasm, unsigned int) ()
from /opt/ros/indigo/lib/python2.7/dist-packages/ecto/ecto_main.so
#26 0xb3a7227e in boost::python::objects::caller_py_function_impl<boost::python::detail::caller<bool ()(boost::shared_ptrecto::plasm, unsigned int), boost::python::default_call_policies, boost::mpl::vector3<bool, boost::shared_ptrecto::plasm, unsigned int> > >::operator()(_object, _object*) () from /opt/ros/indigo/lib/python2.7/dist-packages/ecto/ecto_main.so
#27 0xb615c1e0 in boost::python::objects::function::call(_object*, _object*) const ()
from /usr/lib/arm-linux-gnueabihf/libboost_python-py27.so.1.54.0
#28 0xb615c34a in ?? () from /usr/lib/arm-linux-gnueabihf/libboost_python-py27.so.1.54.0
#29 0xb61628f0 in boost::python::detail::exception_handler::operator()(boost::function0 const&) const ()
—Type to continue, or q to quit—
from /usr/lib/arm-linux-gnueabihf/libboost_python-py27.so.1.54.0
#30 0xb3a6e3f8 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::NullTendril, void ()(ecto::except::NullTendril const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void ()(ecto::except::NullTendril const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0 const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0 const&) () from /opt/ros/indigo/lib/python2.7/dist-packages/ecto/ecto_main.so
#31 0xb61628de in boost::python::detail::exception_handler::operator()(boost::function0 const&) const ()
from /usr/lib/arm-linux-gnueabihf/libboost_python-py27.so.1.54.0
#32 0xb3a6e3cc in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::AlreadyConnected, void ()(ecto::except::AlreadyConnected const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void ()(ecto::except::AlreadyConnected const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0 const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0 const&) () from /opt/ros/indigo/lib/python2.7/dist-packages/ecto/ecto_main.so
#33 0xb61628de in boost::python::detail::exception_handler::operator()(boost::function0 const&) const ()
from /usr/lib/arm-linux-gnueabihf/libboost_python-py27.so.1.54.0
#34 0xb3a6e3a0 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::NotConnected, void ()(ecto::except::NotConnected const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void ()(ecto::except::NotConnected const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0 const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0 const&) () from /opt/ros/indigo/lib/python2.7/dist-packages/ecto/ecto_main.so
#35 0xb61628de in boost::python::detail::exception_handler::operator()(boost::function0 const&) const ()
from /usr/lib/arm-linux-gnueabihf/libboost_python-py27.so.1.54.0
#36 0xb3a6e374 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::CellException, void ()(ecto::except::CellException const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void ()(ecto::except::CellException const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0 const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0 const&) () from /opt/ros/indigo/lib/python2.7/dist-packages/ecto/ecto_main.so
#37 0xb61628de in boost::python::detail::exception_handler::operator()(boost::function0 const&) const ()
from /usr/lib/arm-linux-gnueabihf/libboost_python-py27.so.1.54.0
#38 0xb3a6e348 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::TendrilRedeclaration, void ()(ecto::except::TendrilRedeclaration const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void ()(ecto::except::TendrilRedeclaration const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0 const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0 const&) () from /opt/ros/indigo/lib/python2.7/dist-packages/ecto/ecto_main.so
#39 0xb61628de in boost::python::detail::exception_handler::operator()(boost::function0 const&) const ()
from /usr/lib/arm-linux-gnueabihf/libboost_python-py27.so.1.54.0
#40 0xb3a6e31c in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::FailedFromPythonConversion, void ()(ecto::except::FailedFromPythonConversion const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void ()(ecto::except::FailedFromPythonConversion const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0 const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0 const&) () from /opt/ros/indigo/lib/python2.7/dist-packages/ecto/ecto_main.so
#41 0xb61628de in boost::python::detail::exception_handler::operator()(boost::function0 const&) const ()
from /usr/lib/arm-linux-gnueabihf/libboost_python-py27.so.1.54.0
#42 0xb3a6e2f0 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::NonExistant, void ()(ecto::except::NonExistant const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void ()(ecto::except::NonExistant const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0 const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0 const&) () from /opt/ros/indigo/lib/python2.7/dist-packages/ecto/ecto_main.so
#43 0xb61628de in boost::python::detail::exception_handler::operator()(boost::function0 const&) const ()
from /usr/lib/arm-linux-gnueabihf/libboost_python-py27.so.1.54.0
#44 0xb3a6e2c4 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::ValueRequired, void ()(ecto::except::ValueRequired const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void ()(ecto::except::ValueRequired const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0 const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<voi—Type to continue, or q to quit—
d> const&) () from /opt/ros/indigo/lib/python2.7/dist-packages/ecto/ecto_main.so
#45 0xb61628de in boost::python::detail::exception_handler::operator()(boost::function0 const&) const ()
from /usr/lib/arm-linux-gnueabihf/libboost_python-py27.so.1.54.0
#46 0xb3a6e298 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::ValueNone, void ()(ecto::except::ValueNone const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void ()(ecto::except::ValueNone const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0 const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0 const&)
() from /opt/ros/indigo/lib/python2.7/dist-packages/ecto/ecto_main.so
#47 0xb61628de in boost::python::detail::exception_handler::operator()(boost::function0 const&) const ()
from /usr/lib/arm-linux-gnueabihf/libboost_python-py27.so.1.54.0
#48 0xb3a6e26c in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::TypeMismatch, void ()(ecto::except::TypeMismatch const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void ()(ecto::except::TypeMismatch const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0 const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0 const&) () from /opt/ros/indigo/lib/python2.7/dist-packages/ecto/ecto_main.so
#49 0xb61628de in boost::python::detail::exception_handler::operator()(boost::function0 const&) const ()
from /usr/lib/arm-linux-gnueabihf/libboost_python-py27.so.1.54.0
#50 0xb3a6e240 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::EctoException, void ()(ecto::except::EctoException const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void ()(ecto::except::EctoException const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0 const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0 const&) () from /opt/ros/indigo/lib/python2.7/dist-packages/ecto/ecto_main.so
#51 0xb6162778 in boost::python::handle_exception_impl(boost::function0) ()
from /usr/lib/arm-linux-gnueabihf/libboost_python-py27.so.1.54.0
#52 0xb615b488 in ?? () from /usr/lib/arm-linux-gnueabihf/libboost_python-py27.so.1.54.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
(gdb) l
78 inline void
79 _Construct(_T1* __p, const _T2& __value)
80 {
81 // GLIBCXX_RESOLVE_LIB_DEFECTS
82 // 402. wrong new expression in [some
]allocator::construct
83 ::new(static_cast<void*>(__p)) _T1(__value);
84 }
85 #endif
86
87 /**
(gdb)

I shouldn’t laugh at bugs, but that backtrace is the longest I’ve seen, I think I’ll remember this thread for a long time.

Something which may lend a clue about the issue, and perhaps also about the length of the backtrace is this line at the end of the backtrace:

Backtrace stopped: previous frame identical to this frame (corrupt stack?)

The error initially looks like a template container disagrees with something about what was being stored in it. However, if this is a corrupt stack frame (and it seems it is), there may be another error which is unrelated to this which may have just shown itself somewhere other than where it originates. Typically, a corrupt stack frame is either from a stack overflow or from mixing two incompatible versions of software (such as linking in a library and expecting a certain function signature and using that signature when the real signature is something else).

It may be a rather long and difficult thing to debug. More information is probably going to be needed. For one thing a list of what is linked into the application would be a start. Note this in the source listing:

81 // _GLIBCXX_RESOLVE_LIB_DEFECTS
82 // 402. wrong new expression in [some_]allocator::construct

This sort of points towards a version mismatch across linked in code instead of buffer overflow. To see what your program is linked against you can use the “ldd” command on the executable, e.g.:

ldd ./progname

If you compiled anything yourself, which compiler was used? Was this cross-compiled or natively compiled on the Jetson? The particular L4T release may also be important (“head -n 1 /etc/nv_tegra_release”).

Hi linuxdev,

I’m sorry that I don’t know how to use ldd in python. And I search such case in Google, it seems there is no example can follow.
Do you have idea about that ?

ubuntu@tegra-ubuntu:~/catkin_ws/src/ork/object_recognition_core/apps$ ldd ./training -c rospack find object_recognition_linemod/conf/training.ork
./training:
not a dynamic executable
-c:
ldd: ./-c: No such file or directory
/home/ubuntu/catkin_ws/src/ork/linemod/conf/training.ork:
not a dynamic executable
ubuntu@tegra-ubuntu:~/catkin_ws/src/ork/object_recognition_core/apps$ ldd python ./training -c rospack find object_recognition_linemod/conf/training.ork
python:
ldd: ./python: No such file or directory
./training:
not a dynamic executable
-c:
ldd: ./-c: No such file or directory
/home/ubuntu/catkin_ws/src/ork/linemod/conf/training.ork:
not a dynamic executable

Yes, I compiled almost everything (I guess), and there are ROS packages, so I use catkin make to compiled them on Jetson, the L4T release is 21.4 :
ubuntu@tegra-ubuntu:~$ head -n 1 /etc/nv_tegra_release

R21 (release), REVISION: 4.0, GCID: 5650832, BOARD: ardbeg, EABI: hard, DATE: Thu Jun 25 22:38:59 UTC 2015

Thanks

Hi linuxdev,

I had solved the issue before, but there is a new issue occurs.
The solution for previous issue is that I add a specific opencv version, like
before: find_package(OpenCV REQUIRED)
after : find_package(OpenCV 2.4.11 EXACT REQUIRED)

The idea comes from the debug message, I saw those long message that use ROS opencv3, so I suspect that it might be root cause. Then I would like to use the opencv that I install on TK1.
Thus, it started running normally, however, it would stop due to NVMAP_IOC_FREE failed: Bad file descriptor

Here is gdb message, but I can’t see any useful information.
Please give me some suggestions.
gdb --args python ./training -c rospack find object_recognition_linemod/conf/training.ork --visualize
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright © 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type “show copying”
and “show warranty” for details.
This GDB was configured as “arm-linux-gnueabihf”.
Type “show configuration” for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type “help”.
Type “apropos word” to search for commands related to “word”…
Reading symbols from python…(no debugging symbols found)…done.
(gdb) r
Starting program: /usr/bin/python ./training -c /home/ubuntu/catkin_ws/src/ork/linemod/conf/training.ork --visualize
[Thread debugging using libthread_db enabled]
Using host libthread_db library “/lib/arm-linux-gnueabihf/libthread_db.so.1”.
[New Thread 0xb1e8c460 (LWP 6532)]
Training 1 objects.
computing object_id: 128237c882f7be7bc32ed45c8a000aec
[New Thread 0xada6b460 (LWP 6535)]
[Thread 0xada6b460 (LWP 6535) exited]
Info, T0: Load /tmp/file1fF0Yz.stl
Info, T0: Found a matching importer for this file format
Info, T0: Import root directory is ‘/tmp/’
Info, T0: Entering post processing pipeline
Info, T0: Points: 0, Lines: 0, Triangles: 1, Polygons: 0 (Meshes, X = removed)
Error, T0: FindInvalidDataProcess fails on mesh normals: Found zero-length vector
Info, T0: FindInvalidDataProcess finished. Found issues …
Info, T0: GenVertexNormalsProcess finished. Vertex normals have been calculated
Error, T0: Failed to compute tangents; need UV data in channel0
Info, T0: JoinVerticesProcess finished | Verts in: 1536 out: 258 | ~83.2%
Info, T0: Cache relevant are 1 meshes (512 faces). Average output ACMR is 0.669922
Info, T0: Leaving post processing pipeline
Loading im[New Thread 0xada6b460 (LWP 6538)]
[Thread 0xada6b460 (LWP 6538) exited]
Deleting the previous model 128237c882f7be7bc32ed45c8a00176e of object 128237c882f7be7bc32ed45c8a000aec
[Thread 0xb1e8c460 (LWP 6532) exited]
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
NVMAP_IOC_FREE failed: Bad file descriptor
[Inferior 1 (process 6529) exited normally]
(gdb) bt
No stack.
(gdb) l
1 events.c: No such file or directory.
(gdb)

Hmmm…python…I have never used ldd with a scripted language, so that’s a good question. Using ldd on the python interpreter itself with proper arguments might work, but that won’t show dependencies of modules loaded after startup. I do see a program which might do what’s desired, but I’ve never used it before: pldd

Looks like pldd is similar to ldd, but works on a running process ID. If the program does not fail immediately (e.g., if you add a prompt for “continue” prior to where it fails), then you could attach pldd to the PID after the program starts. If the failure is immediate, you might instead be able to use a script to start the program and get its PID, plus immediately run pldd on that PID…without actually sitting there and seeing how its timed or what can be modified (e.g., adding a prompt or adding a “sleep 30” type call), I’m not sure what will work for your case.

Can you use the PID with pldd? If not, are you able to modify to add a delay so you can attach to a PID prior to the crash? Is there already some sort of prompt or interactive mode you can enable to give you time to attach?

So far as the exact package match thing goes this would be a high probability for stack frame corruption if the wrong package is used versus what the program thinks the real API is. In the end I think finding where the issue is will simply point to using the wrong version of some library or module.