Opened 8 years ago

Last modified 8 years ago

#11091 assigned Bugs

notify_all_at_thread_exit - ThreadSanitizer: data race

Reported by: viboes Owned by: viboes
Milestone: To Be Determined Component: thread
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc:

Description

Test output: BenPope x86_64 Ubuntu - thread - notify_all_at_thread_exit_p / clang-linux-3.6~tsan~c14_libc++
Rev 9b68e2eec037cbcb6f96d7d54079e7e1a6a274ab / Mon, 09 Mar 2015 11:14:53 +0000
Compile [2015-03-09 15:31:08 UTC]: succeed


"clang++-3.6" -c -x c++ -Wextra -Wno-long-long -Wno-unused-parameter -Wunused-function -std=c++1y -stdlib=libc++ -fsanitize=thread -O0 -fno-inline -Wall -pthread -fPIC -Wextra -Wno-long-long -Wno-unused-parameter -Wunused-function -DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_DYN_LINK=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_THREAD_POSIX -DBOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED -DBOOST_THREAD_USE_DLL=1 -I".." -o "/home/ben/development/boost/test/build/develop/results/boost/bin.v2/libs/thread/test/notify_all_at_thread_exit_p.test/clang-linux-3.6~tsan~c14_libc++/debug/debug-symbols-off/threading-multi/sync/conditions/notify_all_at_thread_exit_pass.o" "../libs/thread/test/sync/conditions/notify_all_at_thread_exit_pass.cpp"

            

Link [2015-03-09 15:31:08 UTC]: succeed


"clang++-3.6"  -Wl,-R -Wl,"/home/ben/development/boost/test/build/develop/results/boost/bin.v2/libs/chrono/build/clang-linux-3.6~tsan~c14_libc++/debug/debug-symbols-off/threading-multi" -Wl,-R -Wl,"/home/ben/development/boost/test/build/develop/results/boost/bin.v2/libs/system/build/clang-linux-3.6~tsan~c14_libc++/debug/debug-symbols-off/threading-multi" -Wl,-R -Wl,"/home/ben/development/boost/test/build/develop/results/boost/bin.v2/libs/thread/build/clang-linux-3.6~tsan~c14_libc++/debug/debug-symbols-off/threading-multi" -Wl,-rpath-link -Wl,"/home/ben/development/boost/test/build/develop/results/boost/bin.v2/libs/chrono/build/clang-linux-3.6~tsan~c14_libc++/debug/debug-symbols-off/threading-multi" -Wl,-rpath-link -Wl,"/home/ben/development/boost/test/build/develop/results/boost/bin.v2/libs/system/build/clang-linux-3.6~tsan~c14_libc++/debug/debug-symbols-off/threading-multi" -Wl,-rpath-link -Wl,"/home/ben/development/boost/test/build/develop/results/boost/bin.v2/libs/thread/build/clang-linux-3.6~tsan~c14_libc++/debug/debug-symbols-off/threading-multi" -o "/home/ben/development/boost/test/build/develop/results/boost/bin.v2/libs/thread/test/notify_all_at_thread_exit_p.test/clang-linux-3.6~tsan~c14_libc++/debug/debug-symbols-off/threading-multi/notify_all_at_thread_exit_p" -Wl,--start-group "/home/ben/development/boost/test/build/develop/results/boost/bin.v2/libs/thread/test/notify_all_at_thread_exit_p.test/clang-linux-3.6~tsan~c14_libc++/debug/debug-symbols-off/threading-multi/sync/conditions/notify_all_at_thread_exit_pass.o" "/home/ben/development/boost/test/build/develop/results/boost/bin.v2/libs/thread/test/notify_all_at_thread_exit_p.test/clang-linux-3.6~tsan~c14_libc++/debug/debug-symbols-off/threading-multi/winrt_init.o" "/home/ben/development/boost/test/build/develop/results/boost/bin.v2/libs/thread/build/clang-linux-3.6~tsan~c14_libc++/debug/debug-symbols-off/threading-multi/libboost_thread.so.1.58.0" "/home/ben/development/boost/test/build/develop/results/boost/bin.v2/libs/chrono/build/clang-linux-3.6~tsan~c14_libc++/debug/debug-symbols-off/threading-multi/libboost_chrono.so.1.58.0" "/home/ben/development/boost/test/build/develop/results/boost/bin.v2/libs/system/build/clang-linux-3.6~tsan~c14_libc++/debug/debug-symbols-off/threading-multi/libboost_system.so.1.58.0"  -Wl,-Bstatic  -Wl,-Bdynamic -lrt -Wl,--end-group -fsanitize=thread -lc++ -lc++abi -pthread 

