Skip to content

ProduceAsync segmentation fault on a specific produce configuration #2084

@timramone

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions