takagi906 opened a new issue, #1083:
URL: https://github.com/apache/rocketmq-clients/issues/1083

   ### 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-clients/discussions).
   
   - [x] I have searched the [GitHub 
Issues](https://github.com/apache/rocketmq-clients/issues) and [GitHub 
Discussions](https://github.com/apache/rocketmq-clients/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.
   
   
   ### Programming Language of the Client
   
   Go
   
   ### Runtime Platform Environment
   
   macos arm64
   
   ### RocketMQ Version of the Client/Server
   
   latest
   
   ### Run or Compiler Version
   
   golang 1.24.5
   
   ### Describe the Bug
   
   Golang SDK startup failure can cause panic instead of graceful exit.
   
   golang sdk 启动失败会导致panic而不是优雅退出
   
   ### Steps to Reproduce
   
   Using an incorrect endpoint and then starting a consumer or producer has a 
5% chance of causing runtime error: invalid memory address or nil pointer 
dereference.
   
   使用一个错误的endpoint,然后start consumer 或者 producer,5%的概率会导致runtime error: invalid 
memory address or nil pointer dereference
   
   ### What Did You Expect to See?
   
   Elegant exit, throwing error
   
   优雅退出,抛出error
   
   ### What Did You See Instead?
   
   <img width="1922" height="424" alt="Image" 
src="https://github.com/user-attachments/assets/59d518e2-735d-4918-993a-ef779811957c";
 />
   
   ### Additional Context
   
   The reason is that although tp.shutdown is closed earlier than tp.tasks, 
some threads may discover that tp.tasks is closed first, receive an empty t, 
and throw an exception
   这个原因是虽然 tp.shutdown 早于 tp.tasks关闭,但是有线程可能会先发现 tp.tasks 关闭,收到一个空的t,导致抛出异常


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to