Skip to content

fix: pin aube + note mise recursion fork bomb - #21

Closed
natevick wants to merge 2 commits into
mainfrom
fix/pin-aube-mise-recursion
Closed

fix: pin aube + note mise recursion fork bomb#21
natevick wants to merge 2 commits into
mainfrom
fix/pin-aube-mise-recursion

Conversation

@natevick

Copy link
Copy Markdown
Owner

Pins npm:@endevco/aube to an exact version. Resolving "latest" for an npm-backend tool makes mise shell out to npm view <pkg> dist-tags --json; on a pre-fix mise, npm inside that child resolves back to the mise shim and re-enters resolution. On 2026-08-12 that recursed 2,829 levels deep and OOM'd a 60Gi box twice.

The real fix is upstream — jdx/mise#8475, "strip mise shims from dependency_env PATH to prevent fork bomb". The affected machine was on 2026.2.17, six months behind it, and has been self-updated to 2026.8.5 (above the MISE_MIN this repo now declares). The pin stays as belt-and-braces: an exact version needs no registry lookup at all.

Evidence

  • Mechanism, from a snapshot taken mid-storm: 2,828 of 2,829 npm view processes had another npm view as their parent — recursion, not fan-out. All 2,839 matching processes were the dist-tags (latest-version) call; not one was versions. The pin removes exactly that call.
  • Failed-then-passed: mise outdated on a cold cache emitted the dist-tags call before the pin, and zero after — with 130 DEBUG lines confirming a real run rather than an error short-circuit.
  • Post-upgrade smoke test: cold cache, contained in a pids+memory-capped cgroup → npm view=0, exit 0.
  • Regression check: node/npm/ruby/python/aube all resolve correctly after the 6-month mise jump; mise ls reports no errors.

What this does not establish

The recursion was never reproduced in isolation — it needed a PATH condition I couldn't recreate on demand, so the upgrade is verified installed and the fix is documented upstream, but not demonstrated-gone by execution here. That asymmetry is why the pin stays rather than reverting to "latest" on the strength of the upgrade alone.

natevick and others added 2 commits August 12, 2026 12:09
Resolving "latest" for an npm-backend tool makes mise shell out to
`npm view @endevco/aube dist-tags --json`. In that child, `npm` resolves
to the mise shim, which re-enters tool resolution and issues the same
call again. On 2026-08-12 that recursed 2,829 levels deep, ~5,100
processes and 127,799 threads, exhausting 60Gi of RAM and all swap. It
OOM'd the box twice; the second time it went down hard.

Evidence: a snapshot taken mid-storm shows 2,828 of 2,829 `npm view`
processes have another `npm view` as their parent, rooted at a
`mise install ruby@2.6.10`. All 2,839 matching processes were the
`dist-tags` (latest-version) call; not one was the `versions` call.

An exact pin needs no registry lookup, so the seed cannot be issued.
Verified failed-then-passed: `mise outdated` on a cold cache emitted the
dist-tags call before this change and zero after, with the run still
healthy (no error short-circuit). aube still resolves and runs 1.33.1.

Residual, stated rather than hidden: `mise outdated`/`ls-remote` still
make a `versions` call, since querying the registry is what those
commands are for. No observed recursion used that path, and it cannot be
triggered by `mise install`, which is what rooted this. The underlying
mise bug is unfixed upstream here -- mise is 2026.2.17, six months stale.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ARNZyPcAj3K2LhupCDn5gQ
The pin alone reads as the fix; it isn't. jdx/mise#8475 ("strip mise
shims from dependency_env PATH to prevent fork bomb") fixes the class,
and this box was on 2026.2.17, six months before it. mise has since been
self-updated to 2026.8.5 here, above the MISE_MIN this repo declares.

The pin stays as belt-and-braces: an exact version needs no registry
lookup, so the seed cannot be issued even if a future mise regresses.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ARNZyPcAj3K2LhupCDn5gQ
@natevick

Copy link
Copy Markdown
Owner Author

Superseded: the real fix was upstream. mise on the affected box was 2026.2.17, six months before jdx/mise#8475 ("strip mise shims from dependency_env PATH to prevent fork bomb"); it has been self-updated to 2026.8.5, above the MISE_MIN install-mise.sh already enforces. Verified by execution: with aube back on "latest" and a cold cache, 2026.8.5 resolves the version over HTTP and spawns zero npm view subprocesses, so the recursion has no seed. No repo change needed — closing with an empty diff.

@natevick natevick closed this Aug 12, 2026
@natevick
natevick deleted the fix/pin-aube-mise-recursion branch August 12, 2026 19:16
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