Bug#928224: Valgrind is broken on armhf

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#928224: Valgrind is broken on armhf

Benjamin Wozniak
Package: valgrind
Version: 1:3.14.0-3
Severity: important

Hi,
i encountered a bug in valgrind. I tried to analyze an application on an armhf
platform but valgrind didn't worked. It does not even work on /bin/true (output below).
Installed libc6 version: libc6-dgb:armhf 2.28-8

valgrind /bin/true

==12463== Memcheck, a memory error detector
==12463== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==12463== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==12463== Command: /bin/true
==12463==

valgrind:  Fatal error at startup: a function redirection
valgrind:  which is mandatory for this platform-tool combination
valgrind:  cannot be set up.  Details of the redirection are:
valgrind:  
valgrind:  A must-be-redirected function
valgrind:  whose name matches the pattern:      index
valgrind:  in an object with soname matching:   ld-linux-armhf.so.3
valgrind:  was not found whilst processing
valgrind:  symbols from the object with soname: ld-linux-armhf.so.3
valgrind:  
valgrind:  Possible fixes: (1, short term): install glibc's debuginfo
valgrind:  package on this machine.  (2, longer term): ask the packagers
valgrind:  for your Linux distribution to please in future ship a non-
valgrind:  stripped ld.so (or whatever the dynamic linker .so is called)
valgrind:  that exports the above-named function using the standard
valgrind:  calling conventions for this platform.  The package you need
valgrind:  to install for fix (1) is called
valgrind:  
valgrind:    On Debian, Ubuntu:                 libc6-dbg
valgrind:    On SuSE, openSuSE, Fedora, RHEL:   glibc-debuginfo
valgrind:  
valgrind:  Note that if you are debugging a 32 bit process on a
valgrind:  64 bit system, you will need a corresponding 32 bit debuginfo
valgrind:  package (e.g. libc6-dbg:i386).
valgrind:  
valgrind:  Cannot continue -- exiting now.  Sorry.

Best regards,
Benjamin

Reply | Threaded
Open this post in threaded view
|

Bug#928224: Valgrind is broken on armhf

Bernhard Übelacker-3
Hello Benjamin Wozniak,
I just wanted to help triaging this issue.

For this I started a qemu vexpress-a15 emulation
with current Buster armhf installed.

Unfortunately I could not reproduce this valgrind error.
Some more details about my test in attached file.

So maybe the valgrind maintainer will need some more
information about the system showing this behaviour.

Kind regards,
Bernhard

debugging.txt (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Bug#928224: AW: Bug#928224: Valgrind is broken on armhf

Benjamin Wozniak
Hi Bernhard,

thanks for your support. I installed the packages valgrind-dbg, libc6-l10n and locales
so that we can compare our systems. But the problem is still present.
I attached a file with my debugging output.

Kind regards,
Benjamin

debugging.txt (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Bug#928224: Valgrind is broken on armhf

Bernhard Übelacker-3
Hi Benjamin,

> thanks for your support. I installed the packages valgrind-dbg, libc6-l10n and locales
> so that we can compare our systems. But the problem is still present.
> I attached a file with my debugging output.

Looks quite equal, except kernel and cpu.
Maybe the commands below can reveal any difference?

Kind regards,
Bernhard


# From a VM running current buster with valgrind not showing a problem:

root@debian:~# ls -lisah /lib/ld-linux-armhf.so.3 /lib/arm-linux-gnueabihf/ld-linux-armhf.so.3 /lib/arm-linux-gnueabihf/ld-2.28.so /lib/arm-linux-gnueabihf/ld-2.28.so
787943 104K -rwxr-xr-x 1 root root 104K Feb 28 06:56 /lib/arm-linux-gnueabihf/ld-2.28.so
787943 104K -rwxr-xr-x 1 root root 104K Feb 28 06:56 /lib/arm-linux-gnueabihf/ld-2.28.so
789695    0 lrwxrwxrwx 1 root root   10 Feb 28 06:56 /lib/arm-linux-gnueabihf/ld-linux-armhf.so.3 -> ld-2.28.so
789740    0 lrwxrwxrwx 1 root root   30 Feb 28 06:56 /lib/ld-linux-armhf.so.3 -> arm-linux-gnueabihf/ld-2.28.so

root@debian:~# md5sum /lib/ld-linux-armhf.so.3 /lib/arm-linux-gnueabihf/ld-linux-armhf.so.3 /lib/arm-linux-gnueabihf/ld-2.28.so /lib/arm-linux-gnueabihf/ld-2.28.so
a4b6b7a988547a464b0c57a74b32f9c4  /lib/ld-linux-armhf.so.3
a4b6b7a988547a464b0c57a74b32f9c4  /lib/arm-linux-gnueabihf/ld-linux-armhf.so.3
a4b6b7a988547a464b0c57a74b32f9c4  /lib/arm-linux-gnueabihf/ld-2.28.so
a4b6b7a988547a464b0c57a74b32f9c4  /lib/arm-linux-gnueabihf/ld-2.28.so

root@debian:~# gdb -q -ex 'b index' -ex 'q' --args /lib/arm-linux-gnueabihf/ld-2.28.so
Reading symbols from /lib/arm-linux-gnueabihf/ld-2.28.so...Reading symbols from /usr/lib/debug/.build-id/3c/95192f00377a31cf9a97cdbfe02020846ca790.debug...done.
done.
Breakpoint 1 at 0x12090: file ../sysdeps/arm/armv6/strchr.S, line 28.

root@debian:~# strace -f valgrind /bin/true 2>&1 | grep ld-linux-armhf.so.3
pread64(3, "/lib/ld-linux-armhf.so.3\0", 25, 340) = 25
open("/lib/ld-linux-armhf.so.3", O_RDONLY) = 4