Bug 2334760 - build of xen for Fedora 41 aarch64 fails at the debuginfo generation stage
Summary: build of xen for Fedora 41 aarch64 fails at the debuginfo generation stage
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: debugedit
Version: 41
Hardware: aarch64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Mark Wielaard
QA Contact:
URL: https://download.copr.fedorainfraclou...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-12-28 22:23 UTC by Michael Young
Modified: 2025-01-20 03:57 UTC (History)
2 users (show)

Fixed In Version: debugedit-5.1-4.fc41
Clone Of:
Environment:
Last Closed: 2025-01-20 03:57:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
libxenhypfs.so.1.0 file that may be triggering the problem (66.38 KB, application/octet-stream)
2024-12-28 22:26 UTC, Michael Young
no flags Details

Description Michael Young 2024-12-28 22:23:55 UTC
Builds of xen for Fedora 41 and Rawhide have started failing at the debuginfo stage - see for example the URL above for a copr build.x86_64 builds are fine.Looking at Koschei at https://koschei.fedoraproject.org/package/xen?collection=f41 suggests this started failing after debugedit was updated from 5.0-18.fc41 to 5.1-1.fc41

My debugging attempts suggest it might be the libxenhypfs.so.1.0 file that find-debuginfo is having problems with.

Reproducible: Always

Comment 1 Michael Young 2024-12-28 22:26:38 UTC
Created attachment 2064111 [details]
libxenhypfs.so.1.0 file that may be triggering the problem

Comment 2 Mark Wielaard 2024-12-29 00:45:28 UTC
I cannot replicate locally on x86_64 with a fedpkg mockbuild.

Could you provide some clues what it might be on arm64 that makes you suspect it is related to libxenhypfs.so.1.0?

The libxenhypfs.so.1.0 you attached doesn't contain any .debug sections.

Note that there was indeed a "regression" in debugedit-5.1-1 (fixed in debugedit-5.1-2) where the error of gdb-add-index of not being able to write to an unwritable (rx) shared library caused find-debugedit to fail. So make sure you are testing against at least debugedit-5.1-2.

Comment 3 Mark Wielaard 2024-12-29 03:28:04 UTC
I think I found it. Although I don't know why it only fails on arm64.

The issue is that the find-debuginfo script now fails when the do_file function exits with a non-zero code.
do_file however only has non-zero returns when it explicitly checks for a failure.
do_file doesn't have an explicit return at the end.
So the exit code of the function will be whatever the exit code of the last command in the function was.

It looks like the last thing do_file does is check if the file has multiple hard links.
Some files are hardlinked, but not to other files in the BUILDROOT, but to other dist build files.
This apparently confuses the function/script, even though it isn't fatel.

Adding an explicit return 0 at the end of the do_file function makes the spec build succeed.

Comment 4 Mark Wielaard 2025-01-16 18:01:10 UTC
Could replicate with an hello.spec file that has something like the following in %install:

ln %{buildroot}%{_bindir}/hello %{buildroot}/../x

Which will the produce:

find-debuginfo: starting
Extracting debug info from 2 files
grep: /tmp/find-debuginfo.2rRIL3/linked: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.0zwSXO (%install)

Comment 5 Mark Wielaard 2025-01-16 18:10:01 UTC
Proposed upstream patch:
https://inbox.sourceware.org/debugedit/20250116180900.1158563-1-mark@klomp.org

Comment 6 Fedora Update System 2025-01-16 22:53:12 UTC
FEDORA-2025-020b7e8c6a (debugedit-5.1-4.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-020b7e8c6a

Comment 7 Fedora Update System 2025-01-17 02:48:26 UTC
FEDORA-2025-020b7e8c6a has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-020b7e8c6a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-020b7e8c6a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2025-01-20 03:57:28 UTC
FEDORA-2025-020b7e8c6a (debugedit-5.1-4.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.