[Boost-bugs] [Boost C++ Libraries] #5523: Crash with singleton_pool in multithreaded mode

Subject: [Boost-bugs] [Boost C++ Libraries] #5523: Crash with singleton_pool in multithreaded mode
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-05-06 03:07:52


#5523: Crash with singleton_pool in multithreaded mode
----------------------------------+-----------------------------------------
 Reporter: philippeb8@… | Owner: cnewbold
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: pool
  Version: Boost 1.46.1 | Severity: Showstopper
 Keywords: |
----------------------------------+-----------------------------------------
 Hi,

 I am making calls to singleton_pool::ordered_malloc() with 2 different
 threads and the application is crashing. The code can be found here:
 https://svn.boost.org/svn/boost/sandbox/block_ptr/libs/smart_ptr/example/thread_test.cpp

 And I get the following backtrace:

 #0 0x0000000000407766 in boost::simple_segregated_storage<unsigned
 long>::try_malloc_n (start=@0x40a30dd0, n=10, partition_size=8)
     at
 /home/vnmr1/phil/boost_1_46_1/boost/pool/simple_segregated_storage.hpp:236
 #1 0x000000000040781b in boost::simple_segregated_storage<unsigned
 long>::malloc_n (this=0x614ae8, n=11, partition_size=8)
     at
 /home/vnmr1/phil/boost_1_46_1/boost/pool/simple_segregated_storage.hpp:260
 #2 0x000000000040af4f in
 boost::pool<boost::default_user_allocator_new_delete>::ordered_malloc
 (this=0x614ae8, n=88)
     at /home/vnmr1/phil/boost_1_46_1/boost/pool/pool.hpp:527
 #3 0x000000000040b392 in boost::singleton_pool<boost::detail::sh::pool,
 1u, boost::default_user_allocator_new_delete,
 boost::details::pool::pthread_mutex, 32u, 0u>::ordered_malloc (n=88)
     at /home/vnmr1/phil/boost_1_46_1/boost/pool/singleton_pool.hpp:72
 #4 0x000000000040d7ce in boost::detail::sh::pool::allocate
 (this=0x6148d0,
     s=88) at ../../../boost/detail/block_base.hpp:130
 #5 0x000000000040d83a in boost::detail::sh::block<std::pair<int, int>
>::operator new (s=88) at ../../../boost/detail/block_base.hpp:271
 #6 0x000000000040d85d in boost::detail::sh::make_block<std::pair<int,
 int>, std::pair<int, int> > (t0=@0x40a31030) at
 ../../../boost/block_ptr.hpp:480
 #7 0x0000000000405e97 in worker (id=0) at thread_test.cpp:17
 #8 0x0000000000408a20 in boost::_bi::list1<boost::_bi::value<int>
>::operator()<void (*)(int), boost::_bi::list0> (this=0x1a0cf5b0,
 f=@0x1a0cf5a8,
     a=@0x40a310cf) at
 /home/vnmr1/phil/boost_1_46_1/boost/bind/bind.hpp:253
 #9 0x0000000000408a5e in boost::_bi::bind_t<void, void (*)(int),
 boost::_bi::list1<boost::_bi::value<int> > >::operator() (this=0x1a0cf5a8)
     at /home/vnmr1/phil/boost_1_46_1/boost/bind/bind_template.hpp:20
 #10 0x0000000000408a7c in
 boost::detail::thread_data<boost::_bi::bind_t<void, void (*)(int),
 boost::_bi::list1<boost::_bi::value<int> > > >::run (
     this=0x1a0cf420)
     at /home/vnmr1/phil/boost_1_46_1/boost/thread/detail/thread.hpp:61
 #11 0x00002b93700f9914 in thread_proxy ()
    from /home/vnmr1/phil/lib/libboost_thread.so.1.46.1
 #12 0x0000003906a06367 in start_thread () from /lib64/libpthread.so.0
 #13 0x0000003905ed30ad in clone () from /lib64/libc.so.6



 Thanks,
 -Phil

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5523>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:06 UTC