Hello,

Helgrind is detecting a possible data race between pthread_create and
_pthread_start.  The output is shown below.  Does Helgrind support Mac
OS X 10.7.4?  If it does, any ideas what I could be doing wrong?

Thanks,
Geoffrey

==36862== Helgrind, a thread error detector
==36862== Copyright (C) 2007-2011, and GNU GPL'd, by OpenWorks LLP et al.
==36862== Using Valgrind-3.8.0.SVN and LibVEX; rerun with -h for copyright info
==36862== Command: ./test_thread.py
==36862==
==36862== Helgrind, a thread error detector
==36862== Copyright (C) 2007-2011, and GNU GPL'd, by OpenWorks LLP et al.
==36862== Using Valgrind-3.8.0.SVN and LibVEX; rerun with -h for copyright info
==36862== Command: /opt/local/bin/python ./test_thread.py
==36862==
==36862== Helgrind, a thread error detector
==36862== Copyright (C) 2007-2011, and GNU GPL'd, by OpenWorks LLP et al.
==36862== Using Valgrind-3.8.0.SVN and LibVEX; rerun with -h for copyright info
==36862== Command:
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python
./test_thread.py
==36862==
mutex 0x0x352fa40 initialized
mutex 0x0x352fa40 locked
mutex 0x0x352fa40 unlocked
mutex 0x0x1008ce330 initialized
cpu thread pool: threads = 8, priority = 31
mutex 0x0x1008489f0 initialized
io thread pool: threads = 2, priority = 47
==36862== ---Thread-Announcement------------------------------------------
==36862==
==36862== Thread #2 was created
==36862==    at 0x7E14DE: __bsdthread_create (in
/usr/lib/system/libsystem_kernel.dylib)
==36862==    by 0x2F767B1:
pentago::thread_pool_t::thread_pool_t(pentago::thread_type_t, int,
int) (thread.cpp:197)
==36862==    by 0x2F77F56: other::Ref<pentago::thread_pool_t>
other::new_<pentago::thread_pool_t, pentago::thread_type_t, int&,
int>(pentago::thread_type_t&&, int&, int&&) (new.h:27)
==36862==    by 0x2F77559: pentago::init_thread_pools(int, int) (thread.cpp:294)
==36862==    by 0x2F00D43: void other::function_inner_wrapper<void
(*)(int, int), void, other::ITP<0, int>, other::ITP<1, int>
>(_object*, void*) (wrap_function.h:35)
==36862==    by 0x2F00D70: _object* other::OuterWrapper<void,
_object*, void*>::wrap<&(void other::function_inner_wrapper<void
(*)(int, int), void, other::ITP<0, int>, other::ITP<1, int>
>(_object*, void*))>(_object*, void*) (outer_wrapper.h:36)
==36862==    by 0xF84557: other::PythonFunction::call(_object*,
_object*, _object*) (wrap_function.cpp:21)
==36862==    by 0x2BDE0: PyObject_Call (in
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Python)
==36862==    by 0xBDBA4: PyEval_EvalFrameEx (in
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Python)
==36862==    by 0xC0AB6: PyEval_EvalCodeEx (in
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Python)
==36862==    by 0xC0C67: fast_function (in
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Python)
==36862==    by 0xBD988: PyEval_EvalFrameEx (in
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Python)
==36862==
==36862== ---Thread-Announcement------------------------------------------
==36862==
==36862== Thread #1 is the program's root thread
==36862==
==36862== ----------------------------------------------------------------
==36862==
==36862== Possible data race during read of size 4 at 0x734FB0 by thread #2
==36862== Locks held: none
==36862==    at 0x69E7C1: _pthread_start (in /usr/lib/system/libsystem_c.dylib)
==36862==    by 0x6A1B74: thread_start (in /usr/lib/system/libsystem_c.dylib)
==36862==
==36862== This conflicts with a previous write of size 4 by thread #1
==36862== Locks held: none
==36862==    at 0x6A0B80: pthread_create (in /usr/lib/system/libsystem_c.dylib)
==36862==    by 0x2F767B1:
pentago::thread_pool_t::thread_pool_t(pentago::thread_type_t, int,
int) (thread.cpp:197)
==36862==    by 0x2F77F56: other::Ref<pentago::thread_pool_t>
other::new_<pentago::thread_pool_t, pentago::thread_type_t, int&,
int>(pentago::thread_type_t&&, int&, int&&) (new.h:27)
==36862==    by 0x2F775A1: pentago::init_thread_pools(int, int) (thread.cpp:295)
==36862==    by 0x2F00D43: void other::function_inner_wrapper<void
(*)(int, int), void, other::ITP<0, int>, other::ITP<1, int>
>(_object*, void*) (wrap_function.h:35)
==36862==    by 0x2F00D70: _object* other::OuterWrapper<void,
_object*, void*>::wrap<&(void other::function_inner_wrapper<void
(*)(int, int), void, other::ITP<0, int>, other::ITP<1, int>
>(_object*, void*))>(_object*, void*) (outer_wrapper.h:36)
==36862==    by 0xF84557: other::PythonFunction::call(_object*,
_object*, _object*) (wrap_function.cpp:21)
==36862==    by 0x2BDE0: PyObject_Call (in
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Python)
==36862==
==36862== ----------------------------------------------------------------
==36862==
==36862== Possible data race during read of size 4 at 0x734FB8 by thread #2
==36862== Locks held: none
==36862==    at 0x6F2358: spin_lock$VARIANT$mp (in
/usr/lib/system/libsystem_c.dylib)
==36862==    by 0x6A1B74: thread_start (in /usr/lib/system/libsystem_c.dylib)
==36862==
==36862== This conflicts with a previous write of size 4 by thread #1
==36862== Locks held: none
==36862==    at 0x6F2388: spin_unlock (in /usr/lib/system/libsystem_c.dylib)
==36862==    by 0x2F767B1:
pentago::thread_pool_t::thread_pool_t(pentago::thread_type_t, int,
int) (thread.cpp:197)
==36862==    by 0x2F77F56: other::Ref<pentago::thread_pool_t>
other::new_<pentago::thread_pool_t, pentago::thread_type_t, int&,
int>(pentago::thread_type_t&&, int&, int&&) (new.h:27)
==36862==    by 0x2F775A1: pentago::init_thread_pools(int, int) (thread.cpp:295)
==36862==    by 0x2F00D43: void other::function_inner_wrapper<void
(*)(int, int), void, other::ITP<0, int>, other::ITP<1, int>
>(_object*, void*) (wrap_function.h:35)
==36862==    by 0x2F00D70: _object* other::OuterWrapper<void,
_object*, void*>::wrap<&(void other::function_inner_wrapper<void
(*)(int, int), void, other::ITP<0, int>, other::ITP<1, int>
>(_object*, void*))>(_object*, void*) (outer_wrapper.h:36)
==36862==    by 0xF84557: other::PythonFunction::call(_object*,
_object*, _object*) (wrap_function.cpp:21)
==36862==    by 0x2BDE0: PyObject_Call (in
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Python)
==36862==
...

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to