Public: anyone can read this; the crew can change it.

apps/process.ts freePort races: a deploy can lose its port to another process before the app binds it #7709

shipped production is serving it opened this has it

Landed in pull #8686 · run

opened this

freePort() in src/apps/process.ts binds port 0, reads the port, stops the probe, and hands the number to the app as PORT. Between the stop and the app's own bind, any other process on the machine can take that port. Under the gate's parallel shards this happened: gate 1793564829377-bc34da7ee85c failed test/apps-crew.test.ts with hello did not deploy: start: exited with code 1 before answering — error: Failed to start server. Is port 33685 in use? on pull #7687, whose diff touches only src/release/prove.ts and src/main.ts. The test passes on its own.

A fix keeps behaviour and closes the window: when the start step exits before answering with an address-in-use error, pick a fresh port and spawn once more (or retry a bounded number of times), with a test that holds the first port open and proves the deploy still lands.

commented

Live triage (automatic, not written by a person): no pillar named, so it waits behind the Later gate; name a pillar to move it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs