You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2021/01/22 08:34:34 UTC

[GitHub] [incubator-brpc] pluswu opened a new issue #1335: 进程停止时死锁

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


   **Describe the bug (描述bug)**
   
   
   **To Reproduce (复现方法)**
   非必先
   
   **Expected behavior (期望行为)**
   
   
   **Versions (各种版本)**
   OS: centos
   Compiler: g++ 4.8.5
   brpc:
   protobuf:
   
   **Additional context/screenshots (更多上下文/截图)**
   #0  0x00007efc5ad4a42d in __lll_lock_wait () from /lib64/libpthread.so.0
   #1  0x00007efc5ad45de6 in _L_lock_870 () from /lib64/libpthread.so.0
   #2  0x00007efc5ad45cdf in pthread_mutex_lock () from /lib64/libpthread.so.0
   #3  0x00007efc59b14eed in lock_guard (mutex=..., this=<synthetic pointer>) at /data/home/pluswu/incubator-brpc/src/butil/scoped_lock.h:163
   #4  bvar::Variable::hide (this=this@entry=0x7efc5a1f7f00 <bvar::g_minflt_second>) at /data/home/pluswu/incubator-brpc/src/bvar/variable.cpp:189
   #5  0x00007efc59af899f in ~WindowBase (this=0x7efc5a1f7f00 <bvar::g_minflt_second>, __in_chrg=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bvar/window.h:88
   #6  bvar::PerSecond<bvar::PassiveStatus<unsigned long> >::~PerSecond (this=0x7efc5a1f7f00 <bvar::g_minflt_second>, __in_chrg=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bvar/window.h:197
   #7  0x00007efc577a0dda in __cxa_finalize () from /lib64/libc.so.6
   #8  0x00007efc59aa3023 in __do_global_dtors_aux () from /data/home/user00/server/lib/libbrpc.so
   #9  0x00007ffd9f1a6660 in ?? ()
   #10 0x00007efc5af67b3a in _dl_fini () from /lib64/ld-linux-x86-64.so.2
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] pluswu commented on issue #1335: 进程停止时死锁

Posted by GitBox <gi...@apache.org>.
pluswu commented on issue #1335:
URL: https://github.com/apache/incubator-brpc/issues/1335#issuecomment-765239686


   另外一个线程此时正在处理bvar的http输出
   
   0  0x00007efc5ad4a42d in __lll_lock_wait () from /lib64/libpthread.so.0
   #1  0x00007efc5ad45de6 in _L_lock_870 () from /lib64/libpthread.so.0
   #2  0x00007efc5ad45cdf in pthread_mutex_lock () from /lib64/libpthread.so.0
   #3  0x00007efc59b155d7 in unique_lock (mutex=..., this=<synthetic pointer>) at /data/home/pluswu/incubator-brpc/src/butil/scoped_lock.h:218
   #4  bvar::Variable::list_exposed (names=names@entry=0x7efc412ea540, display_filter=bvar::DISPLAY_ON_PLAIN_TEXT) at /data/home/pluswu/incubator-brpc/src/bvar/variable.cpp:212
   #5  0x00007efc59b16cc2 in bvar::Variable::dump_exposed (dumper=dumper@entry=0x7efc412ea930, poptions=poptions@entry=0x0) at /data/home/pluswu/incubator-brpc/src/bvar/variable.cpp:507
   #6  0x00007efc59b96201 in brpc::DumpPrometheusMetricsToIOBuf (output=output@entry=0x7efc28025710) at /data/home/pluswu/incubator-brpc/src/brpc/builtin/prometheus_metrics_service.cpp:198
   #7  0x00007efc59b964b9 in brpc::PrometheusMetricsService::default_method (this=<optimized out>, cntl_base=0x7efc28025540, done=0x7efc28025890) at /data/home/pluswu/incubator-brpc/src/brpc/builtin/prometheus_metrics_service.cpp:189
   #8  0x00007efc59cc047e in brpc::brpc_metrics::CallMethod (this=0x9f8d120, method=<optimized out>, controller=0x7efc28025540, request=0x7efc28025850, response=0x7efc28025870, done=0x7efc28025890) at /data/home/pluswu/incubator-brpc/brpc/builtin_service.pb.cc:8506
   #9  0x00007efc59c16b0f in brpc::policy::ProcessHttpRequest (msg=<optimized out>) at /data/home/pluswu/incubator-brpc/src/brpc/policy/http_rpc_protocol.cpp:1484
   #10 0x00007efc59bdbe6a in brpc::ProcessInputMessage (void_arg=void_arg@entry=0x7efc28024620) at /data/home/pluswu/incubator-brpc/src/brpc/input_messenger.cpp:135
   #11 0x00007efc59bdcb83 in operator() (this=<optimized out>, last_msg=0x7efc28024620) at /data/home/pluswu/incubator-brpc/src/brpc/input_messenger.cpp:141
   #12 brpc::InputMessenger::OnNewMessages (m=0x7efc48028890) at /usr/include/c++/4.8.2/bits/unique_ptr.h:184
   #13 0x00007efc59c8b1bd in brpc::Socket::ProcessEvent (arg=0x7efc48028890) at /data/home/pluswu/incubator-brpc/src/brpc/socket.cpp:1017
   #14 0x00007efc59b3764a in bthread::TaskGroup::task_runner (skip_remained=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bthread/task_group.cpp:295
   #15 0x00007efc59b20991 in bthread_make_fcontext () from /data/home/user00/server/lib/libbrpc.so
   #16 0x0000000000000000 in ?? ()


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] pluswu commented on issue #1335: 进程停止时死锁

