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

Got crash when calling rocketmq::LogUtil::LogMessageFull #446

Open
wxyBUPT opened this issue Oct 26, 2022 · 2 comments
Open

Got crash when calling rocketmq::LogUtil::LogMessageFull #446

wxyBUPT opened this issue Oct 26, 2022 · 2 comments

Comments

@wxyBUPT
Copy link

wxyBUPT commented Oct 26, 2022

  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<char, std::char_traits, 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_ptrrocketmq::AsyncCallbackWrap, 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_ptrrocketmq::PullRequest) ()
#13 0x000000000062398a in rocketmq::Task rocketmq::TaskBinder::gen<rocketmq::DefaultMQPushConsumerImpl, void, boost::weak_ptrrocketmq::PullRequest, boost::shared_ptrrocketmq::PullRequest >(void (rocketmq::DefaultMQPushConsumerImpl::)(boost::weak_ptrrocketmq::PullRequest), rocketmq::DefaultMQPushConsumerImpl, boost::shared_ptrrocketmq::PullRequest)::lambda::run() ()
#14 0x000000000067575b in boost::asio::detail::completion_handler<boost::_bi::bind_t<void, boost::_mfi::mf2<void, rocketmq::taskBatchHandler, rocketmq::Task, long>, boost::_bi::list3<boost::_bi::valuerocketmq::taskBatchHandler*, boost::_bi::valuerocketmq::Task, 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

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

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

和以往不同的是这个时刻rmq 打出了大量的日志
image

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.

@15835479638
Copy link

15835479638 commented Sep 3, 2024

请问这个问题解决了么?我也遇到了同样的问题。看着像是并发调用producer.start 导致的。但是我还不太确定。求大神。

  • 场景
    python scheduler定时任务中,多线程生产消息事件

  • 环境:
    Static hostname: centos85-template
    Icon name: computer-vm
    Chassis: vm
    Machine ID: dd92276a5b154cf780ffa63d58bb932a
    Boot ID: 268c970cb1814ef192968bc8ec937cc5
    Virtualization: kvm
    Operating System: CentOS Linux 8
    CPE OS Name: cpe:/o:centos:centos:8
    Kernel: Linux 4.18.0-348.el8.x86_64
    Architecture: x86-64

  • MQ版本:
    5.1.0

@15835479638
Copy link

多线程并发start\shutdown会有问题。修改项目启动的时候初始化解决了。

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