apache / apache/rocketmq-client-cpp

Got crash when calling rocketmq::LogUtil::LogMessageFull

未關閉
#446 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C++
星號
393
分支
167
PR 合併指標
30 天內沒有已合併 PR

描述

1. Please describe the issue you observed:
Since Jul 13 2021, our rmq-client-cpp was really stable in the production environment, it's version is "2.2.0"; but got crashed today, below is the trace:

(gdb) bt
#0 0x00007f5664f785f7 in raise () from /lib64/libc.so.6
#1 0x00007f5664f79ce8 in abort () from /lib64/libc.so.6
#2 0x00007f5664fb8317 in __libc_message () from /lib64/libc.so.6
#3 0x00007f5664fbffe1 in _int_free () from /lib64/libc.so.6
#4 0x00007f56658da71b in std::string::reserve(unsigned long) () from /lib64/libstdc++.so.6
#5 0x00007f56658da93f in std::string::append(char const*, unsigned long) () from /lib64/libstdc++.so.6
#6 0x000000000058b5e2 in boost::log::v2s_mt_posix::basic_formatting_ostream, std::allocator >::formatted_write(char const*, long) ()
#7 0x000000000058b908 in rocketmq::LogUtil::LogMessageFull(boost::log::v2s_mt_posix::trivial::severity_level, char const*, char const*, int, char const*, ...) ()
#8 0x00000000005e8c3a in rocketmq::TcpRemotingClient::invokeAsync(std::string const&, rocketmq::RemotingCommand&, std::shared_ptr, long long, int, int) ()
#9 0x00000000005a343b in rocketmq::MQClientAPIImpl::pullMessageAsync(std::string const&, rocketmq::RemotingCommand&, int, rocketmq::PullCallback*, void*) ()
#10 0x00000000005a51ac in rocketmq::MQClientAPIImpl::pullMessage(std::string const&, rocketmq::PullMessageRequestHeader*, int, int, rocketmq::PullCallback*, void*, rocketmq::SessionCredentials const&) ()
#11 0x000000000067dbba in rocketmq::PullAPIWrapper::pullKernelImpl(rocketmq::MQMessageQueue const&, std::string, long long, long long, int, int, long long, int, int, int, rocketmq::PullCallback*, rocketmq::SessionCredentials const&, void*) ()
#12 0x00000000006210d5 in rocketmq::DefaultMQPushConsumerImpl::pullMessageAsync(boost::weak_ptr) ()
#13 0x000000000062398a in rocketmq::Task rocketmq::TaskBinder::gen, boost::shared_ptr >(void (rocketmq::DefaultMQPushConsumerImpl::*)(boost::weak_ptr), rocketmq::DefaultMQPushConsumerImpl*, boost::shared_ptr)::lambda::run() ()
#14 0x000000000067575b in boost::asio::detail::completion_handler, boost::_bi::list3, boost::_bi::value, boost::_bi::value > > >::do_complete(boost::asio::detail::task_io_service*, boost::asio::detail::task_io_service_operation*, boost::system::error_code const&, unsigned long) ()
#15 0x0000000000599de1 in boost::asio::detail::task_io_service::run(boost::system::error_code&) ()
#16 0x00000000005ea126 in boost::asio::io_service::run() ()
#17 0x00000000005cc01f in thread_proxy ()
#18 0x00007f566614cdc5 in start_thread () from /lib64/libpthread.so.0
#19 0x00007f566503921d in clone () from /lib64/libc.so.6

2. Please tell us about your environment:

- What is your OS?
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"

- What is your client version?

V 2.2.0

- What is your RocketMQ version?

V4_8_0

3. Other information (e.g. detailed explanation, logs, related issues, suggestions on how to fix, etc):

和以往不同的是这个时刻rmq 打出了大量的日志
![image](https://user-images.githubusercontent.com/10396799/197983546-6dd3d8a8-eee6-4558-86f0-e038230afbfb.png)

Can we solve the problem by upgrading the the rocketmq-client-cpp version to V5.0.0 ?
By the way, our program use 15G memory, and the machine have 62G memory total.

貢獻指南

開啟貢獻指南

研究方向

Start at rocketmq::LogUtil::LogMessageFull in the stack trace, then follow its call from TcpRemotingClient::invokeAsync during pullMessageAsync. The payload names no source file, reproducer, or test; done means isolating the cause of the crash under heavy logging and documenting a verified correction or reproduction.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
cpp
領域
backend, distributed-systems
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。