Re: [Boost-bugs] [Boost C++ Libraries] #5847: sp_counted_base_pt.hpp: appears to suffer a race conditions

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5847: sp_counted_base_pt.hpp: appears to suffer a race conditions
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-08-31 04:30:02


#5847: sp_counted_base_pt.hpp: appears to suffer a race conditions
--------------------------------------------------+-------------------------
  Reporter: Jeffrey Walton <noloader@…> | Owner: pdimov
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: smart_ptr
   Version: Boost 1.47.0 | Severity: Problem
Resolution: invalid | Keywords:
--------------------------------------------------+-------------------------

Comment (by Jeffrey Walton <noloader@…>):

 {{{
 jeffrey$ g++ -g -O2 -D_REENTRANT=1 sp-test.cpp -o sp-test.exe -lpthread
 jeffrey$ valgrind --tool=helgrind ./sp-test.exe ==19611== Helgrind, a
 thread error detector
 ==19611== Copyright (C) 2007-2010, and GNU GPL'd, by OpenWorks LLP et al.
 ==19611== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright
 info
 ==19611== Command: ./sp-test.exe
 ==19611==
 ==19611== Thread #3 was created
 ==19611== at 0x58E16CE: clone (clone.S:77)
 ==19611== by 0x4E37172: pthread_create@@GLIBC_2.2.5 (createthread.c:75)
 ==19611== by 0x4C2CA4A: pthread_create_WRK (hg_intercepts.c:257)
 ==19611== by 0x4C2CB5E: pthread_create@* (hg_intercepts.c:288)
 ==19611== by 0x401669: main (sp-test.cpp:64)
 ==19611==
 ==19611== Thread #2 was created
 ==19611== at 0x58E16CE: clone (clone.S:77)
 ==19611== by 0x4E37172: pthread_create@@GLIBC_2.2.5 (createthread.c:75)
 ==19611== by 0x4C2CA4A: pthread_create_WRK (hg_intercepts.c:257)
 ==19611== by 0x4C2CB5E: pthread_create@* (hg_intercepts.c:288)
 ==19611== by 0x401669: main (sp-test.cpp:64)
 ==19611==
 ==19611== Possible data race during read of size 8 at 0x603848 by thread
 #3
 ==19611== at 0x401500: WorkerThreadProc(void*) (shared_count.hpp:223)
 ==19611== by 0x4C2CBE7: mythread_wrapper (hg_intercepts.c:221)
 ==19611== by 0x4E369C9: start_thread (pthread_create.c:300)
 ==19611== by 0x58E170C: clone (clone.S:112)
 ==19611== This conflicts with a previous write of size 8 by thread #2
 ==19611== at 0x40152C: WorkerThreadProc(void*) (shared_count.hpp:263)
 ==19611== by 0x4C2CBE7: mythread_wrapper (hg_intercepts.c:221)
 ==19611== by 0x4E369C9: start_thread (pthread_create.c:300)
 ==19611== by 0x58E170C: clone (clone.S:112)
 ==19611==
 ==19611== Possible data race during read of size 8 at 0x603840 by thread
 #3
 ==19611== at 0x401507: WorkerThreadProc(void*) (shared_ptr.hpp:169)
 ==19611== by 0x4C2CBE7: mythread_wrapper (hg_intercepts.c:221)
 ==19611== by 0x4E369C9: start_thread (pthread_create.c:300)
 ==19611== by 0x58E170C: clone (clone.S:112)
 ==19611== This conflicts with a previous write of size 8 by thread #2
 ==19611== at 0x401525: WorkerThreadProc(void*) (move.h:83)
 ==19611== by 0x4C2CBE7: mythread_wrapper (hg_intercepts.c:221)
 ==19611== by 0x4E369C9: start_thread (pthread_create.c:300)
 ==19611== by 0x58E170C: clone (clone.S:112)
 ==19611==
 ==19611== Possible data race during read of size 8 at 0x603618 by thread
 #3
 ==19611== at 0x40151E: WorkerThreadProc(void*) (shared_count.hpp:262)
 ==19611== by 0x4C2CBE7: mythread_wrapper (hg_intercepts.c:221)
 ==19611== by 0x4E369C9: start_thread (pthread_create.c:300)
 ==19611== by 0x58E170C: clone (clone.S:112)
 ==19611== This conflicts with a previous write of size 8 by thread #2
 ==19611== at 0x40152C: WorkerThreadProc(void*) (shared_count.hpp:263)
 ==19611== by 0x4C2CBE7: mythread_wrapper (hg_intercepts.c:221)
 ==19611== by 0x4E369C9: start_thread (pthread_create.c:300)
 ==19611== by 0x58E170C: clone (clone.S:112)
 ==19611==
 ==19611== Possible data race during write of size 8 at 0x603610 by thread
 #3
 ==19611== at 0x401525: WorkerThreadProc(void*) (move.h:83)
 ==19611== by 0x4C2CBE7: mythread_wrapper (hg_intercepts.c:221)
 ==19611== by 0x4E369C9: start_thread (pthread_create.c:300)
 ==19611== by 0x58E170C: clone (clone.S:112)
 ==19611== This conflicts with a previous write of size 8 by thread #2
 ==19611== at 0x401525: WorkerThreadProc(void*) (move.h:83)
 ==19611== by 0x4C2CBE7: mythread_wrapper (hg_intercepts.c:221)
 ==19611== by 0x4E369C9: start_thread (pthread_create.c:300)
 ==19611== by 0x58E170C: clone (clone.S:112)
 ==19611==
 ==19611== Possible data race during write of size 8 at 0x603618 by thread
 #3
 ==19611== at 0x40152C: WorkerThreadProc(void*) (shared_count.hpp:263)
 ==19611== by 0x4C2CBE7: mythread_wrapper (hg_intercepts.c:221)
 ==19611== by 0x4E369C9: start_thread (pthread_create.c:300)
 ==19611== by 0x58E170C: clone (clone.S:112)
 ==19611== This conflicts with a previous write of size 8 by thread #2
 ==19611== at 0x40152C: WorkerThreadProc(void*) (shared_count.hpp:263)
 ==19611== by 0x4C2CBE7: mythread_wrapper (hg_intercepts.c:221)
 ==19611== by 0x4E369C9: start_thread (pthread_create.c:300)
 ==19611== by 0x58E170C: clone (clone.S:112)
 ==19611==
 ==19611==
 ==19611== For counts of detected and suppressed errors, rerun with: -v
 ==19611== Use --history-level=approx or =none to gain increased speed, at
 ==19611== the cost of reduced accuracy of conflicting-access information
 ==19611== ERROR SUMMARY: 56968 errors from 5 contexts (suppressed: 8509
 from 13)
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5847#comment:2>
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:07 UTC