Skip to content
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

Open
3 of 7 tasks
ojktx opened this issue Nov 19, 2024 · 0 comments
Open
3 of 7 tasks

segmentation fault from rdkafka_topic.c #4907

ojktx opened this issue Nov 19, 2024 · 0 comments

Comments

@ojktx
Copy link

ojktx commented Nov 19, 2024

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:

  • librdkafka version (release number or git tag): v2.6.0
  • Apache Kafka version: 3.6.0
  • librdkafka client configuration: <REPLACE with e.g., message.timeout.ms=123, auto.reset.offset=earliest, ..>
  • Operating system: win10 , ubuntu 22.04
  • Provide logs (with debug=.. as necessary) from librdkafka
  • Provide broker log excerpts
  • Critical issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant