GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Crawler probes spawn gem, python and npm with no timeout, so a hung shim hangs scan forever · Issue #845 · SocketDev/socket-patch Closed Labels agent:triagedarch-auditFiled by a scheduled architecture audit routine (see the architecture review discussion)Filed by a scheduled architecture audit routine (see the architecture review discussion)bugSomething isn't workingSomething isn't workingpriority:p1 Description[agent] Filed by the scheduled architecture audit routine (CLI and core). Register: C48. Kind: bug. Source: new finding; register C48. Problem
Every other production spawn hand-rolls its own
So a probe that can't answer is bounded in vendored Pipenv/Hatch and self-update, and unbounded in the crawlers that most commands run. Proof (debug build on
|
PATH prefix |
scan --json |
Elapsed | stdout |
|---|---|---|---|
real gem |
exit 1 (Connection refused), scannedPackages: 1 |
1 s | 432 bytes |
| shim exiting 1 | exit 1, same envelope | 0 s | JSON |
| hanging shim, run 1 | killed by timeout 45 (exit 124) |
45 s | empty |
| hanging shim, run 2 | killed by timeout 90 (exit 124) |
90 s | empty |
The shim log shows that both gem env gemdir and gem env gempath were spawned and neither answered. The scan never reached the API call, and --json printed nothing, so a CI job sits until its own job timeout and reports no reason.
None filed. This is the process-spawn counterpart of #570 (HTTP calls had no timeout, fixed by #581).
Medium. Any wedged toolchain shim (a version manager prompting for an install, a Ruby or Python waiting on NFS, a corporate wrapper waiting on a license server) hangs scan (verified above) with no diagnostic, and by reading also the other commands that crawl through the same probes (apply, vex, rollback, get). The four per-site budgets will keep drifting, and each new probe has to remember kill_on_drop.
utils/process.rs: async fn run_bounded(program: &Path, args, cwd: Option<&Path>, budget: Duration) -> ProbeOutcome. It uses tokio::process, null stdin, kill_on_drop(true), captured stdout and dropped stderr. ProbeOutcome distinguishes Ok(stdout), Failed, NotFound and TimedOut. Add one PROBE_TIMEOUT constant (10 s, matching three of the four sites), plus an env override if the contract wants one.CommandRunner::run async, with run_resolved built on run_bounded. Callers keep their mock runners. A TimedOut probe answers "no information", as a failed one does today, and logs one --debug line naming the tool and the budget.pipenv::installed_major, pypi_hatch::require_environment_context_support (after Fix vendored Hatch running a planted hatch (#613) #617 lands its resolve_tool change) and the npm_dir git exchange through it, with their own budgets as arguments. sanity_exec keeps its retry loop around run_bounded. Deleted: the four inline timeout + kill_on_drop blocks.utils/process.rs (+80), the four timeout sites (−40), and the probe callers in the npm, ruby, python and composer crawlers. Making the trait async there is mechanical, and the ruby and python callers drop their run_blocking wrappers. Estimated ~300 changed production lines. Out of scope: what the probes ask, and resolve_tool itself.
Command::output()/wait() remains outside utils::process (an architecture_tests grep guard, like the one PR Read NuGet and Cargo crawler project files through the FIFO-safe reader (#592) #602 adds for crawler reads).gem shim that sleeps on PATH, with a test-only budget override; scan --json returns within the budget, scans the project, and kills the shim.run_bounded: timeout, nonzero exit, missing program, and a child that is killed on drop.process.rs, pipenv, pypi_hatch, npm_dir gitignore and self-update sanity_exec tests stay green.Touches vendor/pypi_hatch.rs after PR #617 (#613). Independent of the HTTP retry work (#676).
audit-core: C11 tracking #843/#844, C48 #845 (probe deadlines)
[agent] Triaged as priority:p1, because a hung probe blocks the gem, PyPI and npm crawlers. No duplicate or existing fix PR found. It is the process-spawn counterpart of #570/#581 (HTTP timeouts). It touches vendor/pypi_hatch.rs after PR #617 lands.
Generated by Claude Code
[agent] Claiming this issue for the architecture refactor routine (highest leverage: p1 hang fix plus one bounded spawn primitive replacing the per-site timeout blocks, without touching crawler files that open PRs edit). Branch: arch-refactor/845-bounded-probes. Claim-ID: 2026-10-05T18:56:07Z-a3f91c
Slice 1: bound utils::process::run_resolved (every crawler probe) through one output_within primitive and route pipenv::installed_major, pypi_hatch and self-update sanity_exec through it. Remaining for a later slice: the npm_dir git exchange (open PR #837 edits that file) and the async CommandRunner trait.
Generated by Claude Code