Skip to content

Segfault when creating a rdkafka consumer on x86_64-unknown-linux-musl #109916

Open
@RedKinda

Description

@RedKinda

Hiya

I have a minimal reproducible example here https://github.com/RedKinda/rust-musl-segfault. The dockerfile builds and compiles successfully, but running it results in a segfault.

Code only attempts to create a simple kafka consumer using the rdkafka crate. However after compiling to x86_64-unknown-linux-musl and running the executable, it immediately segfaults.

I expected to see this happen: not segfault and exit gracefully. Instead, it segfaults.

After debugging with gdb, segfault leads me to this, which leads me to believe this is a miscompilation

gef➤  x/1w 0x7ffff7ff7000
0x7ffff7ff7000 <EVP_sha256@got.plt>:    0x1f456

I have created an issue on the rdkafka repo (fede1024/rust-rdkafka#562) but thought it might be useful to raise it here as well.

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.O-muslTarget: The musl libc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions