Re: [Boost-bugs] [Boost C++ Libraries] #3448: interprocess_condition (emulated) can exit with inconsistent m_num_waiters value

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3448: interprocess_condition (emulated) can exit with inconsistent m_num_waiters value
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-10-13 01:29:38


#3448: interprocess_condition (emulated) can exit with inconsistent m_num_waiters
value
--------------------------------------------------------------+-------------
 Reporter: Zachariah L Young <zachariah.l.young@…> | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: Boost 1.41.0 | Component: interprocess
  Version: Boost 1.40.0 | Severity: Problem
 Keywords: interprocess_condition |
--------------------------------------------------------------+-------------
Changes (by anonymous):

  * version: Boost 1.39.0 => Boost 1.40.0

Comment:

 Confirmed to still exist in Boost 1.40.
 My test case: 5 threads timed_send'ing ~1024 byte messages into a
 message_queue with que_size == 1 and msg_size == 1024. Each thread is
 setup to send every 100 ms, with a 100 ms timeout.

 Windows XP, 4 core processor, ~4Gb RAM

 The threads all lock within 60 seconds of startup.

 Based on the description above, I added this at line 174 of
 boost/interprocess/sync/emulation/interprocess_condition.hpp:
 {{{
 detail::atomic_dec32(const_cast<boost::uint32_t*>(&m_num_waiters));
 }}}

 It solved the problem.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3448#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:50:01 UTC