Some package builds fail because 'debugedit' cannot read debug sections #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Some package builds seem to fail with 'debugedit' being unable to read debug info. An example from 'qt5-qttools'[1] build failure:
[1] https://riscv-koji.fedoraproject.org/koji/buildinfo?buildID=53561
These are the packages I’ve found so far that are affected by the debugedit issue:
plplot - '/usr/bin/debugedit: Bad string pointer index ...'
unison - '/usr/bin/debugedit: Bad string pointer index ...'
scipy - '/usr/bin/debugedit: Bad string pointer index ...'
ghc9.2 - '/usr/bin/debugedit: Cannot handle 8-byte build ...'
dolphin-emu:
/usr/bin/debugedit: /builddir/build/BUILD/dolphin-emu-2503a-build/BUILDROOT/usr/bin/dolphin-emu-nogui: Bad string pointer index 4294966803 for unit name (.debug_line_str)
/usr/bin/debugedit: /builddir/build/BUILD/dolphin-emu-2503a-build/BUILDROOT/usr/bin/dolphin-tool: Bad string pointer index 4294966803 for unit name (.debug_line_str)
rkward: /usr/bin/ld: /usr/lib64/lp64d/libc_nonshared.a(pthread_atfork.oS): access beyond end of merged section (341)
https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=113420
lfortran: /usr/bin/debugedit: Bad string pointer index 4294967294 (.debug_line_str)
I just had a chat with Nick Clifton about this, and this is his explanation about the investigation (posting here with his permission):
Once I learn enough about this issue, Nick also suggested to file an upstream binutils bug, to start with.
@hrw Nick asked for libgcc.a rebuild with -save-temps and probably we also need -S.
From Matrix chat some ideas I had:
It would be easiest if we could recompile libgcc.a with host compiler without rebuilding minimal GCC (with C enabled).
[...]
Here we go: https://sourceware.org/bugzilla/show_bug.cgi?id=33723
bcc:/usr/bin/ld: /usr/lib64/libbpf.a(btf.o): access beyond end of merged section (603)
/usr/bin/ld: /usr/lib64/libbpf.a(btf.o): access beyond end of merged section (594)
/usr/bin/ld: /usr/lib64/libbpf.a(libbpf.o): access beyond end of merged section (750)
/usr/bin/ld: /usr/lib64/libbpf.a(ringbuf.o): access beyond end of merged section (431)
/usr/bin/ld: /usr/lib64/libbpf.a(usdt.o): access beyond end of merged section (504)
/usr/bin/ld: /usr/lib64/libbpf.a(zip.o): access beyond end of merged section (314)
/usr/bin/ld: /usr/lib64/libbpf.a(elf.o): access beyond end of merged section (329)
/usr/bin/ld: /usr/lib64/libbpf.a(btf_relocate.o): access beyond end of merged section (240)
I've commented on the upstream bugreport with a a libbpf mock buildroot with -save-temps , hope that helps
gprbuild:debugedit: /builddir/build/BUILD/gprbuild-25.0.0-build/BUILDROOT/usr/bin/gprconfig: Bad string pointer index 4294967154 for unit name (.debug_line_str)
debugedit: /builddir/build/BUILD/gprbuild-25.0.0-build/BUILDROOT/usr/bin/gprclean: Bad string pointer index 4294967226 for unit name (.debug_line_str)
debugedit: /builddir/build/BUILD/gprbuild-25.0.0-build/BUILDROOT/usr/bin/gprbuild: Bad string pointer index 4294967101 for comp_dir (.debug_line_str)
debugedit: /builddir/build/BUILD/gprbuild-25.0.0-build/BUILDROOT/usr/bin/gprinstall: Bad string pointer index 4294967138 for unit name (.debug_line_str)
pypy:[platform:WARNING] /usr/bin/ld: /usr/lib64/lp64d/libc_nonshared.a(pthread_atfork.oS): access beyond end of merged section (341)
[platform:WARNING] /usr/bin/ld: /usr/lib64/lp64d/libc_nonshared.a(pthread_atfork.oS): access beyond end of merged section (341)
webkitgtk:Extracting debug info from 17 files
/usr/bin/debugedit: Bad string pointer index 27023 (.debug_line_str)
/usr/bin/debugedit: Bad string pointer index 123166 (.debug_line_str)
/usr/bin/debugedit: Bad string pointer index 123069 (.debug_line_str)
systemd:/usr/bin/ld: /usr/lib64/lp64d/libc_nonshared.a(pthread_atfork.oS): access beyond end of merged section (341)
I reproduced this problem in a container, details here: https://sourceware.org/bugzilla/show_bug.cgi?id=33723#c11
Also, from the reproducer container, I exctracted two 'libtclstub.a' files (a good and a bad one):
I got the "good" one from here (before applying add-determinism):
This is the bad one (after applying add-determinism):
I ran a
diffwith a couple of commands (xxdandar):And the diff with
arindicates there's something more than metadata changes:[F43 rebuild] Some package builds fail when 'debugedit' cannot read debug sectionsto Some package builds fail due to 'debugedit' can't read debug sectionsSome package builds fail due to 'debugedit' can't read debug sectionsto Some package builds fail because 'debugedit' cannot read debug sectionsA quick update. Some upstream progress:
This is also now being tracked here and is actively being looked into by Mark Weilaard: https://sourceware.org/bugzilla/show_bug.cgi?id=33789 (debugedit corrupts RISC-V object files).
Nick Clifton posted a patch to the binutils mailing list, that can also help potentially workaround the issue (assuming the patch is accepted): https://sourceware.org/pipermail/binutils/2026-January/147334.html
Relaying update from David from the upstream bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33789#c14
@kashyapc wrote in #1 (comment):
Based on this, we're closing this issue.
Thanks to everyone that helped with this!