Bug 455740 - Include hints for Arch linux in error message for missing redirections
Summary: Include hints for Arch linux in error message for missing redirections
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (other bugs)
Version First Reported In: 3.18.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-21 18:14 UTC by 52anton63
Modified: 2022-06-22 17:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 52anton63 2022-06-21 18:14:06 UTC
SUMMARY
The error message "Fatal error at startup: a function redirection which is mandatory for this platform-tool combination cannot be set up..." could be improved by also including a tip for which package to install to fix the problem on Arch Linux.
Such as: "On Arch Linux:    debuginfod".


STEPS TO REPRODUCE
not necessary

OBSERVED RESULT
```
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.
```

EXPECTED RESULT
```
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:    On Arch Linux:    debuginfod
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.
```

SOFTWARE/OS VERSIONS
Linux:  5.18.5-arch1-1
Comment 1 Tom Hughes 2022-06-21 18:25:19 UTC
Well that is not information that is generally known to us, and it can vary from release to release even within a distribution never mind having to cover many different distributions - the text would probably get out of hand pretty quickly I fear even if it was possible for us to gather the necessary information.
Comment 2 Tom Hughes 2022-06-21 18:27:53 UTC
Also I don't see why installing debuginfod would help - installing the client tools might help but there's no reason you should need the daemon.
Comment 3 52anton63 2022-06-22 11:40:44 UTC
"the text would probably get out of hand pretty quickly..."
I understand, I wanted to make it easier for others who hit the same problem, feel free to do what you think is best.

"Also I don't see why installing debuginfod would help..."
It does work though, my colleague only executed `sudo pacman -Syu debuginfod` and that fixed the problem for him.
I have little experience with Arch Linux or debuginfod so I'm not sure what the minimal fix could be.
Comment 4 Tom Hughes 2022-06-22 13:10:02 UTC
I hadn't initially understood that you were suggesting an addition to an existing message because the way the initial parts of the report made it written made it sound like this was a new idea to document hints for distributions rather than just requesting to add an extra distribution.

I'm sure installing debuginfod did help but probably because it dragged in a dependent package that provided the debuginfod-find command (which is what valgrind uses to find debuginfo automatically) which was my point.

On Fedora for example you could install elfutils-debuginfod-client instead of actually installing the debuginfo package, but you wouldn't need elfutils-debuginfod which is the actual daemon. Maybe Arch puts it all in one package though?
Comment 5 52anton63 2022-06-22 17:39:16 UTC
"Maybe Arch puts it all in one package though?"
Yes, this does appear to be the case: https://archlinux.org/packages/?sort=&q=debuginfo&maintainer=&flagged=