RmTemps /home/ben/development/boost/test/build/develop/results/boost/bin.v2/libs/thread/test/notify_all_at_thread_exit_p.test/clang-linux-3.6~tsan~c14_libc++/debug/debug-symbols-off/threading-multi/notify_all_at_thread_exit_p

    rm -f "/home/ben/development/boost/test/build/develop/results/boost/bin.v2/libs/thread/test/notify_all_at_thread_exit_p.test/clang-linux-3.6~tsan~c14_libc++/debug/debug-symbols-off/threading-multi/sync/conditions/notify_all_at_thread_exit_pass.o" "/home/ben/development/boost/test/build/develop/results/boost/bin.v2/libs/thread/test/notify_all_at_thread_exit_p.test/clang-linux-3.6~tsan~c14_libc++/debug/debug-symbols-off/threading-multi/winrt_init.o"

            

Run [2015-03-09 15:31:08 UTC]: fail


==================
WARNING: ThreadSanitizer: data race (pid=14082)
  Write of size 8 at 0x7fd7f9795c48 by thread T1:
    #0 boost::(anonymous namespace)::thread_proxy(void*) <null> (libboost_thread.so.1.58.0+0x00000002567a)

  Previous write of size 8 at 0x7fd7f9795c48 by main thread:
    #0 <null> <null> (0x000000000001)

  Location is stack of thread T1.

  Thread T1 (tid=14087, running) created by main thread at:
    #0 pthread_create /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:896:3 (notify_all_at_thread_exit_p+0x00000045e361)
    #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.58.0+0x0000000255b0)
    #2 boost::thread::start_thread() <null> (notify_all_at_thread_exit_p+0x0000004c3ba3)
    #3 boost::thread::thread<void (&)()>(void (&)()) <null> (notify_all_at_thread_exit_p+0x0000004c2f8b)
    #4 main <null> (notify_all_at_thread_exit_p+0x0000004c0903)

SUMMARY: ThreadSanitizer: data race ??:0 boost::(anonymous namespace)::thread_proxy(void*)
==================
==================
WARNING: ThreadSanitizer: data race (pid=14082)
  Read of size 8 at 0x7d4c0000de58 by thread T1:
    #0 boost::shared_ptr<boost::detail::thread_data_base>::shared_ptr(boost::shared_ptr<boost::detail::thread_data_base> const&) <null> (libboost_thread.so.1.58.0+0x0000000318e5)
    #1 boost::(anonymous namespace)::thread_proxy(void*) <null> (libboost_thread.so.1.58.0+0x0000000256a3)

  Previous write of size 8 at 0x7d4c0000de58 by main thread (mutexes: write M24):
    #0 boost::shared_ptr<boost::detail::thread_data_base>::swap(boost::shared_ptr<boost::detail::thread_data_base>&) <null> (libboost_thread.so.1.58.0+0x000000031796)
    #1 boost::shared_ptr<boost::detail::thread_data_base>::operator=(boost::shared_ptr<boost::detail::thread_data_base> const&) <null> (libboost_thread.so.1.58.0+0x00000003142d)
    #2 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.58.0+0x000000025579)
    #3 boost::thread::start_thread() <null> (notify_all_at_thread_exit_p+0x0000004c3ba3)
    #4 boost::thread::thread<void (&)()>(void (&)()) <null> (notify_all_at_thread_exit_p+0x0000004c2f8b)
    #5 main <null> (notify_all_at_thread_exit_p+0x0000004c0903)

  Location is heap block of size 424 at 0x7d4c0000de40 allocated by main thread:
    #0 operator new(unsigned long) /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:571:3 (notify_all_at_thread_exit_p+0x00000045aebd)
    #1 boost::detail::thread_data<void (*)()>* boost::detail::heap_new<boost::detail::thread_data<void (*)()>, void (*)()>(void (*&&)()) <null> (notify_all_at_thread_exit_p+0x0000004c6acb)
    #2 boost::thread::make_thread_info(void (*)()) <null> (notify_all_at_thread_exit_p+0x0000004c3a87)
    #3 boost::thread::thread<void (&)()>(void (&)()) <null> (notify_all_at_thread_exit_p+0x0000004c2f82)
    #4 main <null> (notify_all_at_thread_exit_p+0x0000004c0903)

  Mutex M24 (0x0000014d9438) created at:
    #0 pthread_mutex_init /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1082:3 (notify_all_at_thread_exit_p+0x00000045f790)
    #1 boost::mutex::mutex() <null> (notify_all_at_thread_exit_p+0x0000004c27d7)
    #2 __cxx_global_var_init10 <null> (notify_all_at_thread_exit_p+0x0000004439cc)
    #3 _GLOBAL__sub_I_notify_all_at_thread_exit_pass.cpp <null> (notify_all_at_thread_exit_p+0x000000443a43)
    #4 __libc_csu_init <null> (notify_all_at_thread_exit_p+0x0000004d538c)

  Thread T1 (tid=14087, running) created by main thread at:
    #0 pthread_create /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:896:3 (notify_all_at_thread_exit_p+0x00000045e361)
    #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.58.0+0x0000000255b0)
    #2 boost::thread::start_thread() <null> (notify_all_at_thread_exit_p+0x0000004c3ba3)
    #3 boost::thread::thread<void (&)()>(void (&)()) <null> (notify_all_at_thread_exit_p+0x0000004c2f8b)
    #4 main <null> (notify_all_at_thread_exit_p+0x0000004c0903)