Posted by GitBox <gi...@apache.org>.
pluswu commented on issue #1335:
URL: https://github.com/apache/incubator-brpc/issues/1335#issuecomment-765240938


   这是所有线程的堆栈
   
   thread 12 (Thread 0x7efc55e6b700 (LWP 8717)):
   #0  0x00007efc578271bd in nanosleep () from /lib64/libc.so.6
   #1  0x00007efc57857ed4 in usleep () from /lib64/libc.so.6
   #2  0x00007efc59b05c9a in bvar::detail::SamplerCollector::run (this=0x9db32f0) at /data/home/pluswu/incubator-brpc/src/bvar/detail/sampler.cpp:177
   #3  0x00007efc59b067d9 in bvar::detail::SamplerCollector::sampling_thread (arg=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bvar/detail/sampler.cpp:110
   #4  0x00007efc5ad43e25 in start_thread () from /lib64/libpthread.so.0
   #5  0x00007efc5786035d in clone () from /lib64/libc.so.6
   Thread 11 (Thread 0x7efc4d925700 (LWP 8728)):
   #0  0x00007efc5785a809 in syscall () from /lib64/libc.so.6
   #1  0x00007efc59b3c608 in futex_wait_private (timeout=<optimized out>, expected=21951, addr1=0x9f764d0) at /data/home/pluswu/incubator-brpc/src/bthread/sys_futex.h:41
   #2  bthread::TimerThread::run (this=0x9f764a0) at /data/home/pluswu/incubator-brpc/src/bthread/timer_thread.cpp:431
   #3  0x00007efc59b3cb19 in bthread::TimerThread::run_this (arg=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bthread/timer_thread.cpp:120
   #4  0x00007efc5ad43e25 in start_thread () from /lib64/libpthread.so.0
   #5  0x00007efc5786035d in clone () from /lib64/libc.so.6
   Thread 10 (Thread 0x7efc4d124700 (LWP 8729)):
   #0  0x00007efc5785a809 in syscall () from /lib64/libc.so.6
   #1  0x00007efc59b35802 in futex_wait_private (timeout=0x0, expected=<optimized out>, addr1=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bthread/sys_futex.h:41
   #2  wait (expected_state=..., this=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bthread/parking_lot.h:60
   #3  bthread::TaskGroup::wait_task (this=this@entry=0x7efc480008c0, tid=tid@entry=0x7efc4d123a68) at /data/home/pluswu/incubator-brpc/src/bthread/task_group.cpp:124
   #4  0x00007efc59b378bb in bthread::TaskGroup::run_main_task (this=this@entry=0x7efc480008c0) at /data/home/pluswu/incubator-brpc/src/bthread/task_group.cpp:152
   #5  0x00007efc59b3360e in bthread::TaskControl::worker_thread (arg=0x9f70f20) at /data/home/pluswu/incubator-brpc/src/bthread/task_control.cpp:76
   #6  0x00007efc5ad43e25 in start_thread () from /lib64/libpthread.so.0
   #7  0x00007efc5786035d in clone () from /lib64/libc.so.6
   Thread 9 (Thread 0x7efc4c923700 (LWP 8730)):
   #0  0x00007efc5ad4a42d in __lll_lock_wait () from /lib64/libpthread.so.0
   #1  0x00007efc5ad45dcb in _L_lock_812 () from /lib64/libpthread.so.0
   #2  0x00007efc5ad45c98 in pthread_mutex_lock () from /lib64/libpthread.so.0
   #3  0x00007efc59afaf79 in lock (this=<optimized out>) at /data/home/pluswu/incubator-brpc/src/butil/synchronization/lock.h:69
   #4  lock_guard (__m=..., this=<synthetic pointer>) at /usr/include/c++/4.8.2/mutex:414
   #5  get_value (result=<synthetic pointer>, window_size=10, this=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bvar/detail/sampler.h:149
   #6  get_span (this=<optimized out>, result=<synthetic pointer>, window_size=10) at /data/home/pluswu/incubator-brpc/src/bvar/window.h:96
   #7  bvar::PerSecond<bvar::PassiveStatus<unsigned long> >::get_value (this=<optimized out>, window_size=10) at /data/home/pluswu/incubator-brpc/src/bvar/window.h:225
   #8  0x00007efc59af71e6 in get_value (this=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bvar/window.h:111
   #9  bvar::detail::WindowBase<bvar::PassiveStatus<unsigned long>, (bvar::SeriesFrequency)1>::describe (this=<optimized out>, os=..., quote_string=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bvar/window.h:117
   #10 0x00007efc59b14d35 in bvar::Variable::describe_exposed (name="process_faults_minor_second", os=..., quote_string=<optimized out>, display_filter=bvar::DISPLAY_ON_PLAIN_TEXT) at /data/home/pluswu/incubator-brpc/src/bvar/variable.cpp:257
   #11 0x00007efc59b17cdd in bvar::Variable::dump_exposed (dumper=dumper@entry=0x7efc23fff930, poptions=poptions@entry=0x0) at /data/home/pluswu/incubator-brpc/src/bvar/variable.cpp:515
   #12 0x00007efc59b96201 in brpc::DumpPrometheusMetricsToIOBuf (output=output@entry=0x7efc3c022a20) at /data/home/pluswu/incubator-brpc/src/brpc/builtin/prometheus_metrics_service.cpp:198
   #13 0x00007efc59b964b9 in brpc::PrometheusMetricsService::default_method (this=<optimized out>, cntl_base=0x7efc3c022850, done=0x7efc3c022ba0) at /data/home/pluswu/incubator-brpc/src/brpc/builtin/prometheus_metrics_service.cpp:189
   #14 0x00007efc59cc047e in brpc::brpc_metrics::CallMethod (this=0x9f8d120, method=<optimized out>, controller=0x7efc3c022850, request=0x7efc3c022b60, response=0x7efc3c022b80, done=0x7efc3c022ba0) at /data/home/pluswu/incubator-brpc/brpc/builtin_service.pb.cc:8506
   #15 0x00007efc59c16b0f in brpc::policy::ProcessHttpRequest (msg=<optimized out>) at /data/home/pluswu/incubator-brpc/src/brpc/policy/http_rpc_protocol.cpp:1484
   #16 0x00007efc59bdbe6a in brpc::ProcessInputMessage (void_arg=void_arg@entry=0x7efc3c022180) at /data/home/pluswu/incubator-brpc/src/brpc/input_messenger.cpp:135
   #17 0x00007efc59bdcb83 in operator() (this=<optimized out>, last_msg=0x7efc3c022180) at /data/home/pluswu/incubator-brpc/src/brpc/input_messenger.cpp:141
   #18 brpc::InputMessenger::OnNewMessages (m=0x7efc48028690) at /usr/include/c++/4.8.2/bits/unique_ptr.h:184
   #19 0x00007efc59c8b1bd in brpc::Socket::ProcessEvent (arg=0x7efc48028690) at /data/home/pluswu/incubator-brpc/src/brpc/socket.cpp:1017
   #20 0x00007efc59b3764a in bthread::TaskGroup::task_runner (skip_remained=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bthread/task_group.cpp:295
   #21 0x00007efc59b20991 in bthread_make_fcontext () from /data/home/user00/server/lib/libbrpc.so
   #22 0x00007efc24000020 in ?? ()
   #23 0x0000000000000000 in ?? ()
   Thread 8 (Thread 0x7efc44122700 (LWP 8731)):
   #0  0x00007efc5785a809 in syscall () from /lib64/libc.so.6
   #1  0x00007efc59b35802 in futex_wait_private (timeout=0x0, expected=<optimized out>, addr1=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bthread/sys_futex.h:41
   #2  wait (expected_state=..., this=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bthread/parking_lot.h:60
   #3  bthread::TaskGroup::wait_task (this=this@entry=0x7efc340008c0, tid=tid@entry=0x7efc44121a68) at /data/home/pluswu/incubator-brpc/src/bthread/task_group.cpp:124
   #4  0x00007efc59b378bb in bthread::TaskGroup::run_main_task (this=this@entry=0x7efc340008c0) at /data/home/pluswu/incubator-brpc/src/bthread/task_group.cpp:152
   #5  0x00007efc59b3360e in bthread::TaskControl::worker_thread (arg=0x9f70f20) at /data/home/pluswu/incubator-brpc/src/bthread/task_control.cpp:76
   #6  0x00007efc5ad43e25 in start_thread () from /lib64/libpthread.so.0
   #7  0x00007efc5786035d in clone () from /lib64/libc.so.6
   Thread 7 (Thread 0x7efc47fff700 (LWP 8732)):
   #0  0x00007efc5785a809 in syscall () from /lib64/libc.so.6
   #1  0x00007efc59b35802 in futex_wait_private (timeout=0x0, expected=<optimized out>, addr1=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bthread/sys_futex.h:41
   #2  wait (expected_state=..., this=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bthread/parking_lot.h:60
   #3  bthread::TaskGroup::wait_task (this=this@entry=0x7efc380008c0, tid=tid@entry=0x7efc47ffea68) at /data/home/pluswu/incubator-brpc/src/bthread/task_group.cpp:124
   #4  0x00007efc59b378bb in bthread::TaskGroup::run_main_task (this=this@entry=0x7efc380008c0) at /data/home/pluswu/incubator-brpc/src/bthread/task_group.cpp:152
   #5  0x00007efc59b3360e in bthread::TaskControl::worker_thread (arg=0x9f70f20) at /data/home/pluswu/incubator-brpc/src/bthread/task_control.cpp:76
   #6  0x00007efc5ad43e25 in start_thread () from /lib64/libpthread.so.0
   #7  0x00007efc5786035d in clone () from /lib64/libc.so.6
   Thread 6 (Thread 0x7efc477fe700 (LWP 8733)):
   #0  0x00007efc5785a809 in syscall () from /lib64/libc.so.6
   #1  0x00007efc59b35802 in futex_wait_private (timeout=0x0, expected=<optimized out>, addr1=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bthread/sys_futex.h:41
   #2  wait (expected_state=..., this=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bthread/parking_lot.h:60
   #3  bthread::TaskGroup::wait_task (this=this@entry=0x7efc2c0008c0, tid=tid@entry=0x7efc477fda68) at /data/home/pluswu/incubator-brpc/src/bthread/task_group.cpp:124
   #4  0x00007efc59b378bb in bthread::TaskGroup::run_main_task (this=this@entry=0x7efc2c0008c0) at /data/home/pluswu/incubator-brpc/src/bthread/task_group.cpp:152
   #5  0x00007efc59b3360e in bthread::TaskControl::worker_thread (arg=0x9f70f20) at /data/home/pluswu/incubator-brpc/src/bthread/task_control.cpp:76
   #6  0x00007efc5ad43e25 in start_thread () from /lib64/libpthread.so.0
   #7  0x00007efc5786035d in clone () from /lib64/libc.so.6
   Thread 5 (Thread 0x7efc46ffd700 (LWP 8734)):
   #0  0x00007efc5ad4a42d in __lll_lock_wait () from /lib64/libpthread.so.0
   #1  0x00007efc5ad45de6 in _L_lock_870 () from /lib64/libpthread.so.0
   #2  0x00007efc5ad45cdf in pthread_mutex_lock () from /lib64/libpthread.so.0
   #3  0x00007efc59b155d7 in unique_lock (mutex=..., this=<synthetic pointer>) at /data/home/pluswu/incubator-brpc/src/butil/scoped_lock.h:218
   #4  bvar::Variable::list_exposed (names=names@entry=0x7efc2235e540, display_filter=bvar::DISPLAY_ON_PLAIN_TEXT) at /data/home/pluswu/incubator-brpc/src/bvar/variable.cpp:212
   #5  0x00007efc59b16cc2 in bvar::Variable::dump_exposed (dumper=dumper@entry=0x7efc2235e930, poptions=poptions@entry=0x0) at /data/home/pluswu/incubator-brpc/src/bvar/variable.cpp:507
   #6  0x00007efc59b96201 in brpc::DumpPrometheusMetricsToIOBuf (output=output@entry=0x7efc300222b0) at /data/home/pluswu/incubator-brpc/src/brpc/builtin/prometheus_metrics_service.cpp:198
   #7  0x00007efc59b964b9 in brpc::PrometheusMetricsService::default_method (this=<optimized out>, cntl_base=0x7efc300220e0, done=0x7efc30022430) at /data/home/pluswu/incubator-brpc/src/brpc/builtin/prometheus_metrics_service.cpp:189
   #8  0x00007efc59cc047e in brpc::brpc_metrics::CallMethod (this=0x9f8d120, method=<optimized out>, controller=0x7efc300220e0, request=0x7efc300223f0, response=0x7efc30022410, done=0x7efc30022430) at /data/home/pluswu/incubator-brpc/brpc/builtin_service.pb.cc:8506
   #9  0x00007efc59c16b0f in brpc::policy::ProcessHttpRequest (msg=<optimized out>) at /data/home/pluswu/incubator-brpc/src/brpc/policy/http_rpc_protocol.cpp:1484
   #10 0x00007efc59bdbe6a in brpc::ProcessInputMessage (void_arg=void_arg@entry=0x7efc300211c0) at /data/home/pluswu/incubator-brpc/src/brpc/input_messenger.cpp:135
   #11 0x00007efc59bdcb83 in operator() (this=<optimized out>, last_msg=0x7efc300211c0) at /data/home/pluswu/incubator-brpc/src/brpc/input_messenger.cpp:141
   #12 brpc::InputMessenger::OnNewMessages (m=0x7efc2c01f600) at /usr/include/c++/4.8.2/bits/unique_ptr.h:184
   #13 0x00007efc59c8b1bd in brpc::Socket::ProcessEvent (arg=0x7efc2c01f600) at /data/home/pluswu/incubator-brpc/src/brpc/socket.cpp:1017
   #14 0x00007efc59b3764a in bthread::TaskGroup::task_runner (skip_remained=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bthread/task_group.cpp:295
   #15 0x00007efc59b20991 in bthread_make_fcontext () from /data/home/user00/server/lib/libbrpc.so
   #16 0x0000000000000000 in ?? ()
   Thread 4 (Thread 0x7efc467fc700 (LWP 8735)):
   #0  0x00007efc5785a809 in syscall () from /lib64/libc.so.6
   #1  0x00007efc59b35802 in futex_wait_private (timeout=0x0, expected=<optimized out>, addr1=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bthread/sys_futex.h:41
   #2  wait (expected_state=..., this=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bthread/parking_lot.h:60
   #3  bthread::TaskGroup::wait_task (this=this@entry=0x7efc240008c0, tid=tid@entry=0x7efc467fba68) at /data/home/pluswu/incubator-brpc/src/bthread/task_group.cpp:124
   #4  0x00007efc59b378bb in bthread::TaskGroup::run_main_task (this=this@entry=0x7efc240008c0) at /data/home/pluswu/incubator-brpc/src/bthread/task_group.cpp:152
   #5  0x00007efc59b3360e in bthread::TaskControl::worker_thread (arg=0x9f70f20) at /data/home/pluswu/incubator-brpc/src/bthread/task_control.cpp:76
   #6  0x00007efc5ad43e25 in start_thread () from /lib64/libpthread.so.0
   #7  0x00007efc5786035d in clone () from /lib64/libc.so.6
   Thread 3 (Thread 0x7efc45ffb700 (LWP 8736)):
   #0  0x00007efc5ad4a42d in __lll_lock_wait () from /lib64/libpthread.so.0
   #1  0x00007efc5ad45de6 in _L_lock_870 () from /lib64/libpthread.so.0
   #2  0x00007efc5ad45cdf in pthread_mutex_lock () from /lib64/libpthread.so.0
   #3  0x00007efc59b155d7 in unique_lock (mutex=..., this=<synthetic pointer>) at /data/home/pluswu/incubator-brpc/src/butil/scoped_lock.h:218
   #4  bvar::Variable::list_exposed (names=names@entry=0x7efc412ea540, display_filter=bvar::DISPLAY_ON_PLAIN_TEXT) at /data/home/pluswu/incubator-brpc/src/bvar/variable.cpp:212
   #5  0x00007efc59b16cc2 in bvar::Variable::dump_exposed (dumper=dumper@entry=0x7efc412ea930, poptions=poptions@entry=0x0) at /data/home/pluswu/incubator-brpc/src/bvar/variable.cpp:507
   #6  0x00007efc59b96201 in brpc::DumpPrometheusMetricsToIOBuf (output=output@entry=0x7efc28025710) at /data/home/pluswu/incubator-brpc/src/brpc/builtin/prometheus_metrics_service.cpp:198
   #7  0x00007efc59b964b9 in brpc::PrometheusMetricsService::default_method (this=<optimized out>, cntl_base=0x7efc28025540, done=0x7efc28025890) at /data/home/pluswu/incubator-brpc/src/brpc/builtin/prometheus_metrics_service.cpp:189
   #8  0x00007efc59cc047e in brpc::brpc_metrics::CallMethod (this=0x9f8d120, method=<optimized out>, controller=0x7efc28025540, request=0x7efc28025850, response=0x7efc28025870, done=0x7efc28025890) at /data/home/pluswu/incubator-brpc/brpc/builtin_service.pb.cc:8506
   #9  0x00007efc59c16b0f in brpc::policy::ProcessHttpRequest (msg=<optimized out>) at /data/home/pluswu/incubator-brpc/src/brpc/policy/http_rpc_protocol.cpp:1484
   #10 0x00007efc59bdbe6a in brpc::ProcessInputMessage (void_arg=void_arg@entry=0x7efc28024620) at /data/home/pluswu/incubator-brpc/src/brpc/input_messenger.cpp:135
   #11 0x00007efc59bdcb83 in operator() (this=<optimized out>, last_msg=0x7efc28024620) at /data/home/pluswu/incubator-brpc/src/brpc/input_messenger.cpp:141
   #12 brpc::InputMessenger::OnNewMessages (m=0x7efc48028890) at /usr/include/c++/4.8.2/bits/unique_ptr.h:184
   #13 0x00007efc59c8b1bd in brpc::Socket::ProcessEvent (arg=0x7efc48028890) at /data/home/pluswu/incubator-brpc/src/brpc/socket.cpp:1017
   #14 0x00007efc59b3764a in bthread::TaskGroup::task_runner (skip_remained=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bthread/task_group.cpp:295
   #15 0x00007efc59b20991 in bthread_make_fcontext () from /data/home/user00/server/lib/libbrpc.so
   #16 0x0000000000000000 in ?? ()
   Thread 2 (Thread 0x7efc457fa700 (LWP 8737)):
   #0  0x00007efc5785a809 in syscall () from /lib64/libc.so.6
   #1  0x00007efc59b35802 in futex_wait_private (timeout=0x0, expected=<optimized out>, addr1=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bthread/sys_futex.h:41
   #2  wait (expected_state=..., this=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bthread/parking_lot.h:60
   #3  bthread::TaskGroup::wait_task (this=this@entry=0x7efc1c0008c0, tid=tid@entry=0x7efc457f9a68) at /data/home/pluswu/incubator-brpc/src/bthread/task_group.cpp:124
   #4  0x00007efc59b378bb in bthread::TaskGroup::run_main_task (this=this@entry=0x7efc1c0008c0) at /data/home/pluswu/incubator-brpc/src/bthread/task_group.cpp:152
   #5  0x00007efc59b3360e in bthread::TaskControl::worker_thread (arg=0x9f70f20) at /data/home/pluswu/incubator-brpc/src/bthread/task_control.cpp:76
   #6  0x00007efc5ad43e25 in start_thread () from /lib64/libpthread.so.0
   #7  0x00007efc5786035d in clone () from /lib64/libc.so.6
   Thread 1 (Thread 0x7efc5b04dac0 (LWP 8716)):
   #0  0x00007efc5ad4a42d in __lll_lock_wait () from /lib64/libpthread.so.0
   #1  0x00007efc5ad45de6 in _L_lock_870 () from /lib64/libpthread.so.0
   #2  0x00007efc5ad45cdf in pthread_mutex_lock () from /lib64/libpthread.so.0
   #3  0x00007efc59b14eed in lock_guard (mutex=..., this=<synthetic pointer>) at /data/home/pluswu/incubator-brpc/src/butil/scoped_lock.h:163
   #4  bvar::Variable::hide (this=this@entry=0x7efc5a1f7f00 <bvar::g_minflt_second>) at /data/home/pluswu/incubator-brpc/src/bvar/variable.cpp:189
   #5  0x00007efc59af899f in ~WindowBase (this=0x7efc5a1f7f00 <bvar::g_minflt_second>, __in_chrg=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bvar/window.h:88
   #6  bvar::PerSecond<bvar::PassiveStatus<unsigned long> >::~PerSecond (this=0x7efc5a1f7f00 <bvar::g_minflt_second>, __in_chrg=<optimized out>) at /data/home/pluswu/incubator-brpc/src/bvar/window.h:197
   #7  0x00007efc577a0dda in __cxa_finalize () from /lib64/libc.so.6
   #8  0x00007efc59aa3023 in __do_global_dtors_aux () from /data/home/user00/server/lib/libbrpc.so
   #9  0x00007ffd9f1a6660 in ?? ()
   #10 0x00007efc5af67b3a in _dl_fini () from /lib64/ld-linux-x86-64.so.2


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] pluswu commented on issue #1335: bvar::Variable::dump_exposed 时死锁

Posted by GitBox <gi...@apache.org>.
pluswu commented on issue #1335:
URL: https://github.com/apache/incubator-brpc/issues/1335#issuecomment-768246895


   本质还是静态数据初始化 多线程与fork顺序不确定性导致的 暂时通过将默认bvar延迟到main函数之后初始化规避这个问题


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] pluswu commented on issue #1335: 进程停止时死锁

Posted by GitBox <gi...@apache.org>.
pluswu commented on issue #1335:
URL: https://github.com/apache/incubator-brpc/issues/1335#issuecomment-765956219


   看上去和这个类似 https://github.com/apache/incubator-brpc/issues/1085  我这边验证多次发现如果进程用nohup方式启动没有问题 如果用系统api实现daemon就会在导出bvar信息时 固定在下面这里死锁
   #3 0x00007efc59afaf79 in lock (this=) at /data/home/pluswu/incubator-brpc/src/butil/synchronization/lock.h:69
   #4 lock_guard (__m=..., this=) at /usr/include/c++/4.8.2/mutex:414
   #5 get_value (result=, window_size=10, this=) at /data/home/pluswu/incubator-brpc/src/bvar/detail/sampler.h:149
   #6 get_span (this=, result=, window_size=10) at /data/home/pluswu/incubator-brpc/src/bvar/window.h:96
   #7 bvar::PerSecond<bvar::PassiveStatus >::get_value (this=, window_size=10) at /data/home/pluswu/incubator-brpc/src/bvar/window.h:225
   #8 0x00007efc59af71e6 in get_value (this=) at /data/home/pluswu/incubator-brpc/src/bvar/window.h:111
   #9 bvar::detail::WindowBase<bvar::PassiveStatus, (bvar::SeriesFrequency)1>::describe (this=, os=..., quote_string=) at /data/home/pluswu/incubator-brpc/src/bvar/window.h:117
   #10 0x00007efc59b14d35 in bvar::Variable::describe_exposed (name="process_faults_minor_second", os=..., quote_string=, display_filter=bvar::DISPLAY_ON_PLAIN_TEXT) at /data/home/pluswu/incubator-brpc/src/bvar/variable.cpp:257


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] pluswu commented on issue #1335: bvar::Variable::dump_exposed 时死锁

