
Using gdb I get the following seg fault. I also included a backtrace. (gdb) run Starting program: /home/gschrad/projects/boost/test/shm_test [Thread debugging using libthread_db enabled] [New Thread 46912496320976 (LWP 9409)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 46912496320976 (LWP 9409)] 0x000000000040202c in boost::interprocess::offset_ptr<boost::intrusive::detail::compact_rbtree_node<boost::interprocess::offset_ptr<void>
::get_pointer (this=0xaaaad058) at ../ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/interprocess/offset_ptr.hpp:80 /home/gschrad/projects/boost/ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/interprocess/offset_ptr.hpp:80:2541:beg:0x40202c (gdb) frame 0 #0 0x000000000040202c in boost::interprocess::offset_ptr<boost::intrusive::detail::compact_rbtree_node<boost::interprocess::offset_ptr<void> ::get_pointer (this=0xaaaad058) at ../ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/interprocess/offset_ptr.hpp:80 (gdb) frame 0 #0 0x000000000040202c in boost::interprocess::offset_ptr<boost::intrusive::detail::compact_rbtree_node<boost::interprocess::offset_ptr<void> ::get_pointer (this=0xaaaad058) at ../ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/interprocess/offset_ptr.hpp:80 (gdb) frame 0 #0 0x000000000040202c in boost::interprocess::offset_ptr<boost::intrusive::detail::compact_rbtree_node<boost::interprocess::offset_ptr<void> ::get_pointer (this=0xaaaad058) at ./ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/interprocess/offset_ptr.hpp:80
::get_pointer (this=0xaaaad058) at ../ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/interprocess/offset_ptr.hpp:80 #1 0x0000000000402075 in boost::interprocess::offset_ptr<boost::intrusive::detail::compact_rbtree_node<boost::interprocess::offset_ptr<void> ::get (this=0xaaaad058) at ../ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/interprocess/offset_ptr.hpp:141 #2 0x00000000004022ad in boost::intrusive::pointer_plus_bit<boost::interprocess::offset_ptr<boost::intrusive::detail::compact_rbtree_node<boost::interprocess::offset_ptr<void>
::get_bit (n=@0xaaaad058) at ../ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/interprocess/offset_ptr.hpp:393 #3 0x00000000004022d9 in boost::intrusive::detail::compact_rbtree_node_traits_impl<boost::interprocess::offset_ptr<void> ::get_color (n=@0x7fff4b460980) at ../ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/intrusive/detail/rbtree_node.hpp:144 #4 0x0000000000404f3f in boost::intrusive::rbtree_algorithms<boost::intrusive::detail::rbtree_node_traits<boost::interprocess::offset_ptr<void> ::rebalance (p=@0x7fff4b460db0, header=@0x7fff4b460da0) at ../ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/intrusive/rbtree_algorithms.hpp:1081 #5 0x00000000004053c5 in boost::intrusive::rbtree_algorithms<boost::intrusive::detail::rbtree_node_traits<boost::interprocess::offset_ptr<void> ::link_and_balance (z=@0x7fff4b460ed0, par=@0x7fff4b460ec0, left=true, header=@0x7fff4b460eb0) at ../ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/intrusive/rbtree_algorithms.hpp:968 #6 0x0000000000405dec in boost::intrusive::rbtree_algorithms<boost::intrusive::detail::rbtree_node_traits<boost::interprocess::offset_ptr<void>
::insert_equal_upper_bound<boost::intrusive::detail::key_node_ptr_compare<std::less<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void> >::block_ctrl>, boost::intrusive::set_base_hook<boost::intrusive::tag, (boost::intrusive::linking_policy)0, boost::interprocess::offset_ptr<void> ::value_traits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void> >::block_ctrl> > > (h=@0x7fff4b460f70, new_node=@0x7fff4b460f60, comp={<boost::intrusive::detail::ebo_functor_holder<std::less<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void> >::block_ctrl> >> = {<boost::intrusive::detail::ebo_functor_holder_impl<std::less<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void> >::block_ctrl>,false>> = {<std::less<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void> >::block_ctrl>> = {<> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}) at ../ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/intrusive/rbtree_algorithms.hpp:705 #7 0x0000000000405fd6 in boost::intrusive::rbtree<boost::intrusive::set_base_hook<boost::intrusive::tag, (boost::intrusive::linking_policy)0, boost::interprocess::offset_ptr<void> ::value_traits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void> >::block_ctrl>, std::less<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void> >::block_ctrl>, true, unsigned long>::insert_equal_upper_bound (this=0x2aaaaaaad038, value=@0x2aaaaaaad120) at ../ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/intrusive/rbtree.hpp:367 #8 0x0000000000406048 in boost::intrusive::multiset<boost::intrusive::set_base_hook<boost::intrusive::tag, (boost::intrusive::linking_policy)0, boost::interprocess::offset_ptr<void> ::value_traits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void> >::block_ctrl>, std::less<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void> >::block_ctrl>, true, unsigned long>::insert (this=0x2aaaaaaad038, value=@0x2aaaaaaad120) at ../ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/intrusive/set.hpp:1229 #9 0x000000000040653b in boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void> >::priv_add_segment (this=0x2aaaaaaad010, addr=0x2aaaaaaad120, size=4712) at ../ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/interprocess/mem_algo/rbtree_best_fit.hpp:534 #10 0x0000000000406a3b in rbtree_best_fit (this=0x2aaaaaaad010, size=4984, extra_hdr_bytes=152) at ./ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/interprocess/mem_algo/rbtree_best_fit.hpp:418 #11 0x0000000000406af4 in segment_manager_base (this=0x2aaaaaaad010, size=4984, reserved_bytes=152) at ../ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/interprocess/segment_manager.hpp:95 #12 0x0000000000406ca5 in segment_manager (this=0x2aaaaaaad010, size=4984) at ../ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/interprocess/segment_manager.hpp:384 #13 0x0000000000406e2d in boost::interprocess::detail::basic_managed_memory_impl<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void> >, boost::interprocess::iset_index>::create_impl (this=0x7fff4b461450, addr=0x2aaaaaaad010, size=4984) at ../ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/interprocess/detail/managed_memory_impl.hpp:138 #14 0x0000000000407007 in boost::interprocess::detail::create_open_func<boost::interprocess::detail::basic_managed_memory_impl<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void> >, boost::interprocess::iset_index> >::operator() (this=0x7fff4b461350, addr=0x2aaaaaaad010, size=4984, created=true) at ../ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/interprocess/detail/managed_memory_impl.hpp:712 #15 0x00000000004076ed in boost::interprocess::detail::managed_open_or_create_impl<boost::interprocess::shared_memory_object,
(gdb) bt #0 0x000000000040202c in boost::interprocess::offset_ptr<boost::intrusive::detail::compact_rbtree_node<boost::interprocess::offset_ptr<void> true>::priv_open_or_create<boost::interprocess::detail::create_open_func<boost::interprocess::detail::basic_managed_memory_impl<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void> >, boost::interprocess::iset_index> > > (this=0x7fff4b461458, type=boost::interprocess::detail::DoCreateOrOpen, size=5000, mode=boost::interprocess::read_write, addr=0x0, construct_func={m_frontend = 0x7fff4b461450, m_type = boost::interprocess::detail::DoCreateOrOpen}) at ./ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/interprocess/detail/managed_open_or_create_impl.hpp:364 #16 0x0000000000407dc3 in managed_open_or_create_impl<boost::interprocess::detail::create_open_func<boost::interprocess::detail::basic_managed_memory_impl<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void> >, boost::interprocess::iset_index> > > (this=0x7fff4b461458, name=0x408707 "TEST_SEGMENT", size=5000, mode=boost::interprocess::read_write, addr=0x0, construct_func=@0x7fff4b4613f0) at ../ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/interprocess/detail/managed_open_or_create_impl.hpp:154 #17 0x0000000000407f1c in basic_managed_shared_memory (this=0x7fff4b461450, open_or_create={<No data fields>}, name=0x408707 "TEST_SEGMENT", size=5000, addr=0x0) at ../ins-1.35.PR1.2-linux-x86_64/include/boost-1_35/boost/interprocess/managed_shared_memory.hpp:89 #18 0x00000000004017d6 in main (argc=1, argv=0x7fff4b461568) at shm_test.cc:8 (gdb) Ion GaztaƱaga wrote:
Glenn Schrader wrote:
If I compile the attached file with a version of trunk current as of a few days ago it works fine on 32 bit Linux but produces a seg fault on 64 bit Linux. An older version of 1.34+ from a few months ago works fine.
I configured using:
./configure --prefix=$HOME/boost_test --without-libraries=python,serialization,graph,test
Thanks for reporting it. I have no access to a 64 bit machine right noow but I'll try to get it ASAP. The example seems simple. I think you've already tested it, but are you sure it's a segfault and not an exception being thrown? If so, could you launch it with the debugger to see where the error is notified? Regards,
Ion _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost