apache / rocketmq-clients

RocketMQ Clients - Collection of Client Bindings for Apache RocketMQ
https://rocketmq.apache.org/
Apache License 2.0
327 stars 214 forks source link

[Bug] rocketmq::Producer对象析构crash #738

Closed bluevideo closed 5 months ago

bluevideo commented 6 months ago

Before Creating the Bug Report

Programming Language of the Client

C++

Runtime Platform Environment

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" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"

RocketMQ Version of the Client/Server

rocketmq-clients cpp 5.0.1

Run or Compiler Version

c++ 11

Describe the Bug

在一个函数内部创建了一个rocketmq::Producer, 注册的topic还没有在控制台创建, 出了函数作用域rocketmq::Producer析构. 程序crash

[2024-04-22 18:41:01.045] [info] [ClientImpl.cpp:304] Create inflight route query cache for topic=algorithm_topic [2024-04-22 18:41:01.051] [warning] [ClientManagerImpl.cpp:602] TopicNotFound: CODE: 17 DESC: No topic route info in name server for the topic: algorithm_topic For more information, please visit the url, https://rocketmq.apache.org/docs/bestPractice/06FAQ. Host=dns:xxx:8080 [2024-04-22 18:41:01.051] [warning] [ClientImpl.cpp:328] Failed to resolve route for topic=algorithm_topic from dns:xxx:8080 [2024-04-22 18:41:01.051] [info] [ClientImpl.cpp:331] Change current name server from dns:xxx:8080 to dns:xxx:8080 [2024-04-22 18:41:01.051] [warning] [ClientImpl.cpp:438] Yuck! route for algorithm_topic is invalid. Cause: Request resource not found, which should be created through console or administration API before hand. [2024-04-22 18:41:01.051] [error] [ClientImpl.cpp:146] Failed to query route for algorithm_topic during starting. Cause: Request resource not found, which should be created through console or administration API before hand. [2024-04-22 18:41:01.052] [error] [ClientImpl.cpp:217] Unknown metric address scheme [2024-04-22 18:41:01.052] [info] [ClientImpl.cpp:194] Export client metrics to xxx:8081 [2024-04-22 18:41:16.298] [info] [SchedulerImpl.cpp:165] Execute task: route_updater. Use-count: 2 [2024-04-22 18:41:16.298] [info] [SchedulerImpl.cpp:165] Execute task: heartbeat-task. Use-count: 2 [2024-04-22 18:41:16.298] [warning] [ClientImpl.cpp:389] No hosts to send heartbeat to at present [2024-04-22 18:41:16.298] [info] [SchedulerImpl.cpp:165] Execute task: heartbeat-task. Use-count: 2 [2024-04-22 18:41:16.298] [warning] [ClientImpl.cpp:389] No hosts to send heartbeat to at present [2024-04-22 18:41:16.299] [info] [ProducerImpl.cpp:62] Producer instance is destructed [2024-04-22 18:41:16.299] [info] [SchedulerImpl.cpp:155] Cancel task[task-id=2, name=route_updater] [2024-04-22 18:41:16.299] [info] [SchedulerImpl.cpp:155] Cancel task[task-id=3, name=client_settings_sync] [2024-04-22 18:41:16.299] [info] [ClientManagerImpl.cpp:122] Client manager shutdown [2024-04-22 18:41:16.308] [info] [SchedulerImpl.cpp:155] Cancel task[task-id=1, name=heartbeat-task] [2024-04-22 18:41:16.309] [info] [ClientManagerImpl.cpp:92] ClientManager[ResourceNamespace=] destructed [2024-04-22 18:41:16.309] [info] [ProducerImpl.cpp:91] Producer instance stopped [2024-04-22 18:41:16.309] [info] [TelemetryBidiReactor.cpp:297] dns:xxx:8080#fireClose [2024-04-22 18:41:16.398] [warning] [RpcClientImpl.cpp:52] ClientManager has destructed. Response ignored [2024-04-22 18:41:39.693] [info] [TelemetryBidiReactor.cpp:297] dns:xxx:8080#fireClose

rocketmq::Producer对象不能析构吗?

Steps to Reproduce

能够正常析构

What Did You Expect to See?

能够正常析构

What Did You See Instead?

能够正常析构

Additional Context

能够正常析构

github-actions[bot] commented 5 months ago

This issue is stale because it has been open for 30 days with no activity. It will be closed in 3 days if no further activity occurs.

github-actions[bot] commented 5 months ago

This issue was closed because it has been inactive for 3 days since being marked as stale.