SUMMARY: ThreadSanitizer: data race ??:0 boost::shared_ptr<boost::detail::thread_data_base>::shared_ptr(boost::shared_ptr<boost::detail::thread_data_base> const&)
==================
==================
WARNING: ThreadSanitizer: data race (pid=14082)
  Write of size 8 at 0x7fd7f9795c38 by thread T1:
    #0 boost::shared_ptr<boost::detail::thread_data_base>::shared_ptr(boost::shared_ptr<boost::detail::thread_data_base> const&) <null> (libboost_thread.so.1.58.0+0x0000000318f9)
    #1 boost::(anonymous namespace)::thread_proxy(void*) <null> (libboost_thread.so.1.58.0+0x0000000256a3)

  Previous write of size 8 at 0x7fd7f9795c38 by main thread:
    #0 <null> <null> (0x000000000001)

  Location is stack of thread T1.

  Thread T1 (tid=14087, running) created by main thread at:
    #0 pthread_create /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:896:3 (notify_all_at_thread_exit_p+0x00000045e361)
    #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.58.0+0x0000000255b0)
    #2 boost::thread::start_thread() <null> (notify_all_at_thread_exit_p+0x0000004c3ba3)
    #3 boost::thread::thread<void (&)()>(void (&)()) <null> (notify_all_at_thread_exit_p+0x0000004c2f8b)
    #4 main <null> (notify_all_at_thread_exit_p+0x0000004c0903)

SUMMARY: ThreadSanitizer: data race ??:0 boost::shared_ptr<boost::detail::thread_data_base>::shared_ptr(boost::shared_ptr<boost::detail::thread_data_base> const&)
==================
==================
WARNING: ThreadSanitizer: data race (pid=14082)
  Read of size 8 at 0x7d4c0000de60 by thread T1:
    #0 boost::detail::shared_count::shared_count(boost::detail::shared_count const&) <null> (notify_all_at_thread_exit_p+0x0000004c7696)
    #1 boost::shared_ptr<boost::detail::thread_data_base>::shared_ptr(boost::shared_ptr<boost::detail::thread_data_base> const&) <null> (libboost_thread.so.1.58.0+0x000000031929)
    #2 boost::(anonymous namespace)::thread_proxy(void*) <null> (libboost_thread.so.1.58.0+0x0000000256a3)

  Previous write of size 8 at 0x7d4c0000de60 by main thread (mutexes: write M24):
    #0 boost::detail::shared_count::swap(boost::detail::shared_count&) <null> (notify_all_at_thread_exit_p+0x0000004c71cb)
    #1 boost::shared_ptr<boost::detail::thread_data_base>::swap(boost::shared_ptr<boost::detail::thread_data_base>&) <null> (libboost_thread.so.1.58.0+0x0000000317d6)
    #2 boost::shared_ptr<boost::detail::thread_data_base>::operator=(boost::shared_ptr<boost::detail::thread_data_base> const&) <null> (libboost_thread.so.1.58.0+0x00000003142d)
    #3 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.58.0+0x000000025579)
    #4 boost::thread::start_thread() <null> (notify_all_at_thread_exit_p+0x0000004c3ba3)
    #5 boost::thread::thread<void (&)()>(void (&)()) <null> (notify_all_at_thread_exit_p+0x0000004c2f8b)
    #6 main <null> (notify_all_at_thread_exit_p+0x0000004c0903)

  Location is heap block of size 424 at 0x7d4c0000de40 allocated by main thread:
    #0 operator new(unsigned long) /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:571:3 (notify_all_at_thread_exit_p+0x00000045aebd)
    #1 boost::detail::thread_data<void (*)()>* boost::detail::heap_new<boost::detail::thread_data<void (*)()>, void (*)()>(void (*&&)()) <null> (notify_all_at_thread_exit_p+0x0000004c6acb)
    #2 boost::thread::make_thread_info(void (*)()) <null> (notify_all_at_thread_exit_p+0x0000004c3a87)
    #3 boost::thread::thread<void (&)()>(void (&)()) <null> (notify_all_at_thread_exit_p+0x0000004c2f82)
    #4 main <null> (notify_all_at_thread_exit_p+0x0000004c0903)

  Mutex M24 (0x0000014d9438) created at:
    #0 pthread_mutex_init /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1082:3 (notify_all_at_thread_exit_p+0x00000045f790)
    #1 boost::mutex::mutex() <null> (notify_all_at_thread_exit_p+0x0000004c27d7)
    #2 __cxx_global_var_init10 <null> (notify_all_at_thread_exit_p+0x0000004439cc)
    #3 _GLOBAL__sub_I_notify_all_at_thread_exit_pass.cpp <null> (notify_all_at_thread_exit_p+0x000000443a43)
    #4 __libc_csu_init <null> (notify_all_at_thread_exit_p+0x0000004d538c)

  Thread T1 (tid=14087, running) created by main thread at:
    #0 pthread_create /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:896:3 (notify_all_at_thread_exit_p+0x00000045e361)
    #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.58.0+0x0000000255b0)
    #2 boost::thread::start_thread() <null> (notify_all_at_thread_exit_p+0x0000004c3ba3)
    #3 boost::thread::thread<void (&)()>(void (&)()) <null> (notify_all_at_thread_exit_p+0x0000004c2f8b)
    #4 main <null> (notify_all_at_thread_exit_p+0x0000004c0903)

SUMMARY: ThreadSanitizer: data race ??:0 boost::detail::shared_count::shared_count(boost::detail::shared_count const&)
==================
==================
WARNING: ThreadSanitizer: data race (pid=14082)
  Write of size 8 at 0x7fd7f9795c40 by thread T1:
    #0 boost::detail::shared_count::shared_count(boost::detail::shared_count const&) <null> (notify_all_at_thread_exit_p+0x0000004c76aa)
    #1 boost::shared_ptr<boost::detail::thread_data_base>::shared_ptr(boost::shared_ptr<boost::detail::thread_data_base> const&) <null> (libboost_thread.so.1.58.0+0x000000031929)
    #2 boost::(anonymous namespace)::thread_proxy(void*) <null> (libboost_thread.so.1.58.0+0x0000000256a3)

  Previous write of size 8 at 0x7fd7f9795c40 by main thread:
    #0 <null> <null> (0x000000000001)

  Location is stack of thread T1.

  Thread T1 (tid=14087, running) created by main thread at:
    #0 pthread_create /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:896:3 (notify_all_at_thread_exit_p+0x00000045e361)
    #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.58.0+0x0000000255b0)
    #2 boost::thread::start_thread() <null> (notify_all_at_thread_exit_p+0x0000004c3ba3)
    #3 boost::thread::thread<void (&)()>(void (&)()) <null> (notify_all_at_thread_exit_p+0x0000004c2f8b)
    #4 main <null> (notify_all_at_thread_exit_p+0x0000004c0903)

SUMMARY: ThreadSanitizer: data race ??:0 boost::detail::shared_count::shared_count(boost::detail::shared_count const&)
==================
==================
WARNING: ThreadSanitizer: data race (pid=14082)
  Atomic write of size 4 at 0x7d080000ef88 by thread T1:
    #0 __tsan_atomic32_fetch_add /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interface_atomic.cc:613:3 (notify_all_at_thread_exit_p+0x0000004a5256)
    #1 boost::detail::atomic_increment(int _Atomic*) <null> (notify_all_at_thread_exit_p+0x0000004c77cc)
    #2 boost::detail::sp_counted_base::add_ref_copy() <null> (notify_all_at_thread_exit_p+0x0000004c7749)
    #3 boost::detail::shared_count::shared_count(boost::detail::shared_count const&) <null> (notify_all_at_thread_exit_p+0x0000004c76e6)
    #4 boost::shared_ptr<boost::detail::thread_data_base>::shared_ptr(boost::shared_ptr<boost::detail::thread_data_base> const&) <null> (libboost_thread.so.1.58.0+0x000000031929)
    #5 boost::(anonymous namespace)::thread_proxy(void*) <null> (libboost_thread.so.1.58.0+0x0000000256a3)

  Previous write of size 8 at 0x7d080000ef88 by main thread (mutexes: write M24):
    #0 operator new(unsigned long) /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:571:3 (notify_all_at_thread_exit_p+0x00000045aebd)
    #1 boost::detail::shared_count::shared_count<boost::detail::thread_data<void (*)()> >(boost::detail::thread_data<void (*)()>*) <null> (notify_all_at_thread_exit_p+0x0000004c6f67)
    #2 void boost::detail::sp_pointer_construct<boost::detail::thread_data_base, boost::detail::thread_data<void (*)()> >(boost::shared_ptr<boost::detail::thread_data_base>*, boost::detail::thread_data<void (*)()>*, boost::detail::shared_count&) <null> (notify_all_at_thread_exit_p+0x0000004c6dd0)
    #3 boost::shared_ptr<boost::detail::thread_data_base>::shared_ptr<boost::detail::thread_data<void (*)()> >(boost::detail::thread_data<void (*)()>*) <null> (notify_all_at_thread_exit_p+0x0000004c6c7b)
    #4 boost::thread::make_thread_info(void (*)()) <null> (notify_all_at_thread_exit_p+0x0000004c3a93)
    #5 boost::thread::thread<void (&)()>(void (&)()) <null> (notify_all_at_thread_exit_p+0x0000004c2f82)
    #6 main <null> (notify_all_at_thread_exit_p+0x0000004c0903)

  Location is heap block of size 24 at 0x7d080000ef80 allocated by main thread:
    #0 operator new(unsigned long) /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:571:3 (notify_all_at_thread_exit_p+0x00000045aebd)
    #1 boost::detail::shared_count::shared_count<boost::detail::thread_data<void (*)()> >(boost::detail::thread_data<void (*)()>*) <null> (notify_all_at_thread_exit_p+0x0000004c6f67)
    #2 void boost::detail::sp_pointer_construct<boost::detail::thread_data_base, boost::detail::thread_data<void (*)()> >(boost::shared_ptr<boost::detail::thread_data_base>*, boost::detail::thread_data<void (*)()>*, boost::detail::shared_count&) <null> (notify_all_at_thread_exit_p+0x0000004c6dd0)
    #3 boost::shared_ptr<boost::detail::thread_data_base>::shared_ptr<boost::detail::thread_data<void (*)()> >(boost::detail::thread_data<void (*)()>*) <null> (notify_all_at_thread_exit_p+0x0000004c6c7b)
    #4 boost::thread::make_thread_info(void (*)()) <null> (notify_all_at_thread_exit_p+0x0000004c3a93)
    #5 boost::thread::thread<void (&)()>(void (&)()) <null> (notify_all_at_thread_exit_p+0x0000004c2f82)
    #6 main <null> (notify_all_at_thread_exit_p+0x0000004c0903)

  Mutex M24 (0x0000014d9438) created at:
    #0 pthread_mutex_init /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1082:3 (notify_all_at_thread_exit_p+0x00000045f790)
    #1 boost::mutex::mutex() <null> (notify_all_at_thread_exit_p+0x0000004c27d7)
    #2 __cxx_global_var_init10 <null> (notify_all_at_thread_exit_p+0x0000004439cc)
    #3 _GLOBAL__sub_I_notify_all_at_thread_exit_pass.cpp <null> (notify_all_at_thread_exit_p+0x000000443a43)
    #4 __libc_csu_init <null> (notify_all_at_thread_exit_p+0x0000004d538c)

  Thread T1 (tid=14087, running) created by main thread at:
    #0 pthread_create /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:896:3 (notify_all_at_thread_exit_p+0x00000045e361)
    #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.58.0+0x0000000255b0)
    #2 boost::thread::start_thread() <null> (notify_all_at_thread_exit_p+0x0000004c3ba3)
    #3 boost::thread::thread<void (&)()>(void (&)()) <null> (notify_all_at_thread_exit_p+0x0000004c2f8b)
    #4 main <null> (notify_all_at_thread_exit_p+0x0000004c0903)

SUMMARY: ThreadSanitizer: data race ??:0 boost::detail::atomic_increment(int _Atomic*)
==================
No errors detected.
ThreadSanitizer: reported 6 warnings

EXIT STATUS: 66
            


Change History (1)

comment:1 by viboes, 8 years ago

Owner: changed from Anthony Williams to viboes
Status: newassigned
Note: See TracTickets for help on using tickets.