weihubeats opened a new issue, #8970: URL: https://github.com/apache/rocketmq/issues/8970
### Before Creating the Bug Report - [X] I found a bug, not just asking a question, which should be created in [GitHub Discussions](https://github.com/apache/rocketmq/discussions). - [X] I have searched the [GitHub Issues](https://github.com/apache/rocketmq/issues) and [GitHub Discussions](https://github.com/apache/rocketmq/discussions) of this repository and believe that this is not a duplicate. - [X] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ. ### Runtime platform environment Runtime platform environment Ubuntu 22.04.2 LTS ### RocketMQ version 5.1.0 ### JDK Version 1.8 ### Describe the Bug Currently when the consumer starts it calls sendHeartbeatToAllBrokerWithLock and then acquires the lock! ![image](https://github.com/user-attachments/assets/3e707d81-1120-45b4-bd77-01a01d751ed9) However, when sending a heartbeat message to the broker, the onChannelActive event is triggered to send the heartbeat again. ![image](https://github.com/user-attachments/assets/c52014eb-d63a-496f-aa43-bc3dc758f4d3) But at this point lockHeartbeat is already held, so lock heartBeat must be triggered here, but failed ![image](https://github.com/user-attachments/assets/828c0548-b6bd-4272-b1de-01595b92febb) ### Steps to Reproduce The issue can be consistently reproduced by simply starting up the consumer normally ### What Did You Expect to See? no lock heartBeat, but failed ### What Did You See Instead? lock heartBeat, but failed ### Additional Context _No response_ -- 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. To unsubscribe, e-mail: commits-unsubscr...@rocketmq.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org