Bug 2232086
| Summary: | .gdb_index sections are not reproducible | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Zbigniew Jędrzejewski-Szmek <zbyszek> |
| Component: | gdb | Assignee: | Kevin Buettner <kevinb> |
| Status: | NEW --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 38 | CC: | ahajkova, blarsen, fweimer, jan, keiths, kevinb, mcermak, mjw, mkolar |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Zbigniew Jędrzejewski-Szmek
2023-08-15 08:44:10 UTC
The issue only occurs in some cases. E.g. for valgrind, it's only the files under /usr/libexec/valgrind/, and for some other packages I rebuilt, the issue does not occur at all. Setting RPM_BUILD_NCPUS= doesn't seem to have an effect. After looking at this some more, find-debuginfo calls gdb-add-index, which calls gdb.minimal:
$GDB --batch -nx -iex 'set auto-load no' \
-iex 'set debuginfod enabled off' \
-ex "file $file" -ex "save gdb-index $dwarf5 $dir"
$OBJCOPY --add-section $section="$index" \
--set-section-flags $section=readonly \
$(if $debugstradd; then \
echo --add-section .debug_str="$debugstrmerge"; \
echo --set-section-flags .debug_str=readonly; \
fi; \
if $debugstrupdate; then \
echo --update-section .debug_str="$debugstrmerge"; \
fi) \
"$fpath" "$fpath"
+ /usr/bin/gdb.minimal --batch -nx -iex 'set auto-load no' -iex 'set debuginfod enabled off' -ex 'file /builddir/build/BUILDROOT/valgrind-3.21.0-8.fc40.x86_64_5/usr/libexec/valgrind/massif-amd64-linux' -ex 'save gdb-index /builddir/build/BUILDROOT/valgrind-3.21.0-8.fc40.x86_64_5/usr/libexec/valgrind'
+ objcopy --add-section .gdb_index=/builddir/build/BUILDROOT/valgrind-3.21.0-8.fc40.x86_64_5/usr/libexec/valgrind/massif-amd64-linux.gdb-index --set-section-flags .gdb_index=readonly /builddir/build/BUILDROOT/valgrind-3.21.0-8.fc40.x86_64_5/usr/libexec/valgrind/massif-amd64-linux /builddir/build/BUILDROOT/valgrind-3.21.0-8.fc40.x86_64_5/usr/libexec/valgrind/massif-amd64-linux
So it seems the contents of that section are generated by gdb.minimal and then
just copied over. So maybe this needs to be reassigned to gdb?
Yes, gdb-add-index is part of gdb. I don't immediately see anything that could cause non-deterministic output in the gdb-add-index script itself. So it must be something in gdb itself that generates or saves the gdb-index data non-deterministically. Do you happen to have an example invocation of gdb-add-index that produces different results on different runs? Is it the contents of .gdb_index section or something else in the ELF file that is different? |