valgrind 3.8.1 warning in jemalloc 3.2
Jason Evans
jasone at canonware.com
Wed Dec 12 08:02:54 PST 2012
On Dec 11, 2012, at 11:25 AM, Daniel Mezzatto Rodrigues <danielm at buscape-inc.com> wrote:
> I have just changed part of my system to use jemalloc (version 3.2). Running valgrind (version 3.8.1) gave me some errors (that does not occur with system malloc). Some of the errors:
>
> […]
>
> I compiled jemallod with ./configure --with-jemalloc-prefix=je_ && make && make install.
>
> This code runs inside a custom Apache HTTPD module running with mpm_worker, but a single request generated these valgrind errors (no concurrent being processed by multiple threads). It basically calls je_malloc for many structures and then a bunch of je_realloc for each one of these structures.
>
> Some info about my system:
>
> cat /etc/debian_version
> wheezy/sid
>
> uname -a
> Linux xxx 3.0.0-28-generic #45-Ubuntu SMP Wed Nov 14 21:57:26 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
>
> gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper
> Target: x86_64-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.1-9ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
> Thread model: posix
> gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
>
> valgrind --version
> valgrind-3.8.1
>
> jemalloc 3.2.0-0-g87499f6748eb
>
> httpd -v
> Server version: Apache/2.2.23 (Unix)
> Server built: Dec 7 2012 17:55:24
>
> Are these errors expected? Am I doing something wrong? Any thoughts?
Is jemalloc configuring itself to support valgrind? In order for valgrind configuration to succeed, it needs to be able to find the valgrind headers (valgrind/valgrind.h and valgrind/memcheck.h). It's conceivable that jemalloc's valgrind support might have some holes (it's pretty tricky to get totally right), but the valgrind errors you pasted look like ones that would occur if jemalloc were completely missing valgrind support.
Thanks,
Jason
More information about the jemalloc-discuss
mailing list