Skip to content

fix(valgrind): install libc6-dbg during valgrind setup#394

Open
not-matthias wants to merge 1 commit into
mainfrom
cod-2770-unresolved-symbol-in-exec-cli-simulation-benchmarks
Open

fix(valgrind): install libc6-dbg during valgrind setup#394
not-matthias wants to merge 1 commit into
mainfrom
cod-2770-unresolved-symbol-in-exec-cli-simulation-benchmarks

Conversation

@not-matthias

Copy link
Copy Markdown
Member

This takes around 10 seconds, so it shouldn't be an issue that it's not cached + prevents complexities of cache invalidation

@codspeed-hq

codspeed-hq Bot commented Jun 5, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

✅ 7 untouched benchmarks


Comparing cod-2770-unresolved-symbol-in-exec-cli-simulation-benchmarks (23e64a3) with main (7e86f11)

Open in CodSpeed

@greptile-apps

greptile-apps Bot commented Jun 5, 2026

Copy link
Copy Markdown

Greptile Summary

This PR installs libc6-dbg (glibc debug symbols) alongside the CodSpeed valgrind binary during the valgrind setup step, fixing crashes on GitHub-hosted runners that ship without those symbols by default.

  • is_valgrind_installed() is extended to require both valgrind (via get_valgrind_status) and libc6-dbg (via the new apt::is_package_installed helper), so a stale cache entry that only contains valgrind will no longer be treated as a complete installation.
  • libc6-dbg is added to the same apt::install call as the valgrind .deb and to the returned package-names vector, ensuring it is cached and subject to the same idempotency logic as valgrind itself.

Confidence Score: 5/5

The change is safe to merge; it correctly fixes the missing libc6-dbg on GitHub runners and properly threads it through both the install and cache layers.

Both the installation path and the idempotency guard (is_valgrind_installed) are updated consistently. Stale caches that contain valgrind but not libc6-dbg will correctly fall through to a full reinstall because is_package_installed returns false. The issues flagged in previous review threads have all been addressed in this revision.

No files require special attention.

Important Files Changed

Filename Overview
src/executor/helpers/apt.rs Adds is_package_installed helper that shells out to dpkg -s and checks the exit code correctly.
src/executor/valgrind/setup.rs Updates is_valgrind_installed to require libc6-dbg presence, and co-installs and co-caches it with valgrind, correctly handling stale-cache and fresh-install scenarios.

Sequence Diagram

sequenceDiagram
    participant CI as CI Runner
    participant IC as install_cached
    participant IV as is_valgrind_installed
    participant DS as dpkg -s libc6-dbg
    participant APT as apt::install
    participant Cache as Cache Dir

    CI->>IC: install_valgrind(system_info, cache_dir)
    IC->>IV: is_valgrind_installed()
    IV->>IV: get_valgrind_status()
    IV->>DS: dpkg -s libc6-dbg
    DS-->>IV: exit 0/1
    IV-->>IC: true / false

    alt Both valgrind and libc6-dbg present
        IC-->>CI: Ok(()) skip install
    else Stale cache missing libc6-dbg
        IC->>Cache: restore_from_cache()
        IC->>IV: is_valgrind_installed() again
        IV->>DS: dpkg -s libc6-dbg
        DS-->>IV: exit 1
        IV-->>IC: false fall through
        IC->>APT: install valgrind.deb libc6-dbg
        APT-->>IC: Ok(())
        IC->>Cache: save_to_cache valgrind libc6-dbg
    else Fresh install
        IC->>APT: install valgrind.deb libc6-dbg
        APT-->>IC: Ok(())
        IC->>Cache: save_to_cache valgrind libc6-dbg
    end
    IC-->>CI: Ok(())
Loading

Reviews (3): Last reviewed commit: "fix(valgrind): install libc6-dbg during ..." | Re-trigger Greptile

Comment thread src/executor/valgrind/setup.rs Outdated
Comment thread src/executor/valgrind/setup.rs Outdated
Comment thread src/executor/valgrind/setup.rs Outdated
@not-matthias not-matthias force-pushed the cod-2770-unresolved-symbol-in-exec-cli-simulation-benchmarks branch from 1431b05 to 5a1963a Compare June 11, 2026 09:19
GitHub runners do not ship libc debug symbols by default, which leads
to unresolved symbols in exec CLI simulation benchmarks. Install
libc6-dbg via apt on supported systems after installing valgrind.

Fixes COD-2770
@not-matthias not-matthias force-pushed the cod-2770-unresolved-symbol-in-exec-cli-simulation-benchmarks branch from 5a1963a to 23e64a3 Compare June 11, 2026 09:21
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