Posted by GitBox <gi...@apache.org>.
pluswu commented on issue #1335:
URL: https://github.com/apache/incubator-brpc/issues/1335#issuecomment-767322555


   最小可复现代码
   
   #include <gflags/gflags.h>
   #include <brpc/channel.h>
   #include <brpc/server.h>
   
   #include <sys/stat.h>
   #include <sys/types.h>
   #include <sys/utsname.h>
   #include "linux/limits.h"
   
   #include <signal.h>
   void make_daemon()
   {
   	pid_t pid;
   
   	pid = fork() ;
   
   	if (pid != 0)
   		exit(0);
   
   	setsid();
   
   	signal(SIGINT,  SIG_IGN);
   	signal(SIGHUP,  SIG_IGN);
   	signal(SIGQUIT, SIG_IGN);
   	signal(SIGPIPE, SIG_IGN);
   	signal(SIGTTOU, SIG_IGN);
   	signal(SIGTTIN, SIG_IGN);
   	signal(SIGCHLD, SIG_IGN);
   	signal(SIGTERM, SIG_IGN);
   	signal(SIGHUP,  SIG_IGN);
   
   	pid = fork() ;
   
   	if (pid != 0)
   		exit(0);
   
   	umask(0);
   }
   
   int main()
   {
       make_daemon();
       brpc::StartDummyServerAt(8080);
       while (true)
       {
           sleep(1);
       }
       return 0;
   }


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] pluswu closed issue #1335: bvar::Variable::dump_exposed 时死锁

Posted by GitBox <gi...@apache.org>.
pluswu closed issue #1335:
URL: https://github.com/apache/incubator-brpc/issues/1335


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org