Created attachment 1883840 [details] Copy debuglink section to final binaries The ld-*.so.2 and libc.so.6 binaries generated by the Fedora package are missing the .gnu_debuglink section. This causes gdb to fail to display the message about running debuginfo-install in asence of debuginfod, among others possible issues. The problem is caused by the wrap-find-debuginfo.sh script which is run as part of the rpmbuild process. The script saves the original libraries before the real find-debuginfo.sh is run, and replaces them back, thus losing the changes the script did such as adding that section. Losing most of those changes is done on purpose but not the loss of that specific section. The problem happens on all current versions of Fedora. The attached patch against that script is my dumb attempt at fixing it (seems to work so far.... objcopy is a pain).
Thanks for the patch. I think for ld.so, we should not restore the debuglink because ld.so does not have separated debuginfo. It always has full debuginfo to aid with dynamic loader introspection. What do you think?
Hrm possibly. We do install /usr/lib/debug/lib64/ld-linux-x86-64.so.2-2.35-9.fc36.x86_64.debug as part of glibc-debuginfo, so that's probably what confused me ? Interestingly it looks like dnf happily leaves the old debuginfo around, and won't update them on either dnf update or debuginfo-install, I have to explicitely remove the old packages and re-install the debuginfo for the udpate to happen. I wonder if there's a purpose here or if it's a bug. IE, my f36 machine has things like: -rw-r--r--. 1 root root 245384 Jul 28 2020 libbz2.so.1.0.8-1.0.8-4.fc33.x86_64.debug -rw-r--r--. 1 root root 1485520 Jul 28 2020 libfontconfig.so.1.12.0-2.13.92-12.fc33.x86_64.debug -rw-r--r--. 1 root root 4120072 Oct 23 2020 libfreetype.so.6.17.4-2.10.4-1.fc33.x86_64.debug ... Sitting there and debuginfo-install or dnf won't update them unless I first take them out. Is this a known issue ? On purpose ? I can change the script to avoid preserving the .gnu_debuglink in ld.so if you prefer, though the debug info file does exist.
(In reply to Benjamin Herrenschmidt from comment #2) > Hrm possibly. We do install > /usr/lib/debug/lib64/ld-linux-x86-64.so.2-2.35-9.fc36.x86_64.debug as part > of glibc-debuginfo, so that's probably what confused me ? Yes, this file is unnecessary. > Interestingly it looks like dnf happily leaves the old debuginfo around, and > won't update them on either dnf update or debuginfo-install, It's probably related to the feature that you can install arbitrary debuginfo packages, e.g. for investigating coredumps.
Sorry for the delay, I took some time off and got swamped by a number of other things as I returned. Attaching an updated patch which only handles libc.so.6
Created attachment 1886258 [details] Copy debuglink section to final libc.so.6
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle. Changing version to 37.
I'm working on getting this fixed. Benjamin, would it be okay with you if I mentioned your name and email address in the RPM changelog in order to attribute the wrap-find-debuginfo patch to you?
Of course. I suggest that you use benh to reflect that this was done on my employer's time :-)
Thanks! I've pushed the fixes and built packages for Fedora 35, 36, 37, and Rawhide. I'll be filing a bodhi update in a bit.
FEDORA-2022-403dca5e92 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-403dca5e92
FEDORA-2022-9471e772b5 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-9471e772b5
FEDORA-2022-9471e772b5 has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2022-403dca5e92 has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report.