Skip to content

Support 26.04 amd64v3 and recover parameters from degraded DWARF#152

Open
xtrusia wants to merge 5 commits into
taodd:mainfrom
xtrusia:dwarf-compare-amd64v3
Open

Support 26.04 amd64v3 and recover parameters from degraded DWARF#152
xtrusia wants to merge 5 commits into
taodd:mainfrom
xtrusia:dwarf-compare-amd64v3

Conversation

@xtrusia

@xtrusia xtrusia commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Builds on pponnuvel's 26.04 support.

  • Run dwarf-compare against both 26.04 ceph-osd variants (amd64 baseline and amd64v3), selecting the reference by build-id.
  • Recover parameter locations when debuginfo is degraded. Some builds (LTO) drop the DWARF locations, so the parser recovers the entry PC from the ELF symbol table and rebuilds each parameter from the x86_64 SysV ABI. When a parameter still can't be resolved, the function is dropped instead of crashing.

Signed-off-by: Ponnuvel Palaniyappan <pponnuvel@gmail.com>
@xtrusia xtrusia force-pushed the dwarf-compare-amd64v3 branch 2 times, most recently from 000c5f5 to 69e525c Compare June 26, 2026 00:35
@xtrusia xtrusia marked this pull request as draft June 26, 2026 01:00
@xtrusia

xtrusia commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

checking error in local

@xtrusia xtrusia force-pushed the dwarf-compare-amd64v3 branch from 69e525c to 1cdcda7 Compare June 26, 2026 01:13
xtrusia added 2 commits June 26, 2026 02:11
A ceph version can ship as more than one binary (arch, the 26.04 amd64v3 variant, or a rebuild), each with different addresses. Pick the reference whose build-id matches the generated JSON instead of the first version-glob match, and fail when no checked-in reference matches the installed binary.

Signed-off-by: Seyeong Kim <seyeong.kim@canonical.com>
26.04 ships ceph-osd as baseline amd64 and an amd64v3 variant. Add a job that runs dwarf-compare against each, forcing the variant through the apt config and asserting the resolved .deb, and check in the amd64v3 reference JSONs.

Signed-off-by: Seyeong Kim <seyeong.kim@canonical.com>
@xtrusia xtrusia force-pushed the dwarf-compare-amd64v3 branch from 95c2d14 to f44f890 Compare June 26, 2026 02:16
@xtrusia

xtrusia commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

@taodd interesting, in amd64v3 ddeb, DW_AT_location is actually missing

ReplicatedBackend::submit_transaction(...)
...
<2><30a24c7>: Abbrev Number: 40 (DW_TAG_formal_parameter)
<30a24c8> DW_AT_name : (indirect string, offset: 0x2c2edc6): reqid
<30a24cc> DW_AT_decl_file : 35
<30a24cd> DW_AT_decl_line : 562
<30a24cf> DW_AT_decl_column : 15
<30a24d0> DW_AT_type : <0x2ef53b4>
...

@xtrusia xtrusia force-pushed the dwarf-compare-amd64v3 branch 2 times, most recently from b52ea22 to 29349e7 Compare June 26, 2026 13:02
Some ceph-osd builds drop the low_pc and parameter locations of
LTO-optimized functions, so they were skipped entirely. Recover the
entry PC from the ELF symbol table and the parameter locations from the
x86-64 SysV entry ABI, gated on exact type and layout checks.

Signed-off-by: Seyeong Kim <seyeong.kim@canonical.com>
@xtrusia xtrusia force-pushed the dwarf-compare-amd64v3 branch from 29349e7 to 2d1fac6 Compare June 26, 2026 13:59
LTO builds drop low_pc and parameter DW_AT_location. Recover the entry PC
from the ELF symbol table and derive each parameter's location from the
x86_64 SysV convention: per-eightbyte classification of small aggregates,
invisible reference for non-trivially-copyable types, and stack spill once
the integer registers run out. Drop the function when a parameter cannot
be resolved instead of asserting.

Signed-off-by: Seyeong Kim <seyeong.kim@canonical.com>
@xtrusia xtrusia force-pushed the dwarf-compare-amd64v3 branch from 2d1fac6 to 3ac860d Compare June 27, 2026 01:54
@xtrusia xtrusia marked this pull request as ready for review June 27, 2026 03:11
@xtrusia xtrusia changed the title Dwarf compare amd64v3 Support 26.04 amd64v3 and recover parameters from degraded DWARF Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants