-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
segmentation fault from rdkafka_topic.c #4907
Comments
I encountered the same issue. When I stop the Kafka service, delete all Kafka logs, and then restart the service, many applications using Kafka generate core dumps. When debugging the core files, I found that |
Read the FAQ first: https://github.com/confluentinc/librdkafka/wiki/FAQ
Do NOT create issues for questions, use the discussion forum: https://github.com/confluentinc/librdkafka/discussions
Description
Hello!
I am reporting a segmentation fault.
I will explain briefly because the symptoms and code are clear.
In the rd_kafka_topic_metadata_update() function of rdkafka_topic.c, a NULL reference exception occurs on a variable rktp.
In v2.6.0, the rktp variable is referenced at line 1390.
After analyzing the code for a short time, I found that a null check was missing.
In simple terms,
if (unlikely(!rktp)) {
rd_kafka_dbg(~~~);
return;
}
This code was missing.
I found this problem when I tried to test the problem when the broker was restarted repeatedly.
It is not always the case, but about once in dozens of times, the rktp pointer becomes NULL.
However, since I cannot write an issue at work, I am writing it simply at home without a call stack and screenshots.
Since my company uses librdkafka on at least a thousand servers, I need to fix the issue before I can upgrade the version.
I hope for a quick fix. Thanks.
How to reproduce
With librdkafka producer running,
repeat start-stop of brokers.
An issue occurred in 2.6.0.
Checklist
Please provide the following information:
<REPLACE with e.g., message.timeout.ms=123, auto.reset.offset=earliest, ..>
debug=..
as necessary) from librdkafkaThe text was updated successfully, but these errors were encountered: