Repository navigation
fix(testing): bound every smoke run with a timeout and decode output as UTF-8 - #416
Merged
Merged
Conversation
…as UTF-8 About 284 sequential Blender runs shared one 75-minute job timeout and no per-run limit, so a single hang (Cycles, xvfb, a stuck handler) ate the whole job, and because the status record was written only after wait(), the summary never named the example that hung. run_example.py now streams through a reader thread and waits with a timeout (--timeout, default $BDT_SMOKE_TIMEOUT or 900 s). On expiry it kills the whole process group (xvfb-run and Blender; taskkill /T on Windows), records FAIL "timeout after Ns", and the catalog moves on. A catalog row may set "timeout" for a legitimately slow example; the catalog lint validates it. The weekly falsifier sweep gets the same bound. Output is now decoded as UTF-8 with replacement. Blender writes UTF-8, and the locale codec (cp1252 on Windows) raised UnicodeDecodeError on bytes such as 0x9D, crashing the runner with Blender still alive. run_catalog also deletes a row's expect_file before running it, so a render left by an earlier local run cannot satisfy the check. Closes #402 Refs #403 Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
CI evidence before merge: all checks pass ( 13 pass ). Blender Smoke on PR head: Blender 5.2.2 LTS / Blender 4.5.14 LTS. Summaries (happy path; falsifiers) per leg: 143 passed, 1 skipped, 0 failed;142 passed, 0 skipped, 0 failed;141 passed, 3 skipped, 0 failed;136 passed, 6 skipped, 0 failed; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #402. Refs #403: this fixes the encoding crash and the stale
expect_file. Status-file truncation is deliberately not done, see below.Problem
wait(), so the summary never named the example that hung.UnicodeDecodeErrorin the read loop, which crashed the runner and left Blender running.Change
run_example.py:stream(): a reader thread plusproc.wait(timeout=…);--timeout(default$BDT_SMOKE_TIMEOUTor 900 s);start_new_session+killpg;taskkill /Ton Windows) and records FAIL "timeout after Ns (process group killed)";run_catalog.py:timeout;expect_filebefore running it, so a render left by an earlier local run can't satisfy the check.check_smoke_catalog.py: acceptstimeoutand requires it to be a positive number.check_falsifier_targets.py --run(the weekly sweep): a 900 s bound per run; a timeout counts as a mismatch and the sweep continues.--statusinrun_catalog. CI's canary and template steps append to the same JSONL before the catalog runs, so truncating it would erase their records. CI is unaffected by stale records becauseRUNNER_TEMPis fresh.Evidence
Unit tests (
tests/smoke/test_harness.py, Python 3.13, Windows): 40 tests OK, 1 skipped (the POSIX grandchild-kill test, which runs on Linux CI). New tests:Nonein under 30 s, with output captured;b'\xe2\x80\x9d'decodes to U+201D;timeoutis forwarded;expect_fileno longer satisfies a row.Falsified:
encoding="cp1252", errors="strict"restored, the UTF-8 test fails withUnicodeDecodeError: 'charmap' codec can't decode byte 0x9d.proc.wait()restored, the hang test hangs until killed externally, which is the bug.Live run with real Blender (
.scratchbinary reporting 5.2.1 LTS):bmesh-gearviarun_example.py[PASS], exit 0time.sleep(120),--timeout 5[FAIL] hang-probe: timeout after 5s (process group killed)after 5 s.Get-Process blendercount afterwards: 0. JSONL recordproc_exit: null.summarize.pytables it as FAIL with the reasoncheck_smoke_catalog.pyandcheck_falsifier_targets.pypass.🤖 Generated with Claude Code