Skip to content

Install lsof and procps in the sandbox base image - #1121

Merged
pcapriolo-yc merged 1 commit into
qm-29-port-factory-loopfrom
sandbox-image-lsof
Sep 11, 2026
Merged

Install lsof and procps in the sandbox base image#1121
pcapriolo-yc merged 1 commit into
qm-29-port-factory-loopfrom
sandbox-image-lsof

Conversation

@pcapriolo-yc

@pcapriolo-yc pcapriolo-yc commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Why

scripts/dev/lib/proc.ts finds a port's holder with lsof -ti tcp:<port>. The sandbox base image had no lsof, so inside a factory sandbox test/dev-supervisor-child.test.ts failed two port-ownership tests, never killed its TERM-ignoring squatter child, and hung npm run test:all for the rest of the run. Reproduced in a native arm64 sandbox container: both concurrent copies of the suite sat on that file for over ten minutes.

What

Add lsof and procps to the apt install in fly/Dockerfile. procps supplies ps, which the image also lacked.

Proof

Before: command -v lsof prints nothing in the container, and the file's tests 3 and 5 fail with web exited during startup and holders.includes(child.proc.pid) false. After the rebuild, the same file passes 5 of 5 in a fresh container from the new image. A fresh loop attempt is running on it.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

The dev supervisor finds a port's holder with lsof -ti tcp:<port>. The
sandbox image had no lsof, so the port-ownership tests failed, the
squatter child was never killed, and test/dev-supervisor-child.test.ts
hung the whole npm run test:all inside the factory sandbox. procps adds
ps for the same kind of process inspection.
@pcapriolo-yc
pcapriolo-yc marked this pull request as ready for review September 11, 2026 19:55
@pcapriolo-yc
pcapriolo-yc merged commit 220b95e into qm-29-port-factory-loop Sep 11, 2026
17 checks passed
@pcapriolo-yc
pcapriolo-yc deleted the sandbox-image-lsof branch September 11, 2026 19:55
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