Bug 377700 - Valgrind 3.10 and 3.12 aborting on rdkafka applications
Summary: Valgrind 3.10 and 3.12 aborting on rdkafka applications
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (show other bugs)
Version: 3.10.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-16 16:29 UTC by Andrew Pennebaker
Modified: 2017-03-20 10:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.