Open paulbourelly999 opened 3 months ago
Update, here is the trace I found when analyzing the core dumb with gdb
Reading symbols from libcarma_clockd.so...
warning: core file may not match specified executable file.
[New LWP 67622]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `python3 python_wrapper_test.py'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007c4c37b73661 in boost::tuples::cons<char const*, boost::tuples::cons<void (boost::python::detail::not_specified::*)(), boost::tuples::null_type> >::cons<boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const> (this=0x7ffde466d600, t2=..., t3=..., t4=..., t5=..., t6=..., t7=...,
--Type <RET> for more, q to quit, c to continue without paging--
t8=<error reading variable: Cannot access memory at address 0x7ffde466cff8>, t9=<error reading variable: Cannot access memory at address 0x7ffde466cff0>,
t10=<error reading variable: Cannot access memory at address 0x7ffde466cfe8>) at /usr/include/boost/tuple/detail/tuple_basic.hpp:307
307 cons( const null_type& /*t1*/, T2& t2, T3& t3, T4& t4, T5& t5,
(gdb) bt 10
#0 0x00007c4c37b73661 in boost::tuples::cons<char const*, boost::tuples::cons<void (boost::python::detail::not_specified::*)(), boost::tuples::null_type> >::cons<boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const> (this=0x7ffde466d600, t2=..., t3=..., t4=..., t5=..., t6=..., t7=...,
t8=<error reading variable: Cannot access memory at address 0x7ffde466cff8>, t9=<error reading variable: Cannot access memory at address 0x7ffde466cff0>,
t10=<error reading variable: Cannot access memory at address 0x7ffde466cfe8>) at /usr/include/boost/tuple/detail/tuple_basic.hpp:307
#1 0x00007c4c37b7300f in boost::tuples::cons<boost::python::detail::keywords<0ul>, boost::tuples::cons<char const*, boost::tuples::cons<void (boost::python::detail::not_specified::*)(), boost::tuples::null_type> > >::cons<boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const> (this=0x7ffde466d5f8, t2=...,
t3=..., t4=..., t5=..., t6=..., t7=..., t8=..., t9=..., t10=...) at /usr/include/boost/tuple/detail/tuple_basic.hpp:310
#2 0x00007c4c37b729c7 in boost::tuples::cons<boost::python::default_call_policies, boost::tuples::cons<boost::python::detail::keywords<0ul>, boost::tuples::cons<char const*, boost::tuples::cons<void (boost::python::detail::not_specified::*)(), boost::tuples::null_type> > > >::cons<boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const> (this=0x7ffde466d5f0, t2=..., t3=..., t4=..., t5=..., t6=..., t7=..., t8=..., t9=..., t10=...) at /usr/include/boost/tuple/detail/tuple_basic.hpp:310
#3 0x00007c4c37b72192 in boost::tuples::cons<boost::python::detail::not_specified const&, boost::tuples::cons<boost::python::default_call_policies, boost::tuples::cons<boost::python::detail::keywords<0ul>, boost::tuples::cons<char const*, boost::tuples::cons<void (boost::python::detail::not_specified::*)(), boost::tuples::null_type> > > > >::cons<boost::python::detail::not_specified const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const> (this=0x7ffde466d5e8, t1=..., t2=..., t3=...,
t4=..., t5=..., t6=..., t7=..., t8=..., t9=..., t10=...) at /usr/include/boost/tuple/detail/tuple_basic.hpp:302
#4 0x00007c4c37b71b4a in boost::tuples::cons<boost::python::detail::not_specified const&, boost::tuples::cons<boost::python::detail::not_specified const&, boost::tuples::cons<boost::python::default_call_policies, boost::tuples::cons<boost::python::detail::keywords<0ul>, boost::tuples::cons<char const*, boost::tuples::cons<void (boost::python::detail::not_specified::*)(), boost::tuples::null_type> > > > > >::cons<boost::python::detail::not_specified const, boost::python::detail::not_specified const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const> (this=0x7ffde466d5e0, t1=..., t2=..., t3=..., t4=..., t5=..., t6=..., t7=..., t8=..., t9=..., t10=...)
at /usr/include/boost/tuple/detail/tuple_basic.hpp:302
--Type <RET> for more, q to quit, c to continue without paging--
#5 0x00007c4c37b71422 in boost::tuples::cons<boost::python::detail::not_specified const&, boost::tuples::cons<boost::python::detail::not_specified const&, boost::tuples::cons<boost::python::detail::not_specified const&, boost::tuples::cons<boost::python::default_call_policies, boost::tuples::cons<boost::python::detail::keywords<0ul>, boost::tuples::cons<char const*, boost::tuples::cons<void (boost::python::detail::not_specified::*)(), boost::tuples::null_type> > > > > > >::cons<boost::python::detail::not_specified const, boost::python::detail::not_specified const, boost::python::detail::not_specified const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const> (this=0x7ffde466d5d8, t1=..., t2=..., t3=..., t4=..., t5=..., t6=...,
t7=..., t8=..., t9=..., t10=...) at /usr/include/boost/tuple/detail/tuple_basic.hpp:302
#6 0x00007c4c37b70cac in boost::tuples::cons<char const* const&, boost::tuples::cons<boost::python::detail::not_specified const&, boost::tuples::cons<boost::python::detail::not_specified const&, boost::tuples::cons<boost::python::detail::not_specified const&, boost::tuples::cons<boost::python::default_call_policies, boost::tuples::cons<boost::python::detail::keywords<0ul>, boost::tuples::cons<char const*, boost::tuples::cons<void (boost::python::detail::not_specified::*)(), boost::tuples::null_type> > > > > > > >::cons<char const* const, boost::python::detail::not_specified const, boost::python::detail::not_specified const, boost::python::detail::not_specified const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const, boost::tuples::null_type const> (this=0x7ffde466d5d0,
t1=@0x7ffde466d760: 0x0, t2=..., t3=..., t4=..., t5=..., t6=..., t7=..., t8=..., t9=..., t10=...) at /usr/include/boost/tuple/detail/tuple_basic.hpp:302
#7 0x00007c4c37b7047c in boost::tuples::tuple<char const* const&, boost::python::detail::not_specified const&, boost::python::detail::not_specified const&, boost::python::detail::not_specified const&, boost::python::default_call_policies, boost::python::detail::keywords<0ul>, char const*, void (boost::python::detail::not_specified::*)(), boost::tuples::null_type, boost::tuples::null_type>::tuple (this=0x7ffde466d5d0, t0=@0x7ffde466d760: 0x0, t1=..., t2=..., t3=...) at /usr/include/boost/tuple/detail/tuple_basic.hpp:515
#8 0x00007c4c37b6fa6f in boost::python::detail::def_helper<char const*, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified>::def_helper (this=0x7ffde466d5d0, a1=@0x7ffde466d760: 0x0) at /usr/include/boost/python/detail/def_helper.hpp:165
#9 0x00007c4c37b73580 in boost::python::class_<fwha_stol::lib::time::CarmaClock, boost::noncopyable_::noncopyable, boost::python::detail::not_specified, boost::python::detail::not_specified>::def_maybe_overloads<boost::python::api::object, char const*> (this=0x7ffde466d958, name=0x7c4c37b783e1 "__init__", fn=..., a1=@0x7ffde466d760: 0x0)
at /usr/include/boost/python/class.hpp:566
Hello, I am attempting to wrap a C++ class using boost python into a python includable module. I am using CMake instead of bjam to build the project but I am running into a segfault when I attempt to include import the generated shared library into a python script. Below is the class as well as the boost python wrapper code and the python script I am using to test this. The entire branch can be found here
I suspect this is either related to our constructor with default parameters or our use of std::thread or std::mutex. I am unsure how to continue debugging this issue other than looking at the core dumb with gdb. Any help would be greatly appreciated.
This is currently being built in Jammy dev containers using boost 1.74 and cmake version 3.27.7