Richard W.M. Jones
2021-Aug-23 20:33 UTC
[Libguestfs] [PATCH nbdkit v2 2/2] wrapper: Remove GLIBC_TUNABLES when running under valgrind
Thanks for the review. This is what I pushed which I think should incorporate all the suggestions you made. I have also checked it works with older glibc now. https://gitlab.com/nbdkit/nbdkit/-/commit/362e0fdcae37db876e13b944102a5c152e6bc563 https://gitlab.com/nbdkit/nbdkit/-/commit/ae8c815e54e66ac7b421e0a6929c39d9ce3834dc Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
Richard W.M. Jones
2021-Aug-24 09:22 UTC
[Libguestfs] [PATCH nbdkit v2 2/2] wrapper: Remove GLIBC_TUNABLES when running under valgrind
There's a problem here ... For background see: https://lists.fedoraproject.org/archives/list/devel at lists.fedoraproject.org/thread/7R3H3RWXC2FEJ6MRTFFUZY5KRYKPL2TQ/ (You have to click the "..." in that email) If libc_malloc_debug.so.0 isn't installed then LD_PRELOAD generates lots of warning messages and this actually breaks some tests. If ./configure is used without --libdir then we try to set LD_PRELOAD=/usr/local/lib/libc_malloc_debug.so.0 which causes the warnings/failures. My first idea was to test in ./configure if $libdir/libc_malloc_debug.so.0 exists and only set LD_PRELOAD if so. However that doesn't work because of $!"?% exec_prefix (a.k.a. the most useless GNU feature that no one uses but causes all the trouble). Also if you have glibc.i686 and glibc.x86_64 installed then both /lib64/libc_malloc_debug.so.0 and /lib/libc_malloc_debug.so.0 exist and you must choose the correct one. On other distros the path will be different, eg. the 64 bit one in /lib/libc_malloc_debug.so.0 or /lib/x86_64-linux-gnu/... etc. So I don't know how to solve any of this. It would be nicer if glibc handled the details and automatically loaded the right library if GLIBC_TUNABLES was set. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/