Skip to content

lower-half: resolve loader debug file by build ID#488

Draft
alan-lira wants to merge 1 commit into
mpickpt:mainfrom
alan-lira:fix/loader-debug-build-id
Draft

lower-half: resolve loader debug file by build ID#488
alan-lira wants to merge 1 commit into
mpickpt:mainfrom
alan-lira:fix/loader-debug-build-id

Conversation

@alan-lira

Copy link
Copy Markdown

Refs #485

Background

On the Ubuntu environment used for my MANA validation, the loader's detached debug symbols are installed by libc6-dbg under the standard GNU build-ID tree:

/usr/lib/debug/.build-id/xx/yyyy.debug

MANA needs the loader's mmap and munmap offsets. My current installation works around discovery by creating a compatibility path, but that requires a root-owned filesystem change outside MANA.

This draft explores resolving the standard build-ID debug file directly.

Proposed lookup order

  1. Search the resolved loader itself, preserving current behavior.
  2. Search MANA's existing conventional debug path, preserving compatibility.
  3. Read the loader's NT_GNU_BUILD_ID note.
  4. Search /usr/lib/debug/.build-id/xx/yyyy.debug.
  5. Report the attempted paths clearly if the symbols cannot be found.

Included in this draft

  • a small ELF build-ID helper;
  • a test-only alternate debug root so tests never write to /usr/lib/debug;
  • a detached-debug-file fixture test;
  • evidence collection for the actual system loader;
  • integration points for the lower half.

Design question for maintainers

I would appreciate guidance on the preferred implementation mechanism. The draft uses a self-contained helper, but I am happy to adapt it to an existing MANA ELF utility, libelf/elfutils, or another dependency already preferred by the project. I do not propose invoking readelf from production code.

Validation

bash test_build_id_helper.sh /tmp/mana-build-id-test
make -j$(nproc) mana
real Ubuntu loader lookup without compatibility symlink: passed
existing MANA unit tests: baseline results recorded separately

Scope

This draft addresses only loader debug-file discovery. It does not change coordinator behavior, restart semantics, DMTCP source, or distributed test orchestration.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9c9d2f09-bec0-4885-b758-28378392b4a5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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