Skip to content

fix(stdlib): honor proc_lib startup timeouts - #91

Merged
mremond merged 1 commit into
mainfrom
infinitary-batch/b4a29418
Nov 24, 2026
Merged

mremond merged 1 commit into
mainfrom
infinitary-batch/b4a29418

Conversation

@mremond

@mremond mremond commented Nov 24, 2026

Copy link
Copy Markdown
Member

Why

A finite process-startup timeout could wait forever when the child never acknowledged initialization.

What changed

  • Return {error, timeout} after stopping an unacknowledged child, without terminating the caller.
  • Preserve unrelated mailbox messages, successful startup links and existing startup-crash results.

Before and after

Before: The original implementation failed the regression's startup watchdog instead of honoring its finite timeout.

After: Finite and zero timeouts now match BEAM; four execution configurations each completed ten regression runs.

This changes library-call results and process lifetime, not a screen; real native and BEAM process transcripts demonstrate the behavior.

Checked

Live validation: Demonstrated for this version. 2 of 2 scenarios driven live in the product.

Scenario Result Evidence
Finite timeout stops the child and preserves callers and unrelated messages. ✅ Passed live Native default/single schedulers and both BEAM configurations passed real-process assertions.
Zero timeout cleans up startup signals while acknowledgement and pre-ack crash results remain correct. ✅ Passed live All four configurations passed; existing startup-crash coverage passed ten times per native configuration.
  • Complete local contribution gate: Ordered locked release builds and strict clippy passed; Rust passed 2,257 tests with one ignored; native passed 547 with two expected external skips; allocator and stacktrace probes passed.
  • Inherited storage-fixture limitation: The workspace gate fails one unchanged storage fixture under umask 0002 on untouched main too; the complete gate passed with umask 022.
  • Independent review and negative controls: Code and recorded process proof passed independent review. Original native and renamed-library BEAM implementations failed the startup watchdog.
  • Fresh post-review process proof: Native default/single schedulers, OTP 27 and renamed Nera library on BEAM each completed the regression again after code review.
How it was checked

cargo build --release --locked -p nera-runtime -j 4; cargo build --release --locked -p nera -j 4; cargo build --release --locked -j 4

cargo clippy --workspace --all-targets --locked -j 4 -- -D warnings

umask 022; cargo test --workspace --locked --no-fail-fast -j 4

python3 scripts/test-allocator-config.py; ./target/release/nera test -j 1 --timeout 30; python3 scripts/test-stacktrace-order.py

Ten consecutive runs each on native default schedulers, NERA_SCHEDULERS=1, OTP 27 and renamed Nera proc_lib on BEAM; fresh four-configuration post-review run.

Risk

Risk: low in every dimension.

Full risk assessment
Dimension Level Why
Blast radius low One standard-library startup receive path.
Behavior low Corrects ignored finite startup deadlines.
Undo low Revert without migration.
Evidence low Real native and BEAM processes demonstrate child death and caller results.
Sensitivity low No credentials or persistent data.
Novelty low Uses existing receive, unlink, kill and monitor operations.
Dependencies low No dependencies added or changed.
Not done

Spawn options remain ignored. Other native platforms and Ranch/Cowboy integration were not revalidated.

Return {error, timeout} after stopping an unacknowledged child, without terminating the caller.

Preserve unrelated mailbox messages, successful startup links and existing startup-crash results.
@github-actions github-actions Bot added this to the 0.1.1 milestone Nov 24, 2026
@mremond
mremond merged commit 055dd4f into main Nov 24, 2026
22 checks passed
@mremond
mremond deleted the infinitary-batch/b4a29418 branch November 24, 2026 21: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