You are not logged in.
Pages: 1
Topic closed
Hi,
since last glibc update I can't use my valgrind, it just displays that message shown below:
==21276== Memcheck, a memory error detector
==21276== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==21276== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==21276== Command: ls
==21276==
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.
I looked at the commits in glibc's PKGINFO repo and in "enable debug pkg" commit i saw description "Valgrind is able to get the glibc symbols from debuginfod since 3.17.0". I have installed that debuginfod package, reinstalled valgrind and I tried build valgrind from source, but it all results in error shown above.
Offline
Same here, using:
valgrind-3.19.0-2
debuginfod-0.187-1
Offline
Hello. I was facing the same problems. I solved it by manually setting the environment variable:
export DEBUGINFOD_URLS="https://debuginfod.archlinux.org"
According to the wiki, debuginfod should automatically set up that env var on login. Maybe try restarting your computer and see if it works?
If it doesn't, you can always but the export above in your .profile file.
Last edited by Horus (2022-05-15 15:28:29)
Offline
Same here
Offline
Hello. I was facing the same problems. I solved it by manually setting the environment variable:
export DEBUGINFOD_URLS="https://debuginfod.archlinux.org"
According to the wiki, debuginfod should automatically set up that env var on login. Maybe try restarting your computer and see if it works?
If it doesn't, you can always but the export above in your .profile file.
After reboot and mirror update it worked, thank you
Offline
I ran into the same issue. It is really hard to find information on the web about this. Would you mind to add it to https://wiki.archlinux.org/title/Debugging#Valgrind or is it okay for you if I add it?
Offline
The
/etc/profile.d/debuginfod.sh
read the variable in
/etc/debuginfod/archlinux.urls
and export it. Thus, it is supposed to work out of box.
I think the reason that I encounter this problem is that I changed the default shell to fish (via chsh).
Do you guys also do something similar?
Last edited by shenlebantongying (2022-05-26 02:36:11)
Offline
Changing your login shell to fish rather than just setting something up that starts fish for an interactive session from your login shell comes with a lot of gotchas and stipulations: https://wiki.archlinux.org/title/Fish#S … ault_shell
Offline
Yeah, but I don't think programs should expect too much from the default shell, so I deliberately use fish to know what special behavior of sh or bash are expected by some programs.
This is the first bug I met for half a year of default fishing.
Offline
I ran into the same issue. It is really hard to find information on the web about this. Would you mind to add it to https://wiki.archlinux.org/title/Debugging#Valgrind or is it okay for you if I add it?
Everyone is welcome for wiki editing! If you're not sure about what to add, sone notes on the discussion page https://wiki.archlinux.org/title/Talk:Debugging is a good start.
Offline
I'm having the same issue, couldn't get it to work
Offline
This doesn’t work and debuginfod has absolutely nothing to do with it. The daemon can be used to fetch (in oversimplified terms) line number information for valgrind to report (e.g.) where exactly a used-after-free block was (de)allocated. But it has precisely nothing in common with this strlen() problem, because this is unrelated to debugging information.
Offline
I had the same issue in arch WSL2. I use fish as my default shell. I added `set -x DEBUGINFOD_URLS "https://debuginfod.archlinux.org"` to my `.config/fish/config.fish` and now valgrind is working again.
Offline
If you're running valgrind on a program under sudo, you may need to explicitly give the DEBUGINFOD_URLS envvar in the command itself, e.g.:
$ sudo DEBUGINFOD_URLS="https://debuginfod.archlinux.org" G_SLICE=always-malloc valgrind --leak-check=full /usr/sbin/ModemManager --debug
Offline
Thanks @raldone01 that fixed it for me in fish shell
Offline
Exporting this environment variable didn't work for me either. For additional info, after running
pacman -Qi debuginfod
I get:
Name : debuginfod
Version : 0.187-2
Description : Handle ELF object files and DWARF debugging information (debuginfod)
Architecture : x86_64
URL : https://sourceware.org/elfutils/
Licenses : LGPL3 GPL3
Groups : None
Provides : None
Depends On : gcc-libs glibc libarchive.so=13-64 libelf=0.187 libmicrohttpd.so=12-64 sqlite
Optional Deps : elfutils=0.187: for translations [installed]
Required By : valgrind
Optional For : binutils
Conflicts With : None
Replaces : None
Installed Size : 337.84 KiB
Packager : Frederik Schwan <freswa@archlinux.org>
Build Date : Tue 02 Aug 2022 01:11:18 AM CEST
Install Date : Sun 14 Aug 2022 06:22:33 PM CEST
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature
so my debuginfod is Ok, but having:
DEBUGINFOD_URLS=https://debuginfod.archlinux.org
does not solve the issue. I have a standard bash shell BTW. Thank you in advance.
Last edited by vonNeumannStability (2022-08-14 16:21:39)
Offline
Encountered this problem today, a `pacman -Syu` + reboot solved it for me (also for fish shell).
Offline
Hi,
Hello! I also had this problem.
All I've had to do is compile glibc from source but with debug symbols.
info:
5.15.65-1-MANJARO
valgrind-3.20.0.GIT
Steps to follow:
git clone https://github.com/archlinux/svntogit-packages.git
git checkout packages/glibc
cd svntogit-packages/trunk
Edit PKGBUILD and make this change to avoid strip debug symbols
- options=(debug staticlibs !lto)
+ options=(debug staticlibs !lto !strip)
grep -v "#" /etc/locale.gen >> locale.gen.txt
This will take a while...
makepkg --skipchecksums
When compilation finished:
sudo pacman -U glibc-2.36-4-x86_64.pkg.tar.zst
And...
valgrind ls
==2180763== Memcheck, a memory error detector
==2180763== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==2180763== Using Valgrind-3.20.0.GIT and LibVEX; rerun with -h for copyright info
==2180763== Command: ls
==2180763==
glibc glibc-2.36-4-x86_64.pkg.tar.zst glibc.install keys lib32-glibc-2.36-4-x86_64.pkg.tar.zst lib32-glibc.conf locale-gen locale.gen.txt pkg PKGBUILD reenable_DT_HASH.patch sdt-config.h sdt.h src
==2180763==
==2180763== HEAP SUMMARY:
==2180763== in use at exit: 25,493 bytes in 21 blocks
==2180763== total heap usage: 55 allocs, 34 frees, 63,360 bytes allocated
==2180763==
==2180763== LEAK SUMMARY:
==2180763== definitely lost: 0 bytes in 0 blocks
==2180763== indirectly lost: 0 bytes in 0 blocks
==2180763== possibly lost: 0 bytes in 0 blocks
==2180763== still reachable: 25,493 bytes in 21 blocks
==2180763== suppressed: 0 bytes in 0 blocks
==2180763== Rerun with --leak-check=full to see details of leaked memory
==2180763==
==2180763== For lists of detected and suppressed errors, rerun with: -s
==2180763== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Offline
the debuginfo service only tracks the latest version (I assume).
So you have to update the system `pacman -Syu` and it should work.
If you are using an arch downstream like manjaro where packages lag behind...that's a problem.
Offline
Hi,
I wasn't sure about adding to an old thread.
Thanks to nontre for the fix and others for the input. It really helped.
What I listed below is just what was advised above, with some slight changes.
What I did:
1/ sudo pacman -Syu <---Important or you will build a glibc different from what is on your system.
2/ Added export DEBUGINFOD_URLS="https://debuginfod.archlinux.org" to my .bash_profile
3/git clone https://github.com/archlinux/svntogit-packages.git
4/ cd svntogit-packages/glibc/trunk
5/ Modified line in the file PKGBUILD
6/ grep -v "#" /etc/locale.gen >> locale.gen.txt
7/ makepkg --skipchecksums
8/ sudo pacman -U glibc<should be the same as whats on your system>
Offline
I also have this problem in archlinux
Environment, windows + clion + vmware virtual machine (archlinux)
In archlinux I use zsh, in zsh I have added
➜ ~ cat .zshrc| grep DEBUG
export DEBUGINFOD_URLS=https://debuginfod.archlinux.org
After configuring ssh in clion to connect to archlinux on vmware, and then using Run `appname` with Valgrind Memcheck in clion, I still get the above error.
/usr/bin/valgrind --tool=memcheck --xml=yes --xml-file=/tmp/clion-valgrindd26ec1fb-7847-4e81-89af-336b693179f911768534303923331793/valgrind_output_%p --gen-suppressions=all --leak-check=full --leak-resolution=med --track-origins=yes --vgdb=no /tmp/tmp.exZ9ve7u5C/cmake-build-debug-coverage/chapter_tree/avl_tree
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.
Process finished with exit code 1
Offline
Your user interface started clion will not have your zsh environment for interactive shells. Export the variable via more globally sourced means: https://wiki.archlinux.org/title/Enviro … _variables
Offline
Hi, guys, I also encounter this problem.
My arch is on the WSL.
Here is my solution to this problem:
pacman -S debuginfod
pacman -S glibc
Offline
Thanks @Pheglovog
Hitting the same problem. Setting debuginfod URL doesn't help, but upgrading to latest glibc works!
Offline
Don't do partial upgrades, they are unsupported.
Closing this old thread to prevent necroing, open a new thread if it's not clear what you have to do after reading this thread.
Offline
Pages: 1
Topic closed