Re: [Boost-bugs] [Boost C++ Libraries] #1951: boost::interprocess::named_condition::do_wait() releases mutex prematurely, may miss notification

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1951: boost::interprocess::named_condition::do_wait() releases mutex prematurely, may miss notification
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-05-27 01:56:51


#1951: boost::interprocess::named_condition::do_wait() releases mutex prematurely,
may miss notification
-----------------------------------------------+----------------------------
  Reporter: Stas Maximov <smaximov_at_[hidden]> | Owner: igaztanaga
      Type: Bugs | Status: new
 Milestone: Boost 1.36.0 | Component: interprocess
   Version: Boost 1.35.0 | Severity: Showstopper
Resolution: | Keywords: named_condition_variable interprocess sync mutex condition_variable
-----------------------------------------------+----------------------------
Comment (by Stas Maximov <smaximov_at_[hidden]>):

 Update on the bug report.

 Hang in regression test named_condition_test has been tracked down to a
 missed notification due to release of external mutex before internal mutex
 has been acquired.

 Attached patch fixes the problem by acquiring internal mutex before
 releasing the external one. This eliminates potential race with a notifier
 and thus avoids missed notifications.

 As before, release of internal mutex is done prior to re-acquisition of
 external mutex. This is to avoid deadlock with another waiter on the same
 condition variable. Exception safety has been preserved.

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1951#comment:1>
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:49:57 UTC