stdpain opened a new issue #1508:
URL: https://github.com/apache/incubator-brpc/issues/1508


   I need to use helgrind to help locate the deadlock problem in the program, 
but this is unexpected because some race conditions of the brpc framework 
exited early
   
   ```
   ==24431==
   ==24431== Thread #2 was created
   ==24431==    at 0x6A38DCE: clone (clone.S:71)
   ==24431==    by 0x67E7DDE: create_thread.constprop.0 (createthread.c:101)
   ==24431==    by 0x67E97BB: pthread_create@@GLIBC_2.2.5 (pthread_create.c:826)
   ==24431==    by 0x67C23C7: pthread_create_WRK (hg_intercepts.c:427)
   ==24431==    by 0x30CB419: create_sampling_thread (sampler.cpp:86)
   ==24431==    by 0x30CB419: SamplerCollector (sampler.cpp:63)
   ==24431==    by 0x30CB419: 
butil::GetLeakySingleton<bvar::detail::SamplerCollector>::create_leaky_singleton()
 (singleton_on_pthread_once.h:42)
   ==24431==    by 0x67F04EE: __pthread_once_slow (pthread_once.c:116)
   ==24431==    by 0x30CA196: 
get_leaky_singleton<bvar::detail::SamplerCollector> 
(singleton_on_pthread_once.h:60)
   ==24431==    by 0x30CA196: 
get_leaky_singleton<bvar::detail::SamplerCollector> 
(singleton_on_pthread_once.h:54)
   ==24431==    by 0x30CA196: bvar::detail::Sampler::schedule() 
(sampler.cpp:195)
   ==24431==    by 0x30C6C22: expose_impl (passive_status.h:179)
   ==24431==    by 0x30C6C22: expose (variable.h:132)
   ==24431==    by 0x30C6C22: PassiveStatus (passive_status.h:85)
   ==24431==    by 0x30C6C22: 
bvar::DisplaySamplingRatio::DisplaySamplingRatio(char const*, 
bvar::CollectorSpeedLimit const*) (collector.cpp:431)
   ==24431==    by 0x1490EE4: __static_initialization_and_destruction_0 
(span.cpp:354)
   ==24431==    by 0x1490EE4: _GLOBAL__sub_I_span.cpp (span.cpp:801)
   ==24431==    by 0x4025614: __libc_csu_init (elf-init.c:88)
   ==24431==    by 0x6968B19: (below main) (libc-start.c:264)
   ==24431==
   ==24431== ----------------------------------------------------------------
   ==24431==
   ==24431== Possible data race during write of size 8 at 0x55118D0 by thread #1
   ==24431== Locks held: none
   ==24431==    at 0x30CB442: Release_Store (atomicops_internals_x86_gcc.h:184)
   ==24431==    by 0x30CB442: 
butil::GetLeakySingleton<bvar::detail::SamplerCollector>::create_leaky_singleton()
 (singleton_on_pthread_once.h:43)
   ==24431==    by 0x67F04EE: __pthread_once_slow (pthread_once.c:116)
   ==24431==    by 0x30CA196: 
get_leaky_singleton<bvar::detail::SamplerCollector> 
(singleton_on_pthread_once.h:60)
   ==24431==    by 0x30CA196: 
get_leaky_singleton<bvar::detail::SamplerCollector> 
(singleton_on_pthread_once.h:54)
   ==24431==    by 0x30CA196: bvar::detail::Sampler::schedule() 
(sampler.cpp:195)
   ==24431==    by 0x30C6C22: expose_impl (passive_status.h:179)
   ==24431==    by 0x30C6C22: expose (variable.h:132)
   ==24431==    by 0x30C6C22: PassiveStatus (passive_status.h:85)
   ==24431==    by 0x30C6C22: 
bvar::DisplaySamplingRatio::DisplaySamplingRatio(char const*, 
bvar::CollectorSpeedLimit const*) (collector.cpp:431)
   ==24431==    by 0x1490EE4: __static_initialization_and_destruction_0 
(span.cpp:354)
   ==24431==    by 0x1490EE4: _GLOBAL__sub_I_span.cpp (span.cpp:801)
   ==24431==    by 0x4025614: __libc_csu_init (elf-init.c:88)
   ==24431==    by 0x6968B19: (below main) (libc-start.c:264)
   ==24431==
   ==24431== This conflicts with a previous read of size 8 by thread #2
   ==24431== Locks held: none
   ==24431==    at 0x30CA17B: Acquire_Load (atomicops_internals_x86_gcc.h:207)
   ==24431==    by 0x30CA17B: 
get_leaky_singleton<bvar::detail::SamplerCollector> 
(singleton_on_pthread_once.h:55)
   ==24431==    by 0x30CA17B: bvar::detail::Sampler::schedule() 
(sampler.cpp:195)
   ==24431==    by 0x2F929C9: get_sampler (passive_status.h:146)
   ==24431==    by 0x2F929C9: 
bvar::detail::WindowBase<bvar::PassiveStatus<double>, 
(bvar::SeriesFrequency)1>::WindowBase(bvar::PassiveStatus<double>*, long) 
(window.h:82)
   ==24431==    by 0x30CA68F: PerSecond (window.h:209)
   ==24431==    by 0x30CA68F: bvar::detail::SamplerCollector::run() 
(sampler.cpp:138)
   ==24431==    by 0x30CAEA8: 
bvar::detail::SamplerCollector::sampling_thread(void*) (sampler.cpp:103)
   ==24431==    by 0x67C25C6: mythread_wrapper (hg_intercepts.c:389)
   ==24431==    by 0x67E8F83: start_thread (pthread_create.c:486)
   ==24431==    by 0x6A38DDE: clone (clone.S:95)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to