Skip to content

Fix debug symbol issues#3870

Open
chewi wants to merge 3 commits intomainfrom
chewi/debug-dirs
Open

Fix debug symbol issues#3870
chewi wants to merge 3 commits intomainfrom
chewi/debug-dirs

Conversation

@chewi
Copy link
Copy Markdown
Contributor

@chewi chewi commented Mar 30, 2026

Fix debug symbol issues

A recent Portage fix should avoid any collisions by salting the debug files with the package name and version. The fix inadvertently broke the debuglink CRC, which gdb checks, but this went unnoticed in Gentoo because gdb prefers looking up symbols with the build-id instead. However, this was noticed in Flatcar because of /usr/lib/debug/.build-id being INSTALL_MASK'd! This has now been fixed in Gentoo, pending a new Portage release. We can drop the INSTALL_MASK now to rely on the build-id instead of the debuglink.

Following that, we also need to remove debug build-id symlinks broken by other INSTALL_MASK entries, otherwise they trip our QA check, which fails the build.

Finally, we bump baselayout to drop /usr/lib/debug dirs and symlinks. Gentoo starts with this directory being empty, and Portage complains if you populate it with merge-usr symlinks.

How to use

Run gdb against any binary in the SDK. It should find the debug symbols without complaining of CRC mismatches. Do the same after renaming /usr/lib/debug/.build-id.

Testing done

An SDK build is running under Jenkins. I have also done the above manually.

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update) -- N/A
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

@chewi chewi self-assigned this Mar 30, 2026
@chewi chewi requested a review from a team as a code owner March 30, 2026 11:41
chewi added 3 commits March 30, 2026 16:12
A recent Portage fix should avoid any collisions by salting the debug
files with the package name and version. The fix inadvertently broke the
debuglink CRC, which gdb checks, but this went unnoticed in Gentoo
because gdb prefers looking up symbols with the build-id instead.
However, this was noticed in Flatcar because of the INSTALL_MASK! This
has now been fixed in Gentoo, pending a new Portage release. We can drop
the INSTALL_MASK now to rely on the build-id instead of the debuglink.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Otherwise they trip our QA check, which fails the build.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Gentoo starts with this directory being empty, and Portage complains if
you populate it with merge-usr symlinks.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
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.

1 participant