Re: [Boost-bugs] [Boost C++ Libraries] #2944: boost::archive::xml_iarchive hangs, if BOOST_SP_USE_PTHREADS used

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2944: boost::archive::xml_iarchive hangs, if BOOST_SP_USE_PTHREADS used
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-04-14 21:03:52


#2944: boost::archive::xml_iarchive hangs, if BOOST_SP_USE_PTHREADS used
------------------------------------+---------------------------------------
  Reporter: highcatland_at_[hidden] | Owner: no-maintainer
      Type: Bugs | Status: new
 Milestone: Boost 1.39.0 | Component: serialization
   Version: Boost 1.38.0 | Severity: Problem
Resolution: | Keywords: shared_ptr serialization xml_iarchive
------------------------------------+---------------------------------------

Comment(by highcatland_at_[hidden]):

 I investigated boost sources a bit, and the issue seems weird for me.

 1. As I guess, xml_grammar.cpp has no relations with any smart pointers
 and synchronization.
 [[BR]]2. The hang happens in boost/detail/sp_counted_base_pt.hpp source
 code, when trying to acquire pthread's mutex lock. I've traced the calls
 of sp_counted_base class. The only member function was called is
 sp_counted_base::release(). Constructor of sp_counted_base wasn't called
 at all! So, the 'm_' pthread mutex wasn't initialized, which caused the
 hang.

 How release() member function was called, while the only constructor
 wasn't? (Some sort of control flow corruption?)

 When I removed mutex locking from the release() method - during the test
 release() repeated several times, and then program continues correctly.



 And again, this reproduced for me only at x86_64 and ARM platforms.
 [[BR]]On x32 - all is ok. I've traced the sp_counted_base, and none of
 it's methods was called.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2944#comment:3>
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:00 UTC