2017-08-30 10 views
0

helgrindドキュメントによれば、2つのスタックトレース - レースが検出された場所と、同じ場所が前/後の関係がない別のスレッドで読み書きされた場所 - でレースが報告されます。helgrindは競合のないレースを報告します - それはどういう意味ですか?

helgrindはレースの場所のみを報告しますが、競合の場所は表示しません。どういう意味ですか?これは複雑なコードベース上にあるので、私は簡単なコードで再現する方法を知らない。通常、私は期待どおりに2つのスタックトレースを参照してください。

==10720== Possible data race during read of size 4 at 0x89886CC by thread #2 
==10720== Locks held: none 
==10720== at 0x5111BDA: proactor_do_epoll (epoll.c:1816) 
==10720== by 0x5111AD9: pn_proactor_wait (epoll.c:1842) 
==10720== by 0x4EB8CF1: proton::container::impl::thread() (proactor_container_impl.cpp:467) 
==10720== by 0x4EB949B: proton::container::impl::run(int) (proactor_container_impl.cpp:509) 
==10720== by 0x4EB5D51: proton::container::run() (container.cpp:83) 
==10720== by 0x40D2F7: main::$_0::operator()() const (multithreaded_client_flow_control.cpp:267) 
==10720== by 0x40D2B4: void std::_Bind_simple<main::$_0()>::_M_invoke<>(std::_Index_tuple<>) (functional:1390) 
==10720== by 0x40D284: std::_Bind_simple<main::$_0()>::operator()() (functional:1380) 
==10720== by 0x40D178: std::thread::_State_impl<std::_Bind_simple<main::$_0()> >::_M_run() (thread:197) 
==10720== by 0x613776E: execute_native_thread_routine (thread.cc:83) 
==10720== by 0x4C34A14: mythread_wrapper (hg_intercepts.c:389) 
==10720== by 0x5E65739: start_thread (pthread_create.c:333) 
==10720== Address 0x89886cc is 44 bytes inside a block of size 1,728 alloc'd 
==10720== at 0x4C30E70: calloc (vg_replace_malloc.c:711) 
==10720== by 0x5329B1E: pn_object_new (object.c:202) 
==10720== by 0x5329E30: pn_class_new (object.c:61) 
==10720== by 0x510F844: new_pconnection_t (epoll.c:697) 
==10720== by 0x510F668: pn_proactor_connect (epoll.c:1217) 
==10720== by 0x4EB742B: proton::container::impl::start_connection(proton::url const&, pn_connection_t*) (proactor_container_impl.cpp:196) 
==10720== by 0x4EB7708: proton::container::impl::open_sender(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, proton::sender_options const&, proton::connection_options const&) (proactor_container_impl.cpp:226) 
==10720== by 0x4EB57F6: proton::container::open_sender(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, proton::sender_options const&, proton::connection_options const&) (container.cpp:97) 
==10720== by 0x4EB58FA: proton::container::open_sender(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, proton::connection_options const&) (container.cpp:52) 
==10720== by 0x40E3C0: sender::sender(proton::container&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (multithreaded_client_flow_control.cpp:80) 
==10720== by 0x40C6DD: main (multithreaded_client_flow_control.cpp:270) 
==10720== Block was alloc'd by thread #1 

答えて

0

あなたはhelgrindは、レース用の過去のアクセス覚えれる3つのレベルを指定することができます

--historyレベル=なし|約| [フル]フル

デフォルトはfullです。これは、過去のアクセスごとにスタックトレースを記録することを意味します。しかしながら、このように記録された過去のスタックトレースのnrは限られている。おそらく競合するアクセスが古すぎ、スタックトレースが「クリーンアップ」されている可能性があります。

あなたは

--conflictキャッシュ・サイズを使用して記録されている過去のスタックトレースの量を増加させることにより、過去のスタックトレースを取得する可能性がある= 'フルの歴史キャッシュのNサイズ[2000000]

メモリが十分な場合は、最大許容値 (150000000)を試してみてください。

関連する問題