Skip to content

fix(valgrind): skip rustup-wrapped proxy in trace-children#405

Open
not-matthias wants to merge 1 commit into
mainfrom
cod-2850-codspeed-cli-fails-with-rustup-proxy-error-in-nix-flake
Open

fix(valgrind): skip rustup-wrapped proxy in trace-children#405
not-matthias wants to merge 1 commit into
mainfrom
cod-2850-codspeed-cli-fails-with-rustup-proxy-error-in-nix-flake

Conversation

@not-matthias

Copy link
Copy Markdown
Member

No description provided.

Valgrind rewrites argv[0] when tracing Nix's rustup wrapper, breaking
rustup proxy detection. Add *.rustup-wrapped to --trace-children-skip.
@not-matthias not-matthias force-pushed the cod-2850-codspeed-cli-fails-with-rustup-proxy-error-in-nix-flake branch from 723f6f7 to b41f203 Compare June 12, 2026 14:57
@not-matthias not-matthias marked this pull request as ready for review June 12, 2026 14:57
@greptile-apps

greptile-apps Bot commented Jun 12, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds *.rustup-wrapped to Valgrind's --trace-children-skip list to prevent Valgrind from tracing the Nix-wrapped rustup proxy — when Valgrind traces child processes, it mutates argv[0], which breaks rustup's proxy detection mechanism.

  • Adds \"*.rustup-wrapped\" alongside \"*esbuild\" in the static children_skip_patterns array, with an explanatory comment.
  • Adds test_valgrind_skips_rustup_wrapped_proxy that asserts the pattern is present in the generated Callgrind arg list.

Confidence Score: 5/5

Safe to merge — the change is a one-line addition to a static string array with a targeted unit test verifying the new pattern is emitted.

The fix is narrow: appending *.rustup-wrapped to an existing skip-patterns array and adding a test that asserts the pattern appears in the generated arg list. The pattern is tool-agnostic (applied before the Callgrind/Tracegrind branch), the glob syntax is consistent with the existing *esbuild entry, and the explanatory comment correctly describes the Nix argv[0] mutation issue.

No files require special attention.

Important Files Changed

Filename Overview
src/executor/valgrind/measure.rs Adds *.rustup-wrapped to the static skip-patterns array and a matching unit test; change is minimal and isolated.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[measure: setarch + valgrind] --> B[get_valgrind_args]
    B --> C["--trace-children=yes"]
    B --> D["--trace-children-skip=\n*esbuild,*.rustup-wrapped"]
    A --> E[wrapper script]
    E --> F[bench command subprocess]
    D -->|matches| G["*.rustup-wrapped\n(Nix rustup proxy)\n→ SKIPPED"]
    D -->|matches| H["*esbuild\n→ SKIPPED"]
    F --> I[other child processes\n→ TRACED]
Loading

Reviews (1): Last reviewed commit: "fix(valgrind): skip rustup-wrapped proxy..." | Re-trigger Greptile

@codspeed-hq

codspeed-hq Bot commented Jun 12, 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-2850-codspeed-cli-fails-with-rustup-proxy-error-in-nix-flake (b41f203) with main (41f4db9)

Open in CodSpeed

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