You are not logged in.

#1 2023-06-28 03:41:20

bztarch
Member
Registered: 2019-08-30
Posts: 9

valgrind doesn't work after installation or upgrade

Hi,

Please mind the sheer number of users complaining about valgrind not working, getting an error like

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

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:      strlen
valgrind:  in an object with soname matching:   ld-linux-x86-64.so.2
valgrind:  was not found whilst processing
valgrind:  symbols from the object with soname: ld-linux-x86-64.so.2
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.

This happens even though "debuginfod" is installed and "DEBUGINFOD_URLS" environment variable set correctly. Just google "arch valgrind strlen" and you'll see this is a constant PITA for lots and lots of users.

And the wiki isn't helping much, because it only talks about debuginfod, which simply doesn't work most of the time. It doesn't work for me either (again), no matter I did everything exactly as the wiki says. And of course it doesn't work because no previous versions of the debug symbol package are kept on the server, so this will always fail, again and again, whenever there's a version mismatch between the locally installed glibc and the glibc-debug on the server. (To be precise, I now have glibc-2.37-2 installed, but there's only glibc-debug-2.37-3 available on the server).

The valgrind error isn't helpful at all, and I was only able to figure this out because I have accidentally found another wiki article (hidden pretty deep and not found by websearch), https://wiki.archlinux.org/title/Debugg … g_packages, checking the url given there and looking for glibc-debug manually.

Please consider a proper solution to this very serious problem, add glibc-debug package from https://geo.mirror.pkgbuild.com/core-debug/os/x86_64/ to the core (or maybe extra) database, and set it as a dependency for valgrind. This way the libc debug symbols would be installed along with valgrind, and glibc's and glibc-debug's version would always match, eliminating this extremely annoying problem once and for all.

It is okay if all the other packages rely on debuginfod and the packages on that server, but for Crist's sake, please, please add at least glibc-debug because valgrind simply refuses to start without it.

Thanks,
bzt

Offline

#2 2023-06-28 04:24:25

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,590

Re: valgrind doesn't work after installation or upgrade

Any particular reason why you have glibc-2.37-2 installed? The current version is 2.37-3 since 2023-05-03

Also the current version of valgrind in the repos is 3.21.0-1

Last edited by skunktrader (2023-06-28 04:49:10)

Offline

#3 2023-08-11 03:57:32

PBS
Member
Registered: 2015-06-28
Posts: 53

Re: valgrind doesn't work after installation or upgrade

So you can only use valgrind if you have Internet access and your glibc is up-to-date?

What if you need to debug a crash in an old version of a piece of software that requires you to roll the system back to a version a year ago?

Offline

Board footer

Powered by FluxBB