Bug 377700

Summary: Valgrind 3.10 and 3.12 aborting on rdkafka applications
Product: [Developer tools] valgrind Reporter: Andrew Pennebaker <andrew.pennebaker>
Component: memcheckAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: normal CC: fweimer
Priority: NOR    
Version: 3.10.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Andrew Pennebaker 2017-03-16 16:29:30 UTC
I'm trying to hunt down memory leaks in librdkafka. However, when I try to valgrind a minimal example application, Valgrind often aborts, complaining about some kind of "Invalid read of size 8".

Alpine 3.5 + Valgrind 3.12:

https://github.com/mcandre/docker-rdkafka-valgrind/tree/04ccabd15f0672a30427c7678aaf27c7032dcdd6

Debian Jessie + Valgrind 3.10:

https://github.com/mcandre/docker-rdkafka-valgrind/tree/feacbfc562664d92ccd38d3f7c3165163f898f4c
Comment 1 Florian Weimer 2017-03-20 10:10:24 UTC
To work around this issue, you should link the rdkafka application dynamically.

Even if we fix the bug you reported, valgrind will not be able to recognize memory allocations in a statically linked application, so it will not be useful for discovering memory leaks.