You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@brpc.apache.org by "chentingkai00301 (via GitHub)" <gi...@apache.org> on 2025/09/23 09:05:40 UTC
[I] TimerThread 没有正常初始卡在butil::PlatformThread::SetName("brpc_timer") (brpc)
chentingkai00301 opened a new issue, #3104:
URL: https://github.com/apache/brpc/issues/3104
**Describe the bug**
TimerThread初始化时, 长时间处于这种状态(额外有两个线程无法gdb看栈信息,bt就直接退出),卡住时的栈图如下,
<img width="1789" height="758" alt="Image" src="https://github.com/user-attachments/assets/94962fdb-ae4e-45db-bd90-59bdb7d9f44d" />
**To Reproduce**
**Expected behavior**
**Versions**
OS: centos8/ubuntu22.04
Compiler:
brpc: release-1.9
protobuf: 3.5.0-15
**Additional context/screenshots**
--
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: issues-unsubscribe@brpc.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@brpc.apache.org
For additional commands, e-mail: issues-help@brpc.apache.org
Re: [I] TimerThread 没有正常初始卡在butil::PlatformThread::SetName("brpc_timer") (brpc)
Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright commented on issue #3104:
URL: https://github.com/apache/brpc/issues/3104#issuecomment-3448099163
@chentingkai00301 试试#3127 ,只设置线程名,不做复杂的管理逻辑(不需要Singleton)。
--
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: issues-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@brpc.apache.org
For additional commands, e-mail: issues-help@brpc.apache.org
Re: [I] TimerThread 没有正常初始卡在butil::PlatformThread::SetName("brpc_timer") (brpc)
Posted by "chentingkai00301 (via GitHub)" <gi...@apache.org>.
chentingkai00301 commented on issue #3104:
URL: https://github.com/apache/brpc/issues/3104#issuecomment-3389117433
有两个brpc相关的线程无法查看栈,gdb查看这两个线程的栈就退出了,也无法用pstack打印出所有线程的栈。
--
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: issues-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@brpc.apache.org
For additional commands, e-mail: issues-help@brpc.apache.org
Re: [I] TimerThread 没有正常初始卡在butil::PlatformThread::SetName("brpc_timer") (brpc)
Posted by "chentingkai00301 (via GitHub)" <gi...@apache.org>.
chentingkai00301 commented on issue #3104:
URL: https://github.com/apache/brpc/issues/3104#issuecomment-3584840197
> [@chentingkai00301](https://github.com/chentingkai00301) [#3127](https://github.com/apache/brpc/pull/3127) 不适用锁之后,能解决问题吗?
能解决问题。
--
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: issues-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@brpc.apache.org
For additional commands, e-mail: issues-help@brpc.apache.org
Re: [I] TimerThread 没有正常初始卡在butil::PlatformThread::SetName("brpc_timer") (brpc)
Posted by "yanglimingcn (via GitHub)" <gi...@apache.org>.
yanglimingcn commented on issue #3104:
URL: https://github.com/apache/brpc/issues/3104#issuecomment-3392783715
> 有两个brpc相关的线程无法查看栈,gdb查看这两个线程的栈就退出了,也无法用pstack打印出所有线程的栈。
我们都没遇到过类似问题,我感觉和环境比较相关。
--
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: issues-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@brpc.apache.org
For additional commands, e-mail: issues-help@brpc.apache.org
Re: [I] TimerThread 没有正常初始卡在butil::PlatformThread::SetName("brpc_timer") (brpc)
Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright closed issue #3104: TimerThread 没有正常初始卡在butil::PlatformThread::SetName("brpc_timer")
URL: https://github.com/apache/brpc/issues/3104
--
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: issues-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@brpc.apache.org
For additional commands, e-mail: issues-help@brpc.apache.org
Re: [I] TimerThread 没有正常初始卡在butil::PlatformThread::SetName("brpc_timer") (brpc)
Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright commented on issue #3104:
URL: https://github.com/apache/brpc/issues/3104#issuecomment-3521404068
@chentingkai00301 #3127 不适用锁之后,能解决问题吗?
--
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: issues-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@brpc.apache.org
For additional commands, e-mail: issues-help@brpc.apache.org
Re: [I] TimerThread 没有正常初始卡在butil::PlatformThread::SetName("brpc_timer") (brpc)
Posted by "chentingkai00301 (via GitHub)" <gi...@apache.org>.
chentingkai00301 commented on issue #3104:
URL: https://github.com/apache/brpc/issues/3104#issuecomment-3399601174
<img width="689" height="611" alt="Image" src="https://github.com/user-attachments/assets/e7def885-2fb0-405b-b37b-15879c125f24" />
其他线程在276行等待,第一个线程应该执行259~272行的内容。第一个线程执行266行后,其他等待的线程也就可以返回了。但是现在不知道第一个线程是什么原因卡住了,导致没有初始化完instance。
--
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: issues-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@brpc.apache.org
For additional commands, e-mail: issues-help@brpc.apache.org
Re: [I] TimerThread 没有正常初始卡在butil::PlatformThread::SetName("brpc_timer") (brpc)
Posted by "chentingkai00301 (via GitHub)" <gi...@apache.org>.
chentingkai00301 commented on issue #3104:
URL: https://github.com/apache/brpc/issues/3104#issuecomment-3520813867
目前分析定位的原因时: fork引起的,在112行设置SetName时,进行了fork操作。
<img width="658" height="221" alt="Image" src="https://github.com/user-attachments/assets/24333758-c5a3-4bca-a418-e28aed885812" />
--
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: issues-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@brpc.apache.org
For additional commands, e-mail: issues-help@brpc.apache.org
Re: [I] TimerThread 没有正常初始卡在butil::PlatformThread::SetName("brpc_timer") (brpc)
Posted by "yanglimingcn (via GitHub)" <gi...@apache.org>.
yanglimingcn commented on issue #3104:
URL: https://github.com/apache/brpc/issues/3104#issuecomment-3388806425
把所有线程的栈都打印出来呢?
--
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: issues-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@brpc.apache.org
For additional commands, e-mail: issues-help@brpc.apache.org
Re: [I] TimerThread 没有正常初始卡在butil::PlatformThread::SetName("brpc_timer") (brpc)
Posted by "chentingkai00301 (via GitHub)" <gi...@apache.org>.
chentingkai00301 commented on issue #3104:
URL: https://github.com/apache/brpc/issues/3104#issuecomment-3480505158
> [@chentingkai00301](https://github.com/chentingkai00301) 试试[#3127](https://github.com/apache/brpc/pull/3127) ,只设置线程名,不做复杂的管理逻辑(不需要Singleton)。
我更新尝试一下。
--
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: issues-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@brpc.apache.org
For additional commands, e-mail: issues-help@brpc.apache.org
Re: [I] TimerThread 没有正常初始卡在butil::PlatformThread::SetName("brpc_timer") (brpc)
Posted by "wwbmmm (via GitHub)" <gi...@apache.org>.
wwbmmm commented on issue #3104:
URL: https://github.com/apache/brpc/issues/3104#issuecomment-3399865814
> 其他线程在276行等待,第一个线程应该执行259~272行的内容。第一个线程执行266行后,其他等待的线程也就可以返回了。但是现在不知道第一个线程是什么原因卡住了,导致没有初始化完instance。
能看到第一个线程的堆栈吗?如果bt命令看不了可以尝试通过寄存器来查看,例如x86_64下可以使用 x/64gx $rsp 从栈顶看 64个 8 字节项
--
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: issues-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@brpc.apache.org
For additional commands, e-mail: issues-help@brpc.apache.org
Re: [I] TimerThread 没有正常初始卡在butil::PlatformThread::SetName("brpc_timer") (brpc)
Posted by "wwbmmm (via GitHub)" <gi...@apache.org>.
wwbmmm commented on issue #3104:
URL: https://github.com/apache/brpc/issues/3104#issuecomment-3393985808
现在看到的这几个线程都是在等待锁,感觉不是真正的问题现场,应该有一个线程持有锁,然后那个线程异常卡住了,导致其他线程也都在等待锁。
--
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: issues-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@brpc.apache.org
For additional commands, e-mail: issues-help@brpc.apache.org