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

ProduceAsync segmentation fault on a specific produce configuration #2084

Closed
5 of 8 tasks
timramone opened this issue Jul 18, 2023 · 3 comments
Closed
5 of 8 tasks

ProduceAsync segmentation fault on a specific produce configuration #2084

timramone opened this issue Jul 18, 2023 · 3 comments

Comments

@timramone
Copy link

timramone commented Jul 18, 2023

Description

ProduceAsync with certain lengths of ProducerConfig.ClientId and TopicName strings leads to an invalid memory access and a segmentation fault.

How to reproduce

var message = "1";

var bootstrapServers = "<your bootstrap servers>";

var topicName = new String('a', 69);
var clientId = new String('a', 239);

var config = new ProducerConfig
{
	BootstrapServers = bootstrapServers,
	ClientId = clientId,
};

var builder = new ProducerBuilder<string, string>(config);
var producer = builder.Build();

await producer.ProduceAsync(topicName, new Message<string, string>()
{
	Value = message
});

You can reproduce it with confluent.kafka nuget versions 2.2.0 and 2.1.1.
It can't be reproduced with confluent.kafka nuget version 1.9.3.

Apache Kafka 2.8.1

It can be reproduced on any OS afaik.

Checklist

Please provide the following information:

  • A complete (i.e. we can run it), minimal program demonstrating the problem. No need to supply a project file.
  • Confluent.Kafka nuget version.
  • Apache Kafka version.
  • Client configuration.
  • Operating system.
  • Provide logs (with "debug" : "..." as necessary in configuration).
  • Provide broker log excerpts.
  • Critical issue.
@korchak-aleksandr
Copy link

@emasab @edenhill @mhowlett Hello!

Could you help with prioritizing this issue? We are looking forward to a fix for this problem.

We have blocked any updates to confluent-kafka-dotnet library because of this issue.

@anchitj
Copy link
Member

anchitj commented Apr 16, 2024

Thanks for the bug report. This is due to an overflow issue in librdkafka. Fix is being tracked in confluentinc/librdkafka#4689

@anchitj
Copy link
Member

anchitj commented Jul 12, 2024

Closing, as the fix is released now. Please feel free to reopen if you still face this.

@anchitj anchitj closed this as completed Jul 12, 2024
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

3 participants