apache / rocketmq

Apache RocketMQ is a cloud native messaging and streaming platform, making it simple to build event-driven applications.
https://rocketmq.apache.org/
Apache License 2.0
21.26k stars 11.7k forks source link

[Bug] The producer groupChannelTable memory leak #8673

Closed yuz10 closed 2 months ago

yuz10 commented 2 months ago

Before Creating the Bug Report

Runtime platform environment

Ubuntu 24.04

RocketMQ version

4.9.x

JDK Version

1.8.0

Describe the Bug

The groupChannelTable key is producerGroup, value is a Map of channels. when the value map is empty, the entry is not removed.

the HeartbeatThread is blocked and requests fail fast. image

image

Steps to Reproduce

Start and shutdown producer with random producer group.

What Did You Expect to See?

The groupChannelTable is clean after producer shutdown.

What Did You See Instead?

The producerGroup remains in groupChannelTable, after producer shutdown.

Additional Context

No response