-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
brokerProducer is nil, panic #2184
Comments
Hi @crcms Can you please test this with #2182 ? Thank you! |
Line 560 for Would you be able to post the panic trace, confirm the version and ideally provide some Sarama logs? Also what do you mean by |
@slaunay I am just disconnecting the network during the running process. |
@crcms if you can share the panic trace that would go a long way. |
@slaunay This is a stack of panic.
This is a must-have BUG, as long as you interrupt the network in the running process, this problem will occur about 3-5 minutes, and the number of retries set by Producer is the default. |
Already testing, still has question |
Thanks @crcms, the stack points us to line One scenario that would lead to the We need a unit test case to reproduce the issue in order to implement the proper fix. |
We are having the same issue, any updates on this? edit: sarama v1.34.0 (go 1.19) with kafka v2.4.1 |
As this seems to be related, on our production system (sarama v1.36.0, go 1.19; kafka v2.8.0) a pod just crashed with:
Are there any updates on this? @crcms You mentioned that this is a must have BUG? So is this panic expected behavior if there is a connection issue for some minutes? |
I face the same issue |
got the same issue with sarama@1.37.2 on prod when we lost our kafka:
|
We also see this segfault when the broker goes away. Sarama version 1.31.1 (2022-02-01).
|
Just met the issue on sarama v1.29.1, any updates to solve it?
|
I have a currently feasible mitigation solution: first set the panic handler, rebuild all producers when any panic is caught, and because the panic handler is set, the producer will not automatically close when the producer internally crashes, and the input channel will be fast is filled and blocked, a producer rebuild is also required when this is detected. |
got the same issue:
|
seems this issue was fixed by:fix: add nil check while producer is retrying ( |
Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur. |
Closing as fixed by #2387 |
Versions
Problem Description
This is not an inevitable situation, but it happens many times
This is a crash triggered by
brokerProducer=nil
Test scenario:
A message is sent every second, and the network connection is interrupted during the sending process. During the process, the producer will asynchronously close the producer, and Panic will occur in some cases in about 3-5 minutes
In
github.com/Shopify/sarama/async_producer.go
560 linesI also took a quick look at the Dispatch method, but couldn't figure out the specific reason
This problem, only in 1.32.0, I have tested other versions without this problem
The text was updated successfully, but these errors were encountered: