Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

进程stop时死锁在bvar::detail::Sampler::destroy #1280

Closed
pluswu opened this issue Oct 27, 2020 · 4 comments
Closed

进程stop时死锁在bvar::detail::Sampler::destroy #1280

pluswu opened this issue Oct 27, 2020 · 4 comments

Comments

@pluswu
Copy link

pluswu commented Oct 27, 2020

进程本省时daemon运行的(目前brpc只使用了dummyserver功能,设置了run_command_through_clone=false,通过信号stop时 会死锁
0x00007fa64e8be55d in __lll_lock_wait () from /lib64/libpthread.so.0
#1 0x00007fa64e8b9eab in _L_lock_883 () from /lib64/libpthread.so.0
#2 0x00007fa64e8b9d78 in pthread_mutex_lock () from /lib64/libpthread.so.0
#3 0x00007fa64d6943f6 in lock (this=0x8df67f0) at ./src/butil/synchronization/lock.h:69
#4 bvar::detail::Sampler::destroy (this=0x8df67d0) at src/bvar/detail/sampler.cpp:205
#5 0x00007fa64d68450d in ~WindowBase (this=0x7fa64dd6c0a0 bvar::g_minflt_second, __in_chrg=) at ./src/bvar/window.h:90
#6 bvar::PerSecond<bvar::PassiveStatus >::~PerSecond (this=0x7fa64dd6c0a0 bvar::g_minflt_second, __in_chrg=) at ./src/bvar/window.h:197
#7 0x00007fa64b4aa07a in __cxa_finalize () from /lib64/libc.so.6
#8 0x00007fa64d61fe43 in __do_global_dtors_aux () from /data/home/pluswu/Projects/StoryofSeasons/proj/server/common/extern/brpc/libbrpc.so
#9 0x00007ffda6da19c0 in ?? ()

Versions (各种版本)
OS:
Compiler:
brpc:
protobuf:

Additional context/screenshots (更多上下文/截图)

@pluswu
Copy link
Author

pluswu commented Oct 27, 2020

如果进程不使用daemon方式运行 通过信号能stop成功

@pluswu
Copy link
Author

pluswu commented Oct 27, 2020

看到有pull #1278 解决这个问题了 close

@pluswu pluswu closed this as completed Oct 27, 2020
@acelyc111
Copy link
Member

看到有pull #1278 解决这个问题了 close

@pluswu 咦?看上去跟那个pr没有联系啊

@pluswu
Copy link
Author

pluswu commented Oct 30, 2020

@acelyc111 sorry贴错了应该是#1200 用atomic替换锁那个

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants