[intrusive] Possible bug in bstree_algorithms.hpp
Hi, I've just upgraded to boost 1.56 and I've run into a problem. I get an infinite loop inside insert_equal_lower_bound_check(...) in bstree_algorithms.hpp. I'm using that file indirectly through Boost.Interprocess. I've not been able to penetrate exactly what that function does or whether there is indeed a bug in it. But I did look at the version that was in 1.55 (called insert_equal_check_impl(...) there), and to me it looks like there is at least one unexpected change: A ! has been removed on the line where the branches are compared, which to me would mean that we put the wrong branch into x. Again, I don't really understand what is going on in that function, so I might well be completely wrong. Cheers Lars
Well, that didnt take me long: My "theory" about the missing not-operator is completely wrong. I misread the code.... *red face*. But I still do get the infinite loop, so there is some problem there, just not what I suggested. On Sat, Sep 6, 2014 at 10:09 PM, Lars Hagström <lars@foldspace.nu> wrote:
Hi,
I've just upgraded to boost 1.56 and I've run into a problem. I get an infinite loop inside insert_equal_lower_bound_check(...) in bstree_algorithms.hpp. I'm using that file indirectly through Boost.Interprocess.
I've not been able to penetrate exactly what that function does or whether there is indeed a bug in it. But I did look at the version that was in 1.55 (called insert_equal_check_impl(...) there), and to me it looks like there is at least one unexpected change:
A ! has been removed on the line where the branches are compared, which to me would mean that we put the wrong branch into x.
Again, I don't really understand what is going on in that function, so I might well be completely wrong.
Cheers Lars
El 06/09/2014 22:09, Lars Hagström escribió:
Hi,
I've just upgraded to boost 1.56 and I've run into a problem. I get an infinite loop inside insert_equal_lower_bound_check(...) in bstree_algorithms.hpp. I'm using that file indirectly through Boost.Interprocess.
I've not been able to penetrate exactly what that function does or whether there is indeed a bug in it. But I did look at the version that was in 1.55 (called insert_equal_check_impl(...) there), and to me it looks like there is at least one unexpected change:
I think the bug might be earlier, it seems that tree invariants were somehow broken and effects appear later in this function. Any chance to get a test case with the problem? Best, Ion
Yeah, I think that seems a likely explanation. I'm not sure that I'll be able to produce something minimal that exhibits the problem. But the product I'm working on is open source, and the problem occurs during the build process of the code, so depending on your environment it should be fairly easy to replicate. But before we go down that path I'll have a look at it and see if I can find anything. Is there anything special that I should look at? /Lars On Sun, Sep 7, 2014 at 11:24 AM, Ion Gaztañaga <igaztanaga@gmail.com> wrote:
El 06/09/2014 22:09, Lars Hagström escribió:
Hi,
I've just upgraded to boost 1.56 and I've run into a problem. I get an infinite loop inside insert_equal_lower_bound_check(...) in bstree_algorithms.hpp. I'm using that file indirectly through Boost.Interprocess.
I've not been able to penetrate exactly what that function does or whether there is indeed a bug in it. But I did look at the version that was in 1.55 (called insert_equal_check_impl(...) there), and to me it looks like there is at least one unexpected change:
I think the bug might be earlier, it seems that tree invariants were somehow broken and effects appear later in this function.
Any chance to get a test case with the problem?
Best,
Ion
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/ mailman/listinfo.cgi/boost
El 07/09/2014 19:38, Lars Hagström escribió:
Yeah, I think that seems a likely explanation. I'm not sure that I'll be able to produce something minimal that exhibits the problem. But the product I'm working on is open source, and the problem occurs during the build process of the code, so depending on your environment it should be fairly easy to replicate.
But before we go down that path I'll have a look at it and see if I can find anything. Is there anything special that I should look at?
I have no usual suspect. Maybe some insertion just before the check. In develop I merged some invariant checker code contributed by Matei David. rbtree should inherit the check() method from bstree, maybe adding some calls in intrusive rbtree methods might catch the where the error is produced. Best, Ion
::deallocate (this=0x7ffff2065010, addr=0x7ffff20b4240) at /usr/include/boost/interprocess/segment_manager.hpp:225 #7 0x00007ffff74b80f5 in boost::interprocess::allocator<int, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >::deallocate (this=0x7ffff20b55f8,
::~vector_alloc_holder (this=0x7ffff20b55f8, __in_chrg=<optimized out>) at /usr/include/boost/container/vector.hpp:332 #9 0x00007ffff74b5d44 in boost::container::vector<int, boost::interprocess::allocator<int, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >::~vector (this=0x7ffff20b55f8, __in_chrg=<optimized out>) at /usr/include/boost/container/vector.hpp:790 #10 0x00007ffff74bbdde in Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm::~MemberMappingDescriptionShm (this=0x7ffff20b55f0, __in_chrg=<optimized out>) at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_shm_repository.h:341 #11 0x00007ffff74bbe38 in boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >::destroy (this=0x7fffffffdd10, ptr=...) at /usr/include/boost/interprocess/allocators/allocator.hpp:268 #12 0x00007ffff74b9f7c in boost::container::allocator_traits<boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > ::priv_destroy<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm> (a=..., p=0x7ffff20b55f0) at /usr/include/boost/container/allocator_traits.hpp:300 #13 0x00007ffff74b8212 in boost::container::allocator_traits<boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > ::destroy<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm> (a=..., p=0x7ffff20b55f0) at /usr/include/boost/container/allocator_traits.hpp:242 #14 0x00007ffff7555d13 in boost::container::container_detail::scoped_destructor_n<boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >::~scoped_destructor_n (this=0x7fffffffd4c0, __in_chrg=<optimized out>) at /usr/include/boost/container/detail/destroyers.hpp:207 #15 0x00007ffff754cd1e in boost::container::vector<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > ::priv_forward_range_insert_expand_backwards<boost::container::container_detail::insert_copy_proxy<boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >, Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm*> > (this=0x7fffffffdd10, new_start=0x7ffff20b5500, new_capacity=8,
I managed to get something to go wrong in Debug mode too (no idea if its the same problem, though). An assertion triggered: dots_configuration_check: /usr/include/boost/interprocess/mem_algo/rbtree_best_fit.hpp:1347: void boost::interprocess::rbtree_best_fit<MutexFamily, VoidMutex, MemAlignment>::priv_deallocate(void*) [with MutexFamily = boost::interprocess::mutex_family; VoidPointer = boost::interprocess::offset_ptr<void>; long unsigned int MemAlignment = 0ul]: Assertion `priv_is_allocated_block(block)' failed. I've also got a rather lengthy call stack for you: #0 0x00007ffff5b14d67 in raise () from /usr/lib/libc.so.6 #1 0x00007ffff5b16118 in abort () from /usr/lib/libc.so.6 #2 0x00007ffff5b0dbdd in __assert_fail_base () from /usr/lib/libc.so.6 #3 0x00007ffff5b0dc92 in __assert_fail () from /usr/lib/libc.so.6 #4 0x00007ffff74bd246 in boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::priv_deallocate (this=0x7ffff2065010, addr=0x7ffff20b4240) at /usr/include/boost/interprocess/mem_algo/rbtree_best_fit.hpp:1347 #5 0x00007ffff74bbbf7 in boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::deallocate (this=0x7ffff2065010, addr=0x7ffff20b4240) at /usr/include/boost/interprocess/mem_algo/rbtree_best_fit.hpp:1336 #6 0x00007ffff74b9def in boost::interprocess::segment_manager_base<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul> ptr=...) at /usr/include/boost/interprocess/allocators/allocator.hpp:157 #8 0x00007ffff74b6e1a in boost::container::container_detail::vector_alloc_holder<boost::interprocess::allocator<int, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >, boost::container::container_detail::integral_constant<unsigned int, 2u> pos=0x7ffff20b5680, n=1, insert_range_proxy=...) at /usr/include/boost/container/vector.hpp:2697 #16 0x00007ffff754415d in boost::container::vector<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >
::priv_forward_range_insert_no_capacity<boost::container::container_detail::insert_copy_proxy<boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >, Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm*> > (this=0x7fffffffdd10, pos=..., n=1, insert_range_proxy=...) at /usr/include/boost/container/vector.hpp:2024 #17 0x00007ffff7540905 in boost::container::vector<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > ::priv_push_back<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm> (this=0x7fffffffdd10, u=...) at /usr/include/boost/container/vector.hpp:1885 #18 0x00007ffff753e2f9 in boost::container::vector<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > ::push_back<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm> (this=0x7fffffffdd10, u=...) at /usr/include/boost/container/vector.hpp:1424 #19 0x00007ffff753d19d in Safir::Dob::Typesystem::Internal::PropertyMappingDescriptionShm::AddMemberMapping (this=0x7fffffffdce0, mmShm=...) at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_shm_repository.h:445 #20 0x00007ffff753afbf in Safir::Dob::Typesystem::Internal::RepositoryShm::CreateShmCopyOfRepository (srcRepository=..., shmRepositoryName="DOTS_REPOSITORY", sharedMemory=...) at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_shm_repository.cpp:147 #21 0x00007ffff74b3325 in Safir::Dob::Typesystem::Internal::RepositoryKeeper::Create (this=0x7ffff77d2940 <Safir::Dob::Typesystem::Internal::RepositoryKeeper::Instance()::instance>) at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_repository_keeper.cpp:172 #22 0x00007ffff53cad4e in Safir::Utilities::StartupSynchronizerImpl::FirstStart (this=0x648860, synchronized=0x7ffff77d2940 <Safir::Dob::Typesystem::Internal::RepositoryKeeper::Instance()::instance>) at /home/lars/safir_sdk_core/src/lluf/lluf_startup_synchronizer.ss/src/StartupSynchronizer.cpp:181 #23 0x00007ffff53cab86 in Safir::Utilities::StartupSynchronizerImpl::Start (this=0x648860, synchronized=0x7ffff77d2940 <Safir::Dob::Typesystem::Internal::RepositoryKeeper::Instance()::instance>) at /home/lars/safir_sdk_core/src/lluf/lluf_startup_synchronizer.ss/src/StartupSynchronizer.cpp:154 #24 0x00007ffff53c7eca in Safir::Utilities::StartupSynchronizer::Start (this=0x7ffff77d2948 <Safir::Dob::Typesystem::Internal::RepositoryKeeper::Instance()::instance+8>, synchronized=0x7ffff77d2940 <Safir::Dob::Typesystem::Internal::RepositoryKeeper::Instance()::instance>) at /home/lars/safir_sdk_core/src/lluf/lluf_startup_synchronizer.ss/src/StartupSynchronizer.cpp:423 #25 0x00007ffff74b2c2b in Safir::Dob::Typesystem::Internal::RepositoryKeeper::Initialize (sharedMemorySize=10485760, paths=std::vector of length 1, capacity 1 = {...}) at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_repository_keeper.cpp:53 #26 0x00007ffff74d8deb in Safir::Dob::Typesystem::Internal::InitHelper::Init () at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_init_helper.h:60 #27 0x00007ffff74db5c3 in boost::call_once<void (*)()> (flag=..., f=0x7ffff74d8da1 <Safir::Dob::Typesystem::Internal::InitHelper::Init()>) at /usr/include/boost/thread/pthread/once_atomic.hpp:149 #28 0x00007ffff74d9362 in Safir::Dob::Typesystem::Internal::Init () at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_init_helper.h:106 #29 0x00007ffff74cd391 in DotsC_NumberOfTypeIds () at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_kernel.cpp:123 #30 0x0000000000419b5d in CheckConfigurationDotsKernel::SimpleCheck () at /home/lars/safir_sdk_core/src/dots/dots_configuration_check.ss/src/dots_configuration_check.cpp:108 #31 0x0000000000419b36 in CheckConfigurationDotsKernel::Run (cmd=...) at /home/lars/safir_sdk_core/src/dots/dots_configuration_check.ss/src/dots_configuration_check.cpp:99 #32 0x000000000041426a in main (argc=1, argv=0x7fffffffe6a8) at /home/lars/safir_sdk_core/src/dots/dots_configuration_check.ss/src/dots_configuration_check.cpp:235 (gdb)
Could this be the same issue? /Lars On Sun, Sep 7, 2014 at 7:38 PM, Lars Hagström <lars@foldspace.nu> wrote:
Yeah, I think that seems a likely explanation. I'm not sure that I'll be able to produce something minimal that exhibits the problem. But the product I'm working on is open source, and the problem occurs during the build process of the code, so depending on your environment it should be fairly easy to replicate.
But before we go down that path I'll have a look at it and see if I can find anything. Is there anything special that I should look at?
/Lars
On Sun, Sep 7, 2014 at 11:24 AM, Ion Gaztañaga <igaztanaga@gmail.com> wrote:
El 06/09/2014 22:09, Lars Hagström escribió:
Hi,
I've just upgraded to boost 1.56 and I've run into a problem. I get an infinite loop inside insert_equal_lower_bound_check(...) in bstree_algorithms.hpp. I'm using that file indirectly through Boost.Interprocess.
I've not been able to penetrate exactly what that function does or whether there is indeed a bug in it. But I did look at the version that was in 1.55 (called insert_equal_check_impl(...) there), and to me it looks like there is at least one unexpected change:
I think the bug might be earlier, it seems that tree invariants were somehow broken and effects appear later in this function.
Any chance to get a test case with the problem?
Best,
Ion
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/ mailman/listinfo.cgi/boost
Hi again, I checked out the develop branches of intrusive and interprocess and set to calling check() in loads of places. I get an error that I think I that I've narrowed down to occurring in rbtree_best_fit::priv_deallocate Here is a snippet, with all of my check calls added. m_header.m_imultiset.check(); //Merge logic. First just update block sizes, then fix free blocks tree if(merge_with_prev || merge_with_next){ //Merge if the previous is free if(merge_with_prev){ m_header.m_imultiset.check(); //Get the previous block block_ctrl *prev_block = priv_prev_block(block); m_header.m_imultiset.check(); prev_block->m_size += block->m_size; * m_header.m_imultiset.check(); //this check fails!* BOOST_ASSERT(prev_block->m_size >= BlockCtrlUnits); m_header.m_imultiset.check(); block_to_insert = prev_block; } m_header.m_imultiset.check(); //Merge if the next is free Now, to be honest, I found it a bit surprising to find the multiset invariants being invalidated by an addition, but what do I know... Does this make any sense at all? Cheers Lars On Sun, Sep 7, 2014 at 11:03 PM, Lars Hagström <lars@foldspace.nu> wrote:
I managed to get something to go wrong in Debug mode too (no idea if its the same problem, though). An assertion triggered:
dots_configuration_check: /usr/include/boost/interprocess/mem_algo/rbtree_best_fit.hpp:1347: void boost::interprocess::rbtree_best_fit<MutexFamily, VoidMutex, MemAlignment>::priv_deallocate(void*) [with MutexFamily = boost::interprocess::mutex_family; VoidPointer = boost::interprocess::offset_ptr<void>; long unsigned int MemAlignment = 0ul]: Assertion `priv_is_allocated_block(block)' failed.
I've also got a rather lengthy call stack for you:
::deallocate (this=0x7ffff2065010, addr=0x7ffff20b4240) at /usr/include/boost/interprocess/segment_manager.hpp:225 #7 0x00007ffff74b80f5 in boost::interprocess::allocator<int, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >::deallocate (this=0x7ffff20b55f8,
::~vector_alloc_holder (this=0x7ffff20b55f8, __in_chrg=<optimized out>) at /usr/include/boost/container/vector.hpp:332 #9 0x00007ffff74b5d44 in boost::container::vector<int, boost::interprocess::allocator<int, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >::~vector (this=0x7ffff20b55f8, __in_chrg=<optimized out>) at /usr/include/boost/container/vector.hpp:790 #10 0x00007ffff74bbdde in Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm::~MemberMappingDescriptionShm (this=0x7ffff20b55f0, __in_chrg=<optimized out>) at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_shm_repository.h:341 #11 0x00007ffff74bbe38 in boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >::destroy (this=0x7fffffffdd10, ptr=...) at /usr/include/boost/interprocess/allocators/allocator.hpp:268 #12 0x00007ffff74b9f7c in boost::container::allocator_traits<boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > ::priv_destroy<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm> (a=..., p=0x7ffff20b55f0) at /usr/include/boost/container/allocator_traits.hpp:300 #13 0x00007ffff74b8212 in boost::container::allocator_traits<boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > ::destroy<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm> (a=..., p=0x7ffff20b55f0) at /usr/include/boost/container/allocator_traits.hpp:242 #14 0x00007ffff7555d13 in boost::container::container_detail::scoped_destructor_n<boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >::~scoped_destructor_n (this=0x7fffffffd4c0, __in_chrg=<optimized out>) at /usr/include/boost/container/detail/destroyers.hpp:207 #15 0x00007ffff754cd1e in boost::container::vector<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > ::priv_forward_range_insert_expand_backwards<boost::container::container_detail::insert_copy_proxy<boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >, Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm*> > (this=0x7fffffffdd10, new_start=0x7ffff20b5500, new_capacity=8,
#0 0x00007ffff5b14d67 in raise () from /usr/lib/libc.so.6 #1 0x00007ffff5b16118 in abort () from /usr/lib/libc.so.6 #2 0x00007ffff5b0dbdd in __assert_fail_base () from /usr/lib/libc.so.6 #3 0x00007ffff5b0dc92 in __assert_fail () from /usr/lib/libc.so.6 #4 0x00007ffff74bd246 in boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::priv_deallocate (this=0x7ffff2065010, addr=0x7ffff20b4240) at /usr/include/boost/interprocess/mem_algo/rbtree_best_fit.hpp:1347 #5 0x00007ffff74bbbf7 in boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::deallocate (this=0x7ffff2065010, addr=0x7ffff20b4240) at /usr/include/boost/interprocess/mem_algo/rbtree_best_fit.hpp:1336 #6 0x00007ffff74b9def in boost::interprocess::segment_manager_base<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul> ptr=...) at /usr/include/boost/interprocess/allocators/allocator.hpp:157 #8 0x00007ffff74b6e1a in boost::container::container_detail::vector_alloc_holder<boost::interprocess::allocator<int, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >, boost::container::container_detail::integral_constant<unsigned int, 2u> pos=0x7ffff20b5680, n=1, insert_range_proxy=...) at /usr/include/boost/container/vector.hpp:2697 #16 0x00007ffff754415d in boost::container::vector<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >
::priv_forward_range_insert_no_capacity<boost::container::container_detail::insert_copy_proxy<boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >, Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm*> > (this=0x7fffffffdd10, pos=..., n=1, insert_range_proxy=...) at /usr/include/boost/container/vector.hpp:2024 #17 0x00007ffff7540905 in boost::container::vector<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > ::priv_push_back<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm> (this=0x7fffffffdd10, u=...) at /usr/include/boost/container/vector.hpp:1885 #18 0x00007ffff753e2f9 in boost::container::vector<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > ::push_back<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm> (this=0x7fffffffdd10, u=...) at /usr/include/boost/container/vector.hpp:1424 #19 0x00007ffff753d19d in Safir::Dob::Typesystem::Internal::PropertyMappingDescriptionShm::AddMemberMapping (this=0x7fffffffdce0, mmShm=...) at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_shm_repository.h:445 #20 0x00007ffff753afbf in Safir::Dob::Typesystem::Internal::RepositoryShm::CreateShmCopyOfRepository (srcRepository=..., shmRepositoryName="DOTS_REPOSITORY", sharedMemory=...) at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_shm_repository.cpp:147 #21 0x00007ffff74b3325 in Safir::Dob::Typesystem::Internal::RepositoryKeeper::Create (this=0x7ffff77d2940 <Safir::Dob::Typesystem::Internal::RepositoryKeeper::Instance()::instance>) at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_repository_keeper.cpp:172 #22 0x00007ffff53cad4e in Safir::Utilities::StartupSynchronizerImpl::FirstStart (this=0x648860, synchronized=0x7ffff77d2940 <Safir::Dob::Typesystem::Internal::RepositoryKeeper::Instance()::instance>) at /home/lars/safir_sdk_core/src/lluf/lluf_startup_synchronizer.ss/src/StartupSynchronizer.cpp:181 #23 0x00007ffff53cab86 in Safir::Utilities::StartupSynchronizerImpl::Start (this=0x648860, synchronized=0x7ffff77d2940 <Safir::Dob::Typesystem::Internal::RepositoryKeeper::Instance()::instance>) at /home/lars/safir_sdk_core/src/lluf/lluf_startup_synchronizer.ss/src/StartupSynchronizer.cpp:154 #24 0x00007ffff53c7eca in Safir::Utilities::StartupSynchronizer::Start (this=0x7ffff77d2948 <Safir::Dob::Typesystem::Internal::RepositoryKeeper::Instance()::instance+8>, synchronized=0x7ffff77d2940 <Safir::Dob::Typesystem::Internal::RepositoryKeeper::Instance()::instance>) at /home/lars/safir_sdk_core/src/lluf/lluf_startup_synchronizer.ss/src/StartupSynchronizer.cpp:423 #25 0x00007ffff74b2c2b in Safir::Dob::Typesystem::Internal::RepositoryKeeper::Initialize (sharedMemorySize=10485760, paths=std::vector of length 1, capacity 1 = {...}) at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_repository_keeper.cpp:53 #26 0x00007ffff74d8deb in Safir::Dob::Typesystem::Internal::InitHelper::Init () at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_init_helper.h:60 #27 0x00007ffff74db5c3 in boost::call_once<void (*)()> (flag=..., f=0x7ffff74d8da1 <Safir::Dob::Typesystem::Internal::InitHelper::Init()>) at /usr/include/boost/thread/pthread/once_atomic.hpp:149 #28 0x00007ffff74d9362 in Safir::Dob::Typesystem::Internal::Init () at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_init_helper.h:106 #29 0x00007ffff74cd391 in DotsC_NumberOfTypeIds () at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_kernel.cpp:123 #30 0x0000000000419b5d in CheckConfigurationDotsKernel::SimpleCheck () at /home/lars/safir_sdk_core/src/dots/dots_configuration_check.ss/src/dots_configuration_check.cpp:108 #31 0x0000000000419b36 in CheckConfigurationDotsKernel::Run (cmd=...) at /home/lars/safir_sdk_core/src/dots/dots_configuration_check.ss/src/dots_configuration_check.cpp:99 #32 0x000000000041426a in main (argc=1, argv=0x7fffffffe6a8) at /home/lars/safir_sdk_core/src/dots/dots_configuration_check.ss/src/dots_configuration_check.cpp:235 (gdb)
Could this be the same issue?
/Lars
On Sun, Sep 7, 2014 at 7:38 PM, Lars Hagström <lars@foldspace.nu> wrote:
Yeah, I think that seems a likely explanation. I'm not sure that I'll be able to produce something minimal that exhibits the problem. But the product I'm working on is open source, and the problem occurs during the build process of the code, so depending on your environment it should be fairly easy to replicate.
But before we go down that path I'll have a look at it and see if I can find anything. Is there anything special that I should look at?
/Lars
On Sun, Sep 7, 2014 at 11:24 AM, Ion Gaztañaga <igaztanaga@gmail.com> wrote:
El 06/09/2014 22:09, Lars Hagström escribió:
Hi,
I've just upgraded to boost 1.56 and I've run into a problem. I get an infinite loop inside insert_equal_lower_bound_check(...) in bstree_algorithms.hpp. I'm using that file indirectly through Boost.Interprocess.
I've not been able to penetrate exactly what that function does or whether there is indeed a bug in it. But I did look at the version that was in 1.55 (called insert_equal_check_impl(...) there), and to me it looks like there is at least one unexpected change:
I think the bug might be earlier, it seems that tree invariants were somehow broken and effects appear later in this function.
Any chance to get a test case with the problem?
Best,
Ion
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/ mailman/listinfo.cgi/boost
El 08/09/2014 22:40, Lars Hagström escribió:
//Merge logic. First just update block sizes, then fix free blocks tree if(merge_with_prev || merge_with_next){ //Merge if the previous is free if(merge_with_prev){ m_header.m_imultiset.check(); //Get the previous block block_ctrl *prev_block = priv_prev_block(block); m_header.m_imultiset.check(); prev_block->m_size += block->m_size; * m_header.m_imultiset.check(); //this check fails!* BOOST_ASSERT(prev_block->m_size >= BlockCtrlUnits); m_header.m_imultiset.check();
Now, to be honest, I found it a bit surprising to find the multiset invariants being invalidated by an addition, but what do I know... Does this make any sense at all?
Ugh. This seems like a memory overwrite error, or the address to be deallocated is not really a correctly allocated block. To know if the address is correct we could iterate m_header.m_imultiset and check if "block" is in the container. Something like: auto itbeg(m_imultiset.begin()), itend(m_imultiset.end()); bool found = false; for(;itbeg != itend; ++ibeg){ if(&*itbeg == &block){ found = true; } } "block" always should be there, otherwise, a wrong address was passed. Do you have the stack trace when m_header.m_imultiset.check() fails? Best, Ion
El 09/09/2014 13:45, Ion Gaztañaga escribió:
"block" always should be there, otherwise, a wrong address was passed. Do you have the stack trace when m_header.m_imultiset.check() fails?
Sorry, this is incorrect. m_imultiset stores free memory blocks so "block" should not be there. On the other hand, "prev_block" is marked as a "free" block so it should be in m_imultiset. Ion
Ok, so what should I check for now? You kinda lost me. :-) I can produce stack traces for any point where check() fails, or wherever I can set a breakpoint or add code. /Lars On Tue, Sep 9, 2014 at 3:01 PM, Ion Gaztañaga <igaztanaga@gmail.com> wrote:
El 09/09/2014 13:45, Ion Gaztañaga escribió:
"block" always should be there, otherwise, a wrong address was passed. Do you have the stack trace when m_header.m_imultiset.check() fails?
Sorry, this is incorrect. m_imultiset stores free memory blocks so "block" should not be there. On the other hand, "prev_block" is marked as a "free" block so it should be in m_imultiset.
Ion
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/ mailman/listinfo.cgi/boost
El 10/09/2014 22:30, Lars Hagström escribió:
Ok, so what should I check for now? You kinda lost me. :-)
If merge_with_prev is true, check if prev_block is in the multiset, if merge_with_next is true, check if next_block is in the multiset. If an error happens then we have 3 possibilities: - "block" is not a correctly allocated memory block (bad pointer passed to priv_deallocate) - "block"->m_prev_size was corrupted by some memory overwrite error (then prev_block can't be reliable computed) - "block"->m_size was corrupted by some memory overwrite error (then prev_block can't be reliable computed) Ion
::check_subtree<boost::intrusive::detail::rbtree_node_checker<boost::intrusive::bhtraits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::block_ctrl, boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, true>, (boost::intrusive::link_mode_type)0, boost::intrusive::default_tag, 3u>, boost::intrusive::detail::key_nodeptr_comp<std::less<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::block_ctrl>, boost::intrusive::bhtraits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::block_ctrl, boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, true>, (boost::intrusive::link_mode_type)0, boost::intrusive::default_tag, 3u> >, boost::intrusive::detail::empty_node_checker<boost::intrusive::bhtraits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::block_ctrl, boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, true>, (boost::intrusive::link_mode_type)0, boost::intrusive::default_tag, 3u> > > > (node=..., checker=..., check_return=...) at /home/lars/boost/modular-boost/boost/intrusive/bstree_algorithms.hpp:2088 #7 0x00007ffff7469052 in boost::intrusive::bstree_algorithms<boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, true> ::check<boost::intrusive::detail::rbtree_node_checker<boost::intrusive::bhtraits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::block_ctrl, boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, true>, (boost::intrusive::link_mode_type)0, boost::intrusive::default_tag, 3u>, boost::intrusive::detail::key_nodeptr_comp<std::less<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::block_ctrl>, boost::intrusive::bhtraits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::block_ctrl, boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, true>, (boost::intrusive::link_mode_type)0, boost::intrusive::default_tag, 3u> >, boost::intrusive::detail::empty_node_checker<boost::intrusive::bhtraits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::block_ctrl, boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, true>, (boost::intrusive::link_mode_type)0, boost::intrusive::default_tag, 3u> > > > (header=..., checker=..., checker_return=...) at /home/lars/boost/modular-boost/boost/intrusive/bstree_algorithms.hpp:1504 #8 0x00007ffff746706d in boost::intrusive::bstree_impl<boost::intrusive::bhtraits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::block_ctrl, boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, true>, (boost::intrusive::link_mode_type)0, boost::intrusive::default_tag, 3u>, void, unsigned long, true, (boost::intrusive::algo_types)5, boost::intrusive::detail::default_header_holder<boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, true> > ::check<boost::intrusive::detail::empty_node_checker<boost::intrusive::bhtraits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::block_ctrl, boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, true>, (boost::intrusive::link_mode_type)0, boost::intrusive::default_tag, 3u> > > (this=0x7ffff2008038, extra_checker=...) at /home/lars/boost/modular-boost/boost/intrusive/bstree.hpp:1907 #9 0x00007ffff7464da8 in boost::intrusive::bstree_impl<boost::intrusive::bhtraits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::block_ctrl, boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, true>, (boost::intrusive::link_mode_type)0, boost::intrusive::default_tag, 3u>, void, unsigned long, true, (boost::intrusive::algo_types)5, boost::intrusive::detail::default_header_holder<boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, true> > >::check (this=0x7ffff2008038) at /home/lars/boost/modular-boost/boost/intrusive/bstree.hpp:1914 #10 0x00007ffff74623d0 in boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::priv_deallocate (this=0x7ffff2008010, addr=0x7ffff200a1c0) at /home/lars/boost/modular-boost/boost/interprocess/mem_algo/rbtree_best_fit.hpp:1411 #11 0x00007ffff745f805 in boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::deallocate (this=0x7ffff2008010, addr=0x7ffff200a1c0) at /home/lars/boost/modular-boost/boost/interprocess/mem_algo/rbtree_best_fit.hpp:1337 #12 0x00007ffff745d443 in boost::interprocess::segment_manager_base<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul> ::deallocate (this=0x7ffff2008010, addr=0x7ffff200a1c0) at /home/lars/boost/modular-boost/boost/interprocess/segment_manager.hpp:225 #13 0x00007ffff745d305 in boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >::deallocate (this=0x7ffff2009cb0,
I've added more debugging to rbtree_best_fit.hpp in a fork of interprocess at github.com, DonOregano/interprocess.git Direct link to my patched file https://github.com/DonOregano/interprocess/blob/aba6893976f5be62eed0763c3036... Anyway, among the additions are the checks that I think you wanted above, that shows that prev_block and next_block are always in the multiset, as per your email. I also added logs to every priv_allocate to check that the block that we're trying to deallocate has in fact been allocated (that it is not just some random block). I also print out m_prev_size and m_size, and they're not obviously corrupted by randomness, they contain 4s and 0s etc, not wierd numbers... That doesnt really prove anything, though... I also added a check to make sure that block is not in the multiset, which it is not. Just a couple of stupid questions: Are we certain that check() is correct? And should the invariants hold midway through priv_deallocate? Just so that I've not inserted checks that are not meant to hold in that place and that this thing is a red herring? Below is the output produced by my program, with the logs added, and even further down (sorry) is the stacktrace from the failed check() call. Allocated 0x7ffff20080f0 Allocated 0x7ffff2008200 Allocated 0x7ffff2008280 Allocated 0x7ffff20082c0 Allocated priv_expand_both_sides = 0x7ffff20082c0 Allocated 0x7ffff2008310 Allocated 0x7ffff2008390 Allocated 0x7ffff20083d0 Allocated 0x7ffff2008420 Allocated 0x7ffff20084c0 Allocated 0x7ffff2008540 Allocated 0x7ffff2008580 priv_deallocate addr: 0x7ffff20083d0 block in imultiset = false block->m_prev_size = 0 block->m_size = 5 priv_deallocate addr: 0x7ffff2008390 block in imultiset = false block->m_prev_size = 0 block->m_size = 4 merge_with_prev = false, merge_with_next = true next_block in imultiset = true priv_deallocate addr: 0x7ffff2008310 block in imultiset = false block->m_prev_size = 1 block->m_size = 8 merge_with_prev = false, merge_with_next = true next_block in imultiset = true priv_deallocate addr: 0x7ffff20082c0 block in imultiset = false block->m_prev_size = 0 block->m_size = 5 merge_with_prev = false, merge_with_next = true next_block in imultiset = true priv_deallocate addr: 0x7ffff2008280 block in imultiset = false block->m_prev_size = 0 block->m_size = 4 merge_with_prev = false, merge_with_next = true next_block in imultiset = true priv_deallocate addr: 0x7ffff2008200 block in imultiset = false block->m_prev_size = 0 block->m_size = 8 merge_with_prev = false, merge_with_next = true next_block in imultiset = true Allocated 0x7ffff2008200 Allocated 0x7ffff2008280 Allocated 0x7ffff20082d0 Allocated priv_expand_both_sides = 0x7ffff20082d0 Allocated priv_expand_both_sides = 0x7ffff20082d0 Allocated 0x7ffff2008360 Allocated 0x7ffff20085d0 Allocated 0x7ffff2008620 Allocated 0x7ffff2008690 Allocated 0x7ffff2008730 Allocated 0x7ffff20087b0 Allocated 0x7ffff2008800 priv_deallocate addr: 0x7ffff2008620 block in imultiset = false block->m_prev_size = 0 block->m_size = 7 priv_deallocate addr: 0x7ffff20085d0 block in imultiset = false block->m_prev_size = 0 block->m_size = 5 merge_with_prev = false, merge_with_next = true next_block in imultiset = true priv_deallocate addr: 0x7ffff2008360 block in imultiset = false block->m_prev_size = 8389754706664715122 block->m_size = 8 merge_with_prev = false, merge_with_next = true next_block in imultiset = true priv_deallocate addr: 0x7ffff20082d0 block in imultiset = false block->m_prev_size = 0 block->m_size = 9 merge_with_prev = false, merge_with_next = true next_block in imultiset = true priv_deallocate addr: 0x7ffff2008280 block in imultiset = false block->m_prev_size = 0 block->m_size = 5 merge_with_prev = false, merge_with_next = true next_block in imultiset = true priv_deallocate addr: 0x7ffff2008200 block in imultiset = false block->m_prev_size = 0 block->m_size = 8 merge_with_prev = false, merge_with_next = true next_block in imultiset = true Allocated 0x7ffff20085d0 Allocated 0x7ffff2008640 Allocated 0x7ffff2008200 priv_deallocate addr: 0x7ffff2008640 block in imultiset = false block->m_prev_size = 0 block->m_size = 5 Allocated 0x7ffff2008290 Allocated 0x7ffff2008300 Allocated 0x7ffff2008370 Allocated 0x7ffff2008870 Allocated 0x7ffff20088e0 priv_deallocate addr: 0x7ffff2008300 block in imultiset = false block->m_prev_size = 0 block->m_size = 7 priv_deallocate addr: 0x7ffff2008290 block in imultiset = false block->m_prev_size = 0 block->m_size = 7 merge_with_prev = false, merge_with_next = true next_block in imultiset = true priv_deallocate addr: 0x7ffff2008200 block in imultiset = false block->m_prev_size = 0 block->m_size = 9 merge_with_prev = false, merge_with_next = true next_block in imultiset = true priv_deallocate addr: 0x7ffff20085d0 block in imultiset = false block->m_prev_size = 0 block->m_size = 7 merge_with_prev = false, merge_with_next = true next_block in imultiset = true Allocated 0x7ffff20085d0 Allocated 0x7ffff2008650 Allocated 0x7ffff2008200 priv_deallocate addr: 0x7ffff2008650 block in imultiset = false block->m_prev_size = 0 block->m_size = 4 Allocated priv_expand_both_sides = 0x7ffff2008200 Allocated priv_expand_both_sides = 0x7ffff2008200 Allocated priv_expand_both_sides = 0x7ffff2008200 Allocated 0x7ffff2008950 priv_deallocate addr: 0x7ffff2008200 block in imultiset = false block->m_prev_size = 0 block->m_size = 23 Allocated 0x7ffff2008200 Allocated 0x7ffff2008c20 Allocated 0x7ffff2008280 Allocated 0x7ffff2008e30 Allocated 0x7ffff2008eb0 priv_deallocate addr: 0x7ffff2008c20 block in imultiset = false block->m_prev_size = 0 block->m_size = 33 priv_deallocate addr: 0x7ffff2008200 block in imultiset = false block->m_prev_size = 0 block->m_size = 8 priv_deallocate addr: 0x7ffff2008950 block in imultiset = false block->m_prev_size = 0 block->m_size = 45 merge_with_prev = false, merge_with_next = true next_block in imultiset = true priv_deallocate addr: 0x7ffff20085d0 block in imultiset = false block->m_prev_size = 0 block->m_size = 8 merge_with_prev = false, merge_with_next = true next_block in imultiset = true Allocated 0x7ffff2008200 Allocated 0x7ffff2008320 Allocated 0x7ffff20085d0 Allocated priv_expand_both_sides = 0x7ffff20085d0 Allocated 0x7ffff2008950 Allocated 0x7ffff2008620 Allocated 0x7ffff20089d0 Allocated 0x7ffff2008a20 Allocated 0x7ffff2008ac0 Allocated 0x7ffff2008b40 Allocated 0x7ffff2008b80 priv_deallocate addr: 0x7ffff20089d0 block in imultiset = false block->m_prev_size = 0 block->m_size = 5 priv_deallocate addr: 0x7ffff2008620 block in imultiset = false block->m_prev_size = 1 block->m_size = 4 merge_with_prev = false, merge_with_next = true next_block in imultiset = true priv_deallocate addr: 0x7ffff2008950 block in imultiset = false block->m_prev_size = 0 block->m_size = 8 merge_with_prev = false, merge_with_next = true next_block in imultiset = true priv_deallocate addr: 0x7ffff20085d0 block in imultiset = false block->m_prev_size = 0 block->m_size = 5 merge_with_prev = false, merge_with_next = true next_block in imultiset = true priv_deallocate addr: 0x7ffff2008320 block in imultiset = false block->m_prev_size = 0 block->m_size = 5 priv_deallocate addr: 0x7ffff2008200 block in imultiset = false block->m_prev_size = 0 block->m_size = 8 Allocated 0x7ffff2008200 Allocated 0x7ffff2008320 Allocated 0x7ffff20085d0 Allocated priv_expand_both_sides = 0x7ffff20085d0 Allocated priv_expand_both_sides = 0x7ffff20085d0 Allocated 0x7ffff2008950 Allocated 0x7ffff20089d0 Allocated 0x7ffff2008bd0 Allocated 0x7ffff2008c60 Allocated 0x7ffff2008d00 Allocated 0x7ffff2008d80 Allocated 0x7ffff20090c0 priv_deallocate addr: 0x7ffff2008bd0 block in imultiset = false block->m_prev_size = 0 block->m_size = 9 priv_deallocate addr: 0x7ffff20089d0 block in imultiset = false block->m_prev_size = 0 block->m_size = 5 priv_deallocate addr: 0x7ffff2008950 block in imultiset = false block->m_prev_size = 0 block->m_size = 8 merge_with_prev = false, merge_with_next = true next_block in imultiset = true priv_deallocate addr: 0x7ffff20085d0 block in imultiset = false block->m_prev_size = 0 block->m_size = 9 merge_with_prev = false, merge_with_next = true next_block in imultiset = true priv_deallocate addr: 0x7ffff2008320 block in imultiset = false block->m_prev_size = 0 block->m_size = 5 priv_deallocate addr: 0x7ffff2008200 block in imultiset = false block->m_prev_size = 0 block->m_size = 8 Allocated 0x7ffff2008dc0 Allocated 0x7ffff2008320 Allocated 0x7ffff2008bd0 priv_deallocate addr: 0x7ffff2008320 block in imultiset = false block->m_prev_size = 0 block->m_size = 5 Allocated 0x7ffff2008200 Allocated 0x7ffff20085d0 Allocated 0x7ffff2008950 Allocated 0x7ffff2009150 Allocated 0x7ffff20091c0 priv_deallocate addr: 0x7ffff20085d0 block in imultiset = false block->m_prev_size = 0 block->m_size = 9 merge_with_prev = false, merge_with_next = true next_block in imultiset = true priv_deallocate addr: 0x7ffff2008200 block in imultiset = false block->m_prev_size = 0 block->m_size = 8 priv_deallocate addr: 0x7ffff2008bd0 block in imultiset = false block->m_prev_size = 0 block->m_size = 9 priv_deallocate addr: 0x7ffff2008dc0 block in imultiset = false block->m_prev_size = 0 block->m_size = 7 Allocated 0x7ffff2008dc0 Allocated 0x7ffff20089f0 Allocated 0x7ffff2008320 priv_deallocate addr: 0x7ffff20089f0 block in imultiset = false block->m_prev_size = 0 block->m_size = 3 Allocated 0x7ffff2008bd0 priv_deallocate addr: 0x7ffff2008320 block in imultiset = false block->m_prev_size = 0 block->m_size = 5 Allocated 0x7ffff2008320 Allocated 0x7ffff2009250 priv_deallocate addr: 0x7ffff2008bd0 block in imultiset = false block->m_prev_size = 0 block->m_size = 9 Allocated priv_expand_both_sides = 0x7ffff2009250 Allocated 0x7ffff2008200 Allocated 0x7ffff2008240 Allocated priv_expand_both_sides = 0x7ffff2009250 Allocated 0x7ffff2008bd0 Allocated 0x7ffff2008c10 Allocated priv_expand_both_sides = 0x7ffff2009250 Allocated 0x7ffff20085d0 Allocated 0x7ffff2008610 Allocated 0x7ffff2009a60 Allocated 0x7ffff2009ad0 Allocated 0x7ffff2008650 Allocated 0x7ffff200a180 Allocated 0x7ffff200a1c0 Allocated 0x7ffff200a200 Allocated 0x7ffff200a240 Allocated 0x7ffff200a280 Allocated 0x7ffff200a2c0 Allocated 0x7ffff200a300 Allocated 0x7ffff200a3a0 Allocated 0x7ffff200a410 Allocated 0x7ffff200aac0 Allocated 0x7ffff200ab00 Allocated 0x7ffff200ab40 Allocated 0x7ffff200ab80 Allocated 0x7ffff200abc0 Allocated 0x7ffff200ac00 Allocated 0x7ffff200ac40 priv_deallocate addr: 0x7ffff2008650 block in imultiset = false block->m_prev_size = 0 block->m_size = 4 priv_deallocate addr: 0x7ffff200a180 block in imultiset = false block->m_prev_size = 0 block->m_size = 4 priv_deallocate addr: 0x7ffff200a1c0 block in imultiset = false block->m_prev_size = 4 block->m_size = 4 merge_with_prev = true, merge_with_next = false prev_block in imultiset = true Here we fail the check() call indicated in the source. Here is a backtrace from the failed check call: #0 0x00007ffff5ab7d67 in raise () from /usr/lib/libc.so.6 #1 0x00007ffff5ab9118 in abort () from /usr/lib/libc.so.6 #2 0x00007ffff5ab0bdd in __assert_fail_base () from /usr/lib/libc.so.6 #3 0x00007ffff5ab0c92 in __assert_fail () from /usr/lib/libc.so.6 #4 0x00007ffff746e985 in boost::intrusive::detail::bstree_node_checker<boost::intrusive::bhtraits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::block_ctrl, boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, true>, (boost::intrusive::link_mode_type)0, boost::intrusive::default_tag, 3u>, boost::intrusive::detail::key_nodeptr_comp<std::less<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::block_ctrl>, boost::intrusive::bhtraits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::block_ctrl, boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, true>, (boost::intrusive::link_mode_type)0, boost::intrusive::default_tag, 3u> >, boost::intrusive::detail::empty_node_checker<boost::intrusive::bhtraits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::block_ctrl, boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, true>, (boost::intrusive::link_mode_type)0, boost::intrusive::default_tag, 3u> > >::operator() (this=0x7fffffffd060, p=..., check_return_left=..., check_return_right=..., check_return=...) at /home/lars/boost/modular-boost/boost/intrusive/bstree_algorithms.hpp:78 #5 0x00007ffff746cf29 in boost::intrusive::detail::rbtree_node_checker<boost::intrusive::bhtraits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::block_ctrl, boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, true>, (boost::intrusive::link_mode_type)0, boost::intrusive::default_tag, 3u>, boost::intrusive::detail::key_nodeptr_comp<std::less<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::block_ctrl>, boost::intrusive::bhtraits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::block_ctrl, boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, true>, (boost::intrusive::link_mode_type)0, boost::intrusive::default_tag, 3u> >, boost::intrusive::detail::empty_node_checker<boost::intrusive::bhtraits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::block_ctrl, boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, true>, (boost::intrusive::link_mode_type)0, boost::intrusive::default_tag, 3u> > >::operator() (this=0x7fffffffd060, p=..., check_return_left=..., check_return_right=..., check_return=...) at /home/lars/boost/modular-boost/boost/intrusive/rbtree_algorithms.hpp:88 #6 0x00007ffff746b82b in boost::intrusive::bstree_algorithms<boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, true> ptr=...) at /home/lars/boost/modular-boost/boost/interprocess/allocators/allocator.hpp:157 #14 0x00007ffff745ae82 in boost::container::container_detail::basic_string_base<boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >::deallocate (this=0x7ffff2009cb0, p=..., n=56) at /home/lars/boost/modular-boost/boost/container/string.hpp:281 #15 0x00007ffff7459a1c in boost::container::container_detail::basic_string_base<boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >::deallocate_block (this=0x7ffff2009cb0) at /home/lars/boost/modular-boost/boost/container/string.hpp:327 #16 0x00007ffff745998d in boost::container::container_detail::basic_string_base<boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >::~basic_string_base (this=0x7ffff2009cb0, __in_chrg=<optimized out>) at /home/lars/boost/modular-boost/boost/container/string.hpp:106 #17 0x00007ffff7458cea in boost::container::basic_string<char, std::char_traits<char>, boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >::~basic_string (this=0x7ffff2009cb0, __in_chrg=<optimized out>) at /home/lars/boost/modular-boost/boost/container/string.hpp:708 #18 0x00007ffff745f8da in boost::interprocess::allocator<boost::container::basic_string<char, std::char_traits<char>, boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >::destroy (this=0x7fffffffd9e0, ptr=...) at /home/lars/boost/modular-boost/boost/interprocess/allocators/allocator.hpp:268 #19 0x00007ffff745d498 in boost::container::allocator_traits<boost::interprocess::allocator<boost::container::basic_string<char, std::char_traits<char>, boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >
::priv_destroy<boost::container::basic_string<char, std::char_traits<char>, boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > > > (a=..., p=0x7ffff2009cb0) at /home/lars/boost/modular-boost/boost/container/allocator_traits.hpp:300 #20 0x00007ffff745b0b4 in boost::container::allocator_traits<boost::interprocess::allocator<boost::container::basic_string<char, std::char_traits<char>, boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > ::destroy<boost::container::basic_string<char, std::char_traits<char>, boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > > > (a=..., p=0x7ffff2009cb0) at /home/lars/boost/modular-boost/boost/container/allocator_traits.hpp:242 #21 0x00007ffff7459c23 in boost::container::destroy_alloc_n<boost::interprocess::allocator<boost::container::basic_string<char, std::char_traits<char>, boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >, boost::container::basic_string<char, std::char_traits<char>, boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > *>(boost::interprocess::allocator<boost::container::basic_string<char, std::char_traits<char>, boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >&, boost::container::basic_string<char, std::char_traits<char>, boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >*, std::iterator_traits<boost::container::basic_string<char, std::char_traits<char>, boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >*>::difference_type, boost::container::container_detail::enable_if_c<!boost::has_trivial_destructor<std::iterator_traits<boost::container::basic_string<char, std::char_traits<char>, boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >*>::value_type>::value, void>::type*) (a=..., f=0x7ffff2009cd0, n=37) at /home/lars/boost/modular-boost/boost/container/detail/utilities.hpp:1073 #22 0x00007ffff7458d3c in boost::container::vector<boost::container::basic_string<char, std::char_traits<char>, boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >, boost::interprocess::allocator<boost::container::basic_string<char, std::char_traits<char>, boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >::~vector (this=0x7fffffffd9e0, __in_chrg=<optimized out>) at /home/lars/boost/modular-boost/boost/container/vector.hpp:787 #23 0x00007ffff746d82b in Safir::Dob::Typesystem::Internal::EnumDescriptionShm::~EnumDescriptionShm (this=0x7fffffffd998, __in_chrg=<optimized out>) at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_shm_repository.h:140 #24 0x00007ffff74e7a82 in std::pair<long const, Safir::Dob::Typesystem::Internal::EnumDescriptionShm>::~pair (this=0x7fffffffd990, __in_chrg=<optimized out>) at /usr/include/c++/4.9.1/bits/stl_pair.h:96 #25 0x00007ffff74e4565 in Safir::Dob::Typesystem::Internal::RepositoryShm::CreateShmCopyOfRepository (srcRepository=..., shmRepositoryName="DOTS_REPOSITORY", sharedMemory=...) at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_shm_repository.cpp:55 #26 0x00007ffff7456395 in Safir::Dob::Typesystem::Internal::RepositoryKeeper::Create (this=0x7ffff77d1cc0 <Safir::Dob::Typesystem::Internal::RepositoryKeeper::Instance()::instance>) at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_repository_keeper.cpp:172 #27 0x00007ffff536dd7e in Safir::Utilities::StartupSynchronizerImpl::FirstStart (this=0x648860, synchronized=0x7ffff77d1cc0 <Safir::Dob::Typesystem::Internal::RepositoryKeeper::Instance()::instance>) at /home/lars/safir_sdk_core/src/lluf/lluf_startup_synchronizer.ss/src/StartupSynchronizer.cpp:181 #28 0x00007ffff536dbb6 in Safir::Utilities::StartupSynchronizerImpl::Start (this=0x648860, synchronized=0x7ffff77d1cc0 <Safir::Dob::Typesystem::Internal::RepositoryKeeper::Instance()::instance>) at /home/lars/safir_sdk_core/src/lluf/lluf_startup_synchronizer.ss/src/StartupSynchronizer.cpp:154 #29 0x00007ffff536aefa in Safir::Utilities::StartupSynchronizer::Start (this=0x7ffff77d1cc8 <Safir::Dob::Typesystem::Internal::RepositoryKeeper::Instance()::instance+8>, synchronized=0x7ffff77d1cc0 <Safir::Dob::Typesystem::Internal::RepositoryKeeper::Instance()::instance>) at /home/lars/safir_sdk_core/src/lluf/lluf_startup_synchronizer.ss/src/StartupSynchronizer.cpp:423 #30 0x00007ffff7455c9b in Safir::Dob::Typesystem::Internal::RepositoryKeeper::Initialize (sharedMemorySize=10485760, paths=std::vector of length 1, capacity 1 = {...}) at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_repository_keeper.cpp:53 #31 0x00007ffff748330b in Safir::Dob::Typesystem::Internal::InitHelper::Init () at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_init_helper.h:60 #32 0x00007ffff7485ae3 in boost::call_once<void (*)()> (flag=..., f=0x7ffff74832c1 <Safir::Dob::Typesystem::Internal::InitHelper::Init()>) at /home/lars/boost/modular-boost/boost/thread/pthread/once_atomic.hpp:149 #33 0x00007ffff7483882 in Safir::Dob::Typesystem::Internal::Init () at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_init_helper.h:106 #34 0x00007ffff747794b in DotsC_NumberOfTypeIds () at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_kernel.cpp:123 #35 0x0000000000419b7d in CheckConfigurationDotsKernel::SimpleCheck () at /home/lars/safir_sdk_core/src/dots/dots_configuration_check.ss/src/dots_configuration_check.cpp:108 #36 0x0000000000419b56 in CheckConfigurationDotsKernel::Run (cmd=...) at /home/lars/safir_sdk_core/src/dots/dots_configuration_check.ss/src/dots_configuration_check.cpp:99 #37 0x000000000041428a in main (argc=1, argv=0x7fffffffe628) at /home/lars/safir_sdk_core/src/dots/dots_configuration_check.ss/src/dots_configuration_check.cpp:235 (gdb)
*ugh*. What can we do to make this debugging easier? It feels a bit inefficient... I could set up a VM on for example Digital Ocean and get everything up and running, and give you the password and some instructions? Unless you prefer to do it this way, of course... Cheers Lars
El 11/09/2014 22:56, Lars Hagström escribió:
I've added more debugging to rbtree_best_fit.hpp in a fork of interprocess at github.com, DonOregano/interprocess.git Direct link to my patched file https://github.com/DonOregano/interprocess/blob/aba6893976f5be62eed0763c3036...
Anyway, among the additions are the checks that I think you wanted above, that shows that prev_block and next_block are always in the multiset, as per your email.
I also added logs to every priv_allocate to check that the block that we're trying to deallocate has in fact been allocated (that it is not just some random block).
I also print out m_prev_size and m_size, and they're not obviously corrupted by randomness, they contain 4s and 0s etc, not wierd numbers... That doesnt really prove anything, though...
I also added a check to make sure that block is not in the multiset, which it is not.
Just a couple of stupid questions: Are we certain that check() is correct?
No. It's new code and it might have bugs.
And should the invariants hold midway through priv_deallocate? Just so that I've not inserted checks that are not meant to hold in that place and that this thing is a red herring?
I realized that once the size of a inserted block is modified tree invariants might be broken because imultiset is ordered by size. Tree invariants should be checked before the end of the function, after m_imultiset is fixed with erase+insert or replace, when tree invariants should have been restored. Maybe the code is confusing but the idea is to avoid removing (and rebalancing) the tree if it's not strictly needed. I guess code could be simplified to be more readable and maintainable (I've improved readability a bit in the last commits). Remove checks after size modification and add it at the end the function.
Below is the output produced by my program, with the logs added, and even further down (sorry) is the stacktrace from the failed check() call.
Thanks. Please remove the checks between size modification and the end of the function and try again.
*ugh*. What can we do to make this debugging easier? It feels a bit inefficient... I could set up a VM on for example Digital Ocean and get everything up and running, and give you the password and some instructions?
That would be quite efficient, yes ;-) Best, Ion
I realized that once the size of a inserted block is modified tree invariants might be broken because imultiset is ordered by size. Tree invariants should be checked before the end of the function, after m_imultiset is fixed with erase+insert or replace, when tree invariants should have been restored. Maybe the code is confusing but the idea is to avoid removing (and rebalancing) the tree if it's not strictly needed. I guess code could be simplified to be more readable and maintainable (I've improved readability a bit in the last commits). Remove checks after size modification and add it at the end the function.
Okay, I'm glad I asked, before we got further down that avenue... So, back to square one. Anyway, I've now just got checks at the beginning and end of priv_deallocate, and the checks do not fail. However, I did keep my logs in priv_check_and_allocate and priv_deallocate, and from my logs it looks like one block is deallocated twice. So my current theory is that there is something in the intrusive vector that causes a double deallocation. At the end of my email is the log and the call stack for this. I could set up a VM on for example Digital Ocean and get everything up and
running, and give you the password and some instructions?
That would be quite efficient, yes ;-)
::deallocate (this=0x7ffff205d010, addr=0x7ffff20ac240) at /home/lars/boost/modular-boost/boost/interprocess/segment_manager.hpp:225 #7 0x00007ffff74b0165 in boost::interprocess::allocator<int, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >::deallocate (this=0x7ffff20ad5f8,
::~vector_alloc_holder (this=0x7ffff20ad5f8, __in_chrg=<optimized out>) at /home/lars/boost/modular-boost/boost/container/vector.hpp:332 #9 0x00007ffff74addb4 in boost::container::vector<int, boost::interprocess::allocator<int, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >::~vector (this=0x7ffff20ad5f8, __in_chrg=<optimized out>) at /home/lars/boost/modular-boost/boost/container/vector.hpp:790 #10 0x00007ffff74b3f4c in Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm::~MemberMappingDescriptionShm (this=0x7ffff20ad5f0, __in_chrg=<optimized out>) at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_shm_repository.h:341 #11 0x00007ffff74b3fa6 in boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >::destroy (this=0x7fffffffdc90, ptr=...) at /home/lars/boost/modular-boost/boost/interprocess/allocators/allocator.hpp:268 #12 0x00007ffff74b2096 in boost::container::allocator_traits<boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > ::priv_destroy<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm> (a=..., p=0x7ffff20ad5f0) at /home/lars/boost/modular-boost/boost/container/allocator_traits.hpp:300 #13 0x00007ffff74b0282 in boost::container::allocator_traits<boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > ::destroy<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm> (a=..., p=0x7ffff20ad5f0) at /home/lars/boost/modular-boost/boost/container/allocator_traits.hpp:242 #14 0x00007ffff754ef75 in boost::container::container_detail::scoped_destructor_n<boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > >::~scoped_destructor_n (this=0x7fffffffd440, __in_chrg=<optimized out>) at /home/lars/boost/modular-boost/boost/container/detail/destroyers.hpp:207 #15 0x00007ffff7545f80 in boost::container::vector<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > ::priv_forward_range_insert_expand_backwards<boost::container::container_detail::insert_copy_proxy<boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >, Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm*> > (this=0x7fffffffdc90, new_start=0x7ffff20ad500, new_capacity=8,
Okay, we'll do that then. What is your preferred development environment? I was going to set up an Ubuntu box with boost from git. I can set up VNC with some GUI, or I could just leave you with the command line :-) I'd like to make this as easy as I can for you, since I do need the bug fixed :-) Here is the log from my test run. The assertion that fails is one that I added, which checks that block is not in m_imultiset at the start of priv_deallocate. If I remove that assert the BOOST_ASSERT(priv_is_allocated_block(block)); will fail. ... priv_deallocate: 0x7ffff20b17c0 Allocated priv_check_and_allocate = 0x7ffff20b18b0 Allocated priv_check_and_allocate = 0x7ffff20b17c0 Allocated priv_check_and_allocate = 0x7ffff20ac210 Allocated priv_check_and_allocate = *0x7ffff20ac240* Allocated priv_check_and_allocate = 0x7ffff20ad4c0 priv_deallocate: 0x7ffff20ac210 Allocated priv_check_and_allocate = 0x7ffff20ac210 Allocated priv_check_and_allocate = 0x7ffff20ad4f0 Allocated priv_check_and_allocate = 0x7ffff20ad560 Allocated priv_check_and_allocate = 0x7ffff20ad590 priv_deallocate: 0x7ffff20ad4c0 priv_deallocate: *0x7ffff20ac240* priv_deallocate: 0x7ffff20ac210 Allocated priv_check_and_allocate = 0x7ffff20ad4c0 Allocated priv_check_and_allocate = 0x7ffff20ad5c0 Allocated priv_check_and_allocate = 0x7ffff20ac210 Allocated priv_check_and_allocate = *0x7ffff20ac240* Allocated priv_check_and_allocate = 0x7ffff20ad690 priv_deallocate: 0x7ffff20ad560 priv_deallocate: 0x7ffff20ad590 priv_deallocate: 0x7ffff20ad4f0 priv_deallocate: 0x7ffff20ad4c0 Allocated priv_check_and_allocate = 0x7ffff20ad6c0 Allocated priv_check_and_allocate = 0x7ffff20ad6f0 priv_deallocate: 0x7ffff20ad6c0 Allocated priv_check_and_allocate = 0x7ffff20ad6c0 Allocated priv_expand_both_sides = 0x7ffff20ad500 Allocated priv_check_and_allocate = 0x7ffff20ad720 Allocated priv_check_and_allocate = 0x7ffff20ad4c0 Allocated priv_check_and_allocate = 0x7ffff20ac3f0 Allocated priv_check_and_allocate = 0x7ffff20ac420 priv_deallocate: *0x7ffff20ac240* priv_deallocate: *0x7ffff20ac240* dots_configuration_check: /home/lars/boost/modular-boost/boost/interprocess/mem_algo/rbtree_best_fit.hpp:1361: void boost::interprocess::rbtree_best_fit<MutexFamily, VoidMutex, MemAlignment>::priv_deallocate(void*) [with MutexFamily = boost::interprocess::mutex_family; VoidPointer = boost::interprocess::offset_ptr<void>; long unsigned int MemAlignment = 0ul]: Assertion `!found' failed. And here is the backtrace: (gdb) bt #0 0x00007ffff5b0cd67 in raise () from /usr/lib/libc.so.6 #1 0x00007ffff5b0e118 in abort () from /usr/lib/libc.so.6 #2 0x00007ffff5b05bdd in __assert_fail_base () from /usr/lib/libc.so.6 #3 0x00007ffff5b05c92 in __assert_fail () from /usr/lib/libc.so.6 #4 0x00007ffff74b549e in boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::priv_deallocate (this=0x7ffff205d010, addr=0x7ffff20ac240) at /home/lars/boost/modular-boost/boost/interprocess/mem_algo/rbtree_best_fit.hpp:1361 #5 0x00007ffff74b3d65 in boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>::deallocate (this=0x7ffff205d010, addr=0x7ffff20ac240) at /home/lars/boost/modular-boost/boost/interprocess/mem_algo/rbtree_best_fit.hpp:1337 #6 0x00007ffff74b1f09 in boost::interprocess::segment_manager_base<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul> ptr=...) at /home/lars/boost/modular-boost/boost/interprocess/allocators/allocator.hpp:157 #8 0x00007ffff74aee8a in boost::container::container_detail::vector_alloc_holder<boost::interprocess::allocator<int, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >, boost::container::container_detail::integral_constant<unsigned int, 2u> pos=0x7ffff20ad680, n=1, insert_range_proxy=...) at /home/lars/boost/modular-boost/boost/container/vector.hpp:2697 #16 0x00007ffff753d3bf in boost::container::vector<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >
::priv_forward_range_insert_no_capacity<boost::container::container_detail::insert_copy_proxy<boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> >, Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm*> > (this=0x7fffffffdc90, pos=..., n=1, insert_range_proxy=...) at /home/lars/boost/modular-boost/boost/container/vector.hpp:2024 #17 0x00007ffff7539b67 in boost::container::vector<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > ::priv_push_back<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm> (this=0x7fffffffdc90, u=...) at /home/lars/boost/modular-boost/boost/container/vector.hpp:1885 #18 0x00007ffff753755b in boost::container::vector<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::allocator<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index> > ::push_back<Safir::Dob::Typesystem::Internal::MemberMappingDescriptionShm> (this=0x7fffffffdc90, u=...) at /home/lars/boost/modular-boost/boost/container/vector.hpp:1424 #19 0x00007ffff75363ff in Safir::Dob::Typesystem::Internal::PropertyMappingDescriptionShm::AddMemberMapping (this=0x7fffffffdc60, mmShm=...) at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_shm_repository.h:445 #20 0x00007ffff7534221 in Safir::Dob::Typesystem::Internal::RepositoryShm::CreateShmCopyOfRepository (srcRepository=..., shmRepositoryName="DOTS_REPOSITORY", sharedMemory=...) at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_shm_repository.cpp:147 #21 0x00007ffff74ab395 in Safir::Dob::Typesystem::Internal::RepositoryKeeper::Create (this=0x7ffff77d2000 <Safir::Dob::Typesystem::Internal::RepositoryKeeper::Instance()::instance>) at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_repository_keeper.cpp:172 #22 0x00007ffff53c2d7e in Safir::Utilities::StartupSynchronizerImpl::FirstStart (this=0x648860, synchronized=0x7ffff77d2000 <Safir::Dob::Typesystem::Internal::RepositoryKeeper::Instance()::instance>) at /home/lars/safir_sdk_core/src/lluf/lluf_startup_synchronizer.ss/src/StartupSynchronizer.cpp:181 #23 0x00007ffff53c2bb6 in Safir::Utilities::StartupSynchronizerImpl::Start (this=0x648860, synchronized=0x7ffff77d2000 <Safir::Dob::Typesystem::Internal::RepositoryKeeper::Instance()::instance>) at /home/lars/safir_sdk_core/src/lluf/lluf_startup_synchronizer.ss/src/StartupSynchronizer.cpp:154 #24 0x00007ffff53bfefa in Safir::Utilities::StartupSynchronizer::Start (this=0x7ffff77d2008 <Safir::Dob::Typesystem::Internal::RepositoryKeeper::Instance()::instance+8>, synchronized=0x7ffff77d2000 <Safir::Dob::Typesystem::Internal::RepositoryKeeper::Instance()::instance>) at /home/lars/safir_sdk_core/src/lluf/lluf_startup_synchronizer.ss/src/StartupSynchronizer.cpp:423 #25 0x00007ffff74aac9b in Safir::Dob::Typesystem::Internal::RepositoryKeeper::Initialize (sharedMemorySize=10485760, paths=std::vector of length 1, capacity 1 = {...}) at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_repository_keeper.cpp:53 #26 0x00007ffff74d205f in Safir::Dob::Typesystem::Internal::InitHelper::Init () at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_init_helper.h:60 #27 0x00007ffff74d4837 in boost::call_once<void (*)()> (flag=..., f=0x7ffff74d2015 <Safir::Dob::Typesystem::Internal::InitHelper::Init()>) at /home/lars/boost/modular-boost/boost/thread/pthread/once_atomic.hpp:149 #28 0x00007ffff74d25d6 in Safir::Dob::Typesystem::Internal::Init () at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_init_helper.h:106 #29 0x00007ffff74c6605 in DotsC_NumberOfTypeIds () at /home/lars/safir_sdk_core/src/dots/dots_kernel.ss/src/dots_kernel.cpp:123 #30 0x0000000000419b7d in CheckConfigurationDotsKernel::SimpleCheck () at /home/lars/safir_sdk_core/src/dots/dots_configuration_check.ss/src/dots_configuration_check.cpp:108 #31 0x0000000000419b56 in CheckConfigurationDotsKernel::Run (cmd=...) at /home/lars/safir_sdk_core/src/dots/dots_configuration_check.ss/src/dots_configuration_check.cpp:99 #32 0x000000000041428a in main (argc=1, argv=0x7fffffffe628) at /home/lars/safir_sdk_core/src/dots/dots_configuration_check.ss/src/dots_configuration_check.cpp:235 (gdb)
I checked out scoped_destructor_n at #14, and m_n in there is in fact 2, which means that AllocTraits::destroy(...) will be called twice. /Lars
El 15/09/2014 15:29, Lars Hagström escribió:
Okay, I'm glad I asked, before we got further down that avenue... So, back to square one. Anyway, I've now just got checks at the beginning and end of priv_deallocate, and the checks do not fail. However, I did keep my logs in priv_check_and_allocate and priv_deallocate, and from my logs it looks like one block is deallocated twice. So my current theory is that there is something in the intrusive vector that causes a double deallocation. At the end of my email is the log and the call stack for this.
It seems that the code handling the backwards expansion of the buffer has a bug destroying an object twice. As a workaround, try to comment "expand_bwd" flags from allocator calls (Boost.Interprocess allocators support realloc-like buffer expansions where the new buffer can contain the old one). Example in "vector::priv_forward_range_insert_no_capacity": std::pair<pointer, bool> ret = (this->m_holder.allocation_command (allocate_new | expand_fwd | expand_bwd, this->m_holder.m_size + n, ...); Just leave "allocate_new | expand_fwd" (allocate new buffer or expand current one without moving the beginning). Backwards expansion is tested in Boost.Container but not the object construction/destruction count (I'll need to add this in my tests). If this workaround works for you, we'll delay the VM creation to see if I can see detect the problem improving Boost.Container tests. Best, Ion
Just leave "allocate_new | expand_fwd" (allocate new buffer or expand current one without moving the beginning). Backwards expansion is tested in Boost.Container but not the object construction/destruction count (I'll need to add this in my tests).
Yes! I've commented out the expand_bwd flags in container/vector.hpp and container/string.hpp, and it works beautifully! Let me know if there is anything else I can try out, to help you find the bug. /Lars
El 16/09/2014 9:37, Lars Hagström wrote:
Yes! I've commented out the expand_bwd flags in container/vector.hpp and container/string.hpp, and it works beautifully!
Let me know if there is anything else I can try out, to help you find the bug.
I think I have enough information now to guess what's happening, as the problem seems related to a single method. This problem should appear when the object count is properly tested. Thanks for your bug report and help. Best, Ion
El 16/09/2014 9:37, Lars Hagström escribió:
Yes! I've commented out the expand_bwd flags in container/vector.hpp and container/string.hpp, and it works beautifully!
Let me know if there is anything else I can try out, to help you find the bug.
Can you try current develop code? I've found an error in backwards insertion code where too many destructors where called, and that might related to your bug. Best, Ion
I got the develop branches of interprocess, intrusive, container and move. Apart from that I ran 1.56 code. I still got the same assertion. So then I got develop on everything, and the error still seems to be there, assertion in priv_deallocate. :-( /Lars On Sat, Sep 20, 2014 at 5:31 PM, Ion Gaztañaga <igaztanaga@gmail.com> wrote:
El 16/09/2014 9:37, Lars Hagström escribió:
Yes! I've commented out the expand_bwd flags in container/vector.hpp and
container/string.hpp, and it works beautifully!
Let me know if there is anything else I can try out, to help you find the bug.
Can you try current develop code? I've found an error in backwards insertion code where too many destructors where called, and that might related to your bug.
Best,
Ion
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/ mailman/listinfo.cgi/boost
El 22/09/2014 21:35, Lars Hagström escribió:
I got the develop branches of interprocess, intrusive, container and move. Apart from that I ran 1.56 code. I still got the same assertion. So then I got develop on everything, and the error still seems to be there, assertion in priv_deallocate.
:-(
Then I've run out of ideas ;-) Ion
Ok, I'll set up the VM we talked about in the next few days, and hopefully that can give you something more to go on. /Lars On Mon, Sep 22, 2014 at 9:57 PM, Ion Gaztañaga <igaztanaga@gmail.com> wrote:
El 22/09/2014 21:35, Lars Hagström escribió:
I got the develop branches of interprocess, intrusive, container and move. Apart from that I ran 1.56 code. I still got the same assertion. So then I got develop on everything, and the error still seems to be there, assertion in priv_deallocate.
:-(
Then I've run out of ideas ;-)
Ion
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/ mailman/listinfo.cgi/boost
El 22/09/2014 22:01, Lars Hagström escribió:
Ok, I'll set up the VM we talked about in the next few days, and hopefully that can give you something more to go on.
Lars, I think I've found the problem. In boost/container/detail/destroyers.hpp: ~scoped_destructor_n() { if(!m_p) return; value_type *raw_ptr = container_detail::to_raw_pointer(m_p); while(m_n--){ AllocTraits::destroy(m_a, raw_ptr); <<<<< HERE!!! } } A pointer increment is missing, it should be: AllocTraits::destroy(m_a, raw_ptr++); <<<<< NOTE "raw_ptr++" Ion
Just to let any followers of this thread know of the off-list developments: This fix appears to work for me. And the bug has been present since 1.53. /Lars On Tue, Sep 23, 2014 at 2:42 PM, Ion Gaztañaga <igaztanaga@gmail.com> wrote:
El 22/09/2014 22:01, Lars Hagström escribió:
Ok, I'll set up the VM we talked about in the next few days, and hopefully that can give you something more to go on.
Lars, I think I've found the problem. In boost/container/detail/ destroyers.hpp:
~scoped_destructor_n() { if(!m_p) return; value_type *raw_ptr = container_detail::to_raw_pointer(m_p); while(m_n--){ AllocTraits::destroy(m_a, raw_ptr); <<<<< HERE!!! } }
A pointer increment is missing, it should be:
AllocTraits::destroy(m_a, raw_ptr++); <<<<< NOTE "raw_ptr++"
Ion
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/ mailman/listinfo.cgi/boost
participants (2)
-
Ion Gaztañaga
-
Lars Hagström