yqynju opened a new issue #1256: URL: https://github.com/apache/incubator-brpc/issues/1256
**Describe the bug (描述bug)** bvar::LatencyRecorder 使用时,记录时延: g_latency_recorder << cntl.latency_us(); 多线程并发,会coredump。 堆栈如下: 2020-09-25 10:28:03|kr_server|FATAL|/bvar/detail/agent_group.h:133] Check failed: false. Invalid id=-1 #0 0x55d30b5f6ffb bvar::detail::AgentGroup<>::get_or_create_tls_agent() #1 0x55d30b5f727f bvar::IntRecorder::operator<<() #2 0x55d30b5f3eac bvar::LatencyRecorder::operator<<() #3 0x55d30b54317e xxWrapper::xxx() //代码为: g_latency_recorder << cntl.latency_us(); 未加锁 #4 0x55d30b543803 xxWrapper::xxx() #5 0x55d30b5460b5 std::_Function_handler<>::_M_invoke() #6 0x55d30b53e478 segment::ThreadPool::runInThread() #7 0x7ffa39b50900 <unknown> #8 0x7ffa39daae45 start_thread #9 0x7ffa392b7add __clone ---------------------------------------------------------------- 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: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
