Skip to content

resolve: passAsFile importcfg_entries (dynamic-mode link drv exceeds MAX_ARG_STRLEN on torture)#127

Merged
aldoborrero merged 1 commit intomainfrom
aldo/resolve-passasfile-importcfg
Apr 16, 2026
Merged

resolve: passAsFile importcfg_entries (dynamic-mode link drv exceeds MAX_ARG_STRLEN on torture)#127
aldoborrero merged 1 commit intomainfrom
aldo/resolve-passasfile-importcfg

Conversation

@aldoborrero
Copy link
Copy Markdown
Member

Follow-up to #125 — second commit there didn't land. The dynamic-mode link drv puts ~3270 packagefile lines into one importcfg_entries env var (~400KB), which exceeds Linux's MAX_ARG_STRLEN (128KB) and the builder exec fails with Argument list too long. passAsFile makes Nix write it to a temp file. With this + #125, bench-incremental --fixture torture --tools nix-dynamic (from #124) completes.

The link drv's importcfg_entries env var holds one packagefile line per
transitive dep — ~400KB on torture (3270+ packages), which exceeds
Linux's 128KB MAX_ARG_STRLEN and fails the builder exec with "Argument
list too long". passAsFile makes Nix write it to a temp file and pass
the path instead. Same for per-package compile drvs (smaller but no
reason to differ). Dag mode already does this for compileManifestJSON.

:house: Remote-Dev: homespace
@aldoborrero aldoborrero added this pull request to the merge queue Apr 16, 2026
Merged via the queue into main with commit 02b1dad Apr 16, 2026
3 checks passed
@aldoborrero aldoborrero deleted the aldo/resolve-passasfile-importcfg branch April 16, 2026 13:05
@github-actions
Copy link
Copy Markdown

Benchmark Regression Check

Scenario Tool Base (s) Current (s) Change Drvs (base) Drvs (curr) Status
no_change nix-ca-nocgo 0.68 0.68 +0.5% 0 0 ok
no_change nix-nocgo 0.68 0.68 +0.3% 0 0 ok
leaf-private nix-ca-nocgo 1.96 1.86 -5.1% 2 2 ok
leaf-private nix-nocgo 1.48 1.56 +5.1% 2 2 ok
mid-private nix-ca-nocgo 2.06 1.97 -4.2% 2 2 ok
mid-private nix-nocgo 1.61 1.55 -4.0% 4 4 ok
deep-private nix-ca-nocgo 2.32 2.30 -1.1% 3 3 ok
deep-private nix-nocgo 1.89 1.79 -5.5% 8 8 ok

Baseline: main | Current: 32d855807e0e77768b5a7c05336c45432fb955a3

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