[pr-diagnostics][startup][shaders] Capture bounded stderr from failed warm workers #125

Manually merged
TrustNo1 merged 0 commits from ALeCs1080/Darner:codex/dar-006-3 into main 2026-12-04 02:13:50 +00:00
Contributor

Contributor role (optional)

  • Fluxer ID: 1576348275320041472

What it changes

Refs #70. During preload, a failed warm --these child can leave the parent with an exit code and no useful stderr. A normal memory-admission deferral leaves the process running. The child's exit code alone cannot identify the failure stage. See the issue #70 investigation.

Set DARNER_WARM_CAPTURE_STDERR=1 before darner preload, or pass --set DARNER_WARM_CAPTURE_STDERR=1 to darner play --preload. An opted-in warm worker uses one reader thread, an 8 KiB rolling tail, and a 4 KiB scratch buffer. The Windows pipe reader drains concurrently with stdout and stops without waiting for EOF. The parent emits one escaped diagnostic after a failed child has been reaped. Review the diagnostic locally and redact personal paths, credentials, and sensitive content before sharing it.

The default keeps stderr suppressed and creates no capture resources. Stdout parsing, watchdog timing, retries, quarantine, and compile-memory safeguards are unchanged. PR #110 is the separate memory-floor change.

How it was tested

  • Tested revision: 02306be26af03e1f96db1ccd3e16e0e2f9e96f2a on Main 57dea7f2367c4e902b8ef507f90536564b670b04, Windows 10 x64.
  • Commands and results:
    • cargo test -p darner --bin darner --locked warm:: -- --test-threads=1 — 21 passed. Synthetic cases cover stderr larger than pipe capacity, stdout progress, watchdog termination, and cleanup with a writer still open.
    • cargo run --quiet --package xtask --locked -- policy --staged — 3 files passed before commit.
    • cargo clippy --workspace --all-targets --locked -- -D warnings — passed.
    • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings — passed.
    • cargo test --workspace --locked — stopped in darner-gpu with exit 3. The exact ambient::tests::the_passes_build test exited 3 on both the candidate and clean Main. This host's inbox runtime reported Shader Model 6.5 and refused a directly indexed root signature.
  • Gameplay, when relevant: no gameplay run.
  • Before and after, when relevant: the same host reproduced the ambient failure on the candidate and clean Main.
  • Shader wave sizes tested, when relevant: not applicable to this host diagnostic.
  • Coverage gaps: the workspace suite did not finish on this host. No title-session reproduction of the reported child exit or gameplay stall was attempted.

Checklist

  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: #110 changes the soft memory-floor default. Targeted open and closed searches for warm stderr, warm child failures, and warm.rs found no competing capture. The full open-PR file inventory was not verified.
## Contributor role (optional) - Fluxer ID: 1576348275320041472 ## What it changes Refs #70. During preload, a failed `warm --these` child can leave the parent with an exit code and no useful stderr. A normal memory-admission deferral leaves the process running. The child's exit code alone cannot identify the failure stage. See the [issue #70 investigation](https://git.gtahub.st/TrustNo1/Darner/issues/70#issuecomment-851518). Set `DARNER_WARM_CAPTURE_STDERR=1` before `darner preload`, or pass `--set DARNER_WARM_CAPTURE_STDERR=1` to `darner play --preload`. An opted-in warm worker uses one reader thread, an 8 KiB rolling tail, and a 4 KiB scratch buffer. The Windows pipe reader drains concurrently with stdout and stops without waiting for EOF. The parent emits one escaped diagnostic after a failed child has been reaped. Review the diagnostic locally and redact personal paths, credentials, and sensitive content before sharing it. The default keeps stderr suppressed and creates no capture resources. Stdout parsing, watchdog timing, retries, quarantine, and compile-memory safeguards are unchanged. PR #110 is the separate memory-floor change. ## How it was tested - Tested revision: `02306be26af03e1f96db1ccd3e16e0e2f9e96f2a` on Main `57dea7f2367c4e902b8ef507f90536564b670b04`, Windows 10 x64. - Commands and results: - `cargo test -p darner --bin darner --locked warm:: -- --test-threads=1` — 21 passed. Synthetic cases cover stderr larger than pipe capacity, stdout progress, watchdog termination, and cleanup with a writer still open. - `cargo run --quiet --package xtask --locked -- policy --staged` — 3 files passed before commit. - `cargo clippy --workspace --all-targets --locked -- -D warnings` — passed. - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` — passed. - `cargo test --workspace --locked` — stopped in `darner-gpu` with exit 3. The exact `ambient::tests::the_passes_build` test exited 3 on both the candidate and clean Main. This host's inbox runtime reported Shader Model 6.5 and refused a directly indexed root signature. - Gameplay, when relevant: no gameplay run. - Before and after, when relevant: the same host reproduced the ambient failure on the candidate and clean Main. - Shader wave sizes tested, when relevant: not applicable to this host diagnostic. - Coverage gaps: the workspace suite did not finish on this host. No title-session reproduction of the reported child exit or gameplay stall was attempted. ## Checklist - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: [#110](https://git.gtahub.st/TrustNo1/Darner/pulls/110) changes the soft memory-floor default. Targeted open and closed searches for warm stderr, warm child failures, and `warm.rs` found no competing capture. The full open-PR file inventory was not verified.
First-time contributor

Built and ran the warm tests on Windows (RTX 5080): cargo build --release --locked -p darner succeeded and cargo test --release --locked -p darner warm passed 21/21 warm tests plus the cache_paths test. drains_large_stderr_without_changing_stdout_protocol confirms the 8 KiB bound: a 96 KiB stderr flood retains exactly 8192 bytes (total 98318, tail is the last bytes, ESC/newline escaped). A 10-minute darner warm --jobs 4 --limit 2000 with DARNER_WARM_CAPTURE_STDERR=1 made 2000 pipelines with 0 workers ending, so no failure diagnostic was produced; 18 untranslatable-shader warnings were handled in-process. Not tested: a real crashed/hung worker (none occurred) and preload's shader scan of the dump.

Drafted with AI assistance (OpenCode).

Built and ran the warm tests on Windows (RTX 5080): `cargo build --release --locked -p darner` succeeded and `cargo test --release --locked -p darner warm` passed 21/21 warm tests plus the cache_paths test. `drains_large_stderr_without_changing_stdout_protocol` confirms the 8 KiB bound: a 96 KiB stderr flood retains exactly 8192 bytes (total 98318, tail is the last bytes, ESC/newline escaped). A 10-minute `darner warm --jobs 4 --limit 2000` with `DARNER_WARM_CAPTURE_STDERR=1` made 2000 pipelines with 0 workers ending, so no failure diagnostic was produced; 18 untranslatable-shader warnings were handled in-process. Not tested: a real crashed/hung worker (none occurred) and `preload`'s shader scan of the dump. Drafted with AI assistance (OpenCode).
TrustNo1 manually merged commit 4b915f1421 into main 2026-12-04 02:13:50 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!125
No description provided.