Skip to content

segfault on \RdKafka\Metadata\Topic::getTopic() #465

@ctrl-f5

Description

@ctrl-f5

We have the following code running during deploy to verify required kafka topics exist:

$consumer = new \RdKafka\KafkaConsumer(); // this is built up elsewhere
$existingTopics = $consumer
    ->getMetadata(true, null, 1000)
    ->getTopics();

foreach ($existingTopics as $topic) {
    $this->availableTopicsInKafka[] = $topic->getTopic();
}

Which works perfectly on 7.4.x but fails consistently on 8.0-alpine with a segementation fault on the first call to $topic->getTopic().

Segmentation fault (core dumped)

I tried enabling librdkafka logs and debug but it doesnt output anything.

PHP Version => 8.0.9

System => Linux 81bdef77c496 5.11.0-27-generic #29~20.04.1-Ubuntu SMP Wed Aug 11 15:58:17 UTC 2021 x86_64

rdkafka support => enabled
version => 5.0.0
build date => Sep  3 2021 09:45:22
librdkafka version (runtime) => 1.7.0
librdkafka version (build) => 1.7.0.255

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions