Re: [Boost-bugs] [Boost C++ Libraries] #3526: Data races in boost::thread detected by drd/helgrind

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3526: Data races in boost::thread detected by drd/helgrind
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-06-05 11:38:33


#3526: Data races in boost::thread detected by drd/helgrind
--------------------------------------+-------------------------------------
  Reporter: m.strashun@… | Owner: anthonyw
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: thread
   Version: Boost Development Trunk | Severity: Regression
Resolution: invalid | Keywords: valgrind,drd,threading
--------------------------------------+-------------------------------------
Changes (by bvanassche@…):

  * status: new => closed
  * resolution: => invalid
  * severity: Problem => Regression

Comment:

 The reason DRD printed the above report is as follows:
 * boost::detail::get_current_thread_data() and
 boost::detail::set_current_thread_data() both invoke
 boost::call_once(current_thread_tls_init_flag,create_current_thread_tls_key)
 and next use current_thread_tls_key.
 * The first call of boost::call_once() invokes
 create_current_thread_tls_key() and hence sets current_thread_tls_key.
 This last function is invoked without holding the mutex
 detail::once_epoch_mutex.
 * The second and subsequent invocations of boost::call_once() neither lock
 detail::once_epoch_mutex nor trigger a call to
 create_current_thread_tls_key().

 Or: although every read of current_thread_tls_key happens after its
 initialization, this ordering is invisible to data race detection tools.
 That's why DRD complains about it. A suppression pattern for this access
 pattern will be added in Valgrind 3.6.0.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3526#comment:8>
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:03 UTC