Skip to content

CI-WIN-TIMEOUT: a hung Windows runtime test fails on its own instead of cancelling the job - #361

Merged
QemmHD merged 1 commit into
ProjectLeonida:mainfrom
ItsMrDubey:ci-windows-runtime-time
Nov 24, 2026
Merged

QemmHD merged 1 commit into
ProjectLeonida:mainfrom
ItsMrDubey:ci-windows-runtime-time

Conversation

@ItsMrDubey

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: CI-WIN-TIMEOUT (#14 (comment))

What and why

Old #3828 ("Slow ci"). The Runtime workflow's windows job has not finished once in this repo's history. I went through all 205 Runtime runs (24 Nov 00:33 to 03:40 UTC):

  • Most cancellations are expected: cancel-in-progress on pull requests, plus main's own pending pushes being coalesced. Those jobs stop at 0-3 min, mostly before the build ends. That part is not a bug.
  • Every windows job that got as far as ctest (12 jobs, PR and main pushes) was cancelled at exactly 20 min by timeout-minutes, each time while Start 14: loader was running. Tests 1-13 take 0.01 s each. loader never finished, and in some of those jobs it ran a long time:
job build ctest before cancel sccache hits
138170026017 (PR) 3.1 min 15.7 min in loader n/a (0 requests: no-op build)
138163425093 (main push) 4.4 min 14.3 min in loader n/a
138148168066 (PR) 4.4 min 14.5 min in loader n/a
138170197402 (PR) 10.8 min 8.4 min in loader
138175312981 (PR, the one in the task) 15.9 min 3.0 min in loader 278/430 (64.7 %)
138143317266 (main push) 16.6 min 2.3 min in loader 284/430 (66.1 %)
138125499713 (main push, cold cache) 18.3 min 0.7 min 0/425

The same loader_test.exe passed in 11 s under Wine (job 138172394462, built from 760012c). Locally on Windows 11 it takes 12-50 s, depending on how hard Defender scans the images it writes. So the test does not hang everywhere. It hangs on the hosted Windows runner, which matches what #239 (45676e8) describes: the LEONIDA_COMPAT_DIR case loads a file Windows cannot map, and the runner waits on a "Bad Image" box. #239 merged at 03:36 UTC, after all of these runs, and no Windows job has run on it yet.

This PR keeps the next hang like that from eating the whole job, and gives a cold build enough time to finish:

  1. runtime/CMakeLists.txt: loader gets TIMEOUT 180. Without it the CTest default applies (include(CTest) means 1500 s), and that is longer than the job.
  2. runtime.yml: the Windows ctest step runs with --timeout 300. Any test without a TIMEOUT of its own now fails after 5 min instead of 25. Tests that set their own (900 s, 3600 s and so on) keep it. The slowest test on the Linux and macOS jobs is xdxr_build_check, at 49 s and 106 s.
  3. timeout-minutes goes from 20 to 35 on the windows job. The measured cold-cache build (main, job 138125499713) took 18.3 min of build plus about 0.7 min of setup, leaving under 1 min for 294 tests.

I checked the sccache setup and left it unchanged. CMAKE_CXX_COMPILER_LAUNCHER=sccache is set and debug info is already /Z7 (CMP0141=NEW, CMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded). The project is CXX only, so a C launcher would do nothing. PR runs hit 65-66 % from the GHA cache, and the misses are the changed sources. The build is slow because a 430-object MSVC build takes long, not because the cache is wired wrong.

Expected change: with #239 in, loader should pass in seconds and the job should finish in roughly 5-19 min of build plus the ctest run. If a test hangs again, the job reports that test as a Timeout failure within 3-5 min, instead of a 20-minute "The operation was canceled" with no test named.

Not covered here: the wine jobs on main pushes also hit their 20-minute limit. That run had several 120 s per-test timeouts (module_names: unimplemented KERNEL32.CopyFile2 under Wine; dxgi_host_parity; dxgi_waitable_latency). The loader test itself passed there.

Tested

Windows 11, Python 3.11.9, MSVC 14.29 + Ninja, no GPU.

  • Built loader_test on this branch. ctest -R ^loader$ --show-only=json-v1 shows TIMEOUT 180, and ctest -V prints "Test timeout computed to be: 180" (the property wins over --timeout 300). ctest -R ^loader$ --timeout 300: passed in 12.5 s.
  • loader_test.exe directly: 95 checks, 0 failed (36-50 s with Defender on).
  • I tried to reproduce the hang locally with the pre-pe_loader: a compat DLL Windows cannot load is refused without a "Bad Image" box (RT-COMPAT-ERRBOX) #239 build (c07ec72), including with the process error mode cleared to 0. It did not hang (93 checks, 0 failed, 28 s). The box seems specific to the runner, so the evidence for the hang is the CI logs above.
  • python -m pytest -q tests/test_runtime_paths.py tests/test_cmake_vulkan_missing.py: 7 passed, 3 skipped.
  • The workflow parses with PyYAML (timeout-minutes: 35, the new ctest command). actionlint was not available locally; the jactionlint job runs on this PR.
  • python -I scripts/check_no_game_data.py .github/workflows/runtime.yml runtime/CMakeLists.txt: clean.

AI-assisted: yes

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • n/a: no translator rule

demoz53 added a commit to demoz53/leonida that referenced this pull request Nov 24, 2026
…est fails on its own instead of cancelling the job
@Oliwettoo

Copy link
Copy Markdown

Looks good. Per-test --timeout 300 plus TIMEOUT 180 on loader turns a hung test into one failing test instead of a cancelled job, and the 35-minute job limit leaves room for a cold-sccache build. Not run (needs the Windows runner). AI-assisted review.

QemmHD added a commit that referenced this pull request Nov 24, 2026
Merging.

**Why merged:** Indexes the DXBC identities the Xbox native graphics pipelines use, which the native-PSO path needs. The earlier hold (new tool not listed as a translator input) is fixed in 62a9588: native_pso_hashes is now in translator_deps.cmake, make_game.py's translation sources and runtime.yml.

**Why it's good:** Security read of the three-dot diff: tools and tests only, no binaries, downloads or network calls. The PR's own tests: 129 passed. The consistency set, which caught the missing input registration last time, is clean now.

Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bc or 51f3160) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c24 (git merge-tree: 0 conflicts against current main). Repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests): 566 passed / 5 skipped / 0 failed on main and on main + batch. compileall OK. Full ctest: 302/304 on main and on main + batch (the same two pre-existing failures, d3d12_execute_indirect_validation and d3d12_depth_resolve, no new ones).

AI-assisted (Claude Code, Claude Opus 5.5).
QemmHD added a commit that referenced this pull request Nov 24, 2026
Merging.

**Why merged:** Adds the named NonSemantic.Shader.DebugInfo.100 instruction table so SPIR-V debug instructions disassemble by name. Oliwettoo checked that the table matches SPIRV-Headers' grammar exactly (44 names).

**Why it's good:** Data table plus tests only. Its tests: 47 passed. No behaviour change for shaders without debug info.

Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bc or 51f3160) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c24 (git merge-tree: 0 conflicts against current main). Repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests): 566 passed / 5 skipped / 0 failed on main and on main + batch. compileall OK. Full ctest: 302/304 on main and on main + batch (the same two pre-existing failures, d3d12_execute_indirect_validation and d3d12_depth_resolve, no new ones).

AI-assisted (Claude Code, Claude Opus 5.5).
QemmHD added a commit that referenced this pull request Nov 24, 2026
Merging.

**Why merged:** manifest_verifier refuses a --cache path that aliases the input manifest (another spelling, a hard link, a symlink or a case alias), which would otherwise overwrite the manifest: a real data-loss guard. Reviewed as good by Oliwettoo.

**Why it's good:** Its tests: 82 passed, 4 skipped. It merges cleanly together with #346, which touches the same tool; the cumulative run includes both. Note from Oliwettoo: this conflicts with #344, which will need a rebase.

Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bc or 51f3160) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c24 (git merge-tree: 0 conflicts against current main). Repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests): 566 passed / 5 skipped / 0 failed on main and on main + batch. compileall OK. Full ctest: 302/304 on main and on main + batch (the same two pre-existing failures, d3d12_execute_indirect_validation and d3d12_depth_resolve, no new ones).

AI-assisted (Claude Code, Claude Opus 5.5).
QemmHD added a commit that referenced this pull request Nov 24, 2026
Merging.

**Why merged:** manifest_verifier also protects every file the manifest lists from being overwritten by cache writes (the companion to #334). Reviewed as good by Oliwettoo.

**Why it's good:** Its tests: 83 passed, 4 skipped, on its own and stacked with #334.

Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bc or 51f3160) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c24 (git merge-tree: 0 conflicts against current main). Repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests): 566 passed / 5 skipped / 0 failed on main and on main + batch. compileall OK. Full ctest: 302/304 on main and on main + batch (the same two pre-existing failures, d3d12_execute_indirect_validation and d3d12_depth_resolve, no new ones).

AI-assisted (Claude Code, Claude Opus 5.5).
@QemmHD

QemmHD commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Merging.

Why merged: CI-only: a hung Windows runtime test now fails on its own (per-test ctest --timeout 300, TIMEOUT 180 on the loader test) instead of cancelling the whole job, and the job limit goes from 20 to 35 minutes. Each value is explained in a comment. Reviewed as good by Oliwettoo.

Why it's good: Workflow change with no new permissions, actions or downloads. The local tests it touches: 87 passed, 9 skipped. The runner-side effect can only be seen in CI, but there's nothing risky in it: the timeouts only turn hangs into failures.

Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bc or 51f3160) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c24 (git merge-tree: 0 conflicts against current main). Repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests): 566 passed / 5 skipped / 0 failed on main and on main + batch. compileall OK. Full ctest: 302/304 on main and on main + batch (the same two pre-existing failures, d3d12_execute_indirect_validation and d3d12_depth_resolve, no new ones).

AI-assisted (Claude Code, Claude Opus 5.5).

@QemmHD
QemmHD merged commit b98f152 into ProjectLeonida:main Nov 24, 2026
8 of 14 checks passed
QemmHD added a commit that referenced this pull request Nov 24, 2026
Merging.

**Why merged:** d3d12_xs_surface SDK discovery skips a Windows Kits version folder that lacks um/d3d12.h (a WDK-only folder), while an explicit WINDOWS_SDK_INCLUDE/SDK_INCLUDE is still taken as given. Reviewed as good by Oliwettoo.

**Why it's good:** Its tests: 18 passed, 1 skipped. The runtime build on this machine is unaffected (same ctest).

Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bc or 51f3160) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c24 (git merge-tree: 0 conflicts against current main). Repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests): 566 passed / 5 skipped / 0 failed on main and on main + batch. compileall OK. Full ctest: 302/304 on main and on main + batch (the same two pre-existing failures, d3d12_execute_indirect_validation and d3d12_depth_resolve, no new ones).

AI-assisted (Claude Code, Claude Opus 5.5).
QemmHD added a commit that referenced this pull request Nov 24, 2026
Merging.

**Why merged:** stale_build follows includes through the CMake include directories, so a header change in another include dir correctly marks a target stale. Dezmonius independently re-checked the fixed head; the "six failures" he first reported were the new tests running against the old implementation, which is expected.

**Why it's good:** Its tests: 55 passed, 8 skipped, and on current main with main's new tests/test_stale_build.py: 26/26.

Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bc or 51f3160) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c24 (git merge-tree: 0 conflicts against current main). Repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests): 566 passed / 5 skipped / 0 failed on main and on main + batch. compileall OK. Full ctest: 302/304 on main and on main + batch (the same two pre-existing failures, d3d12_execute_indirect_validation and d3d12_depth_resolve, no new ones).

AI-assisted (Claude Code, Claude Opus 5.5).
QemmHD added a commit that referenced this pull request Nov 24, 2026
Merging.

**Why merged:** Fixes the mesh half of #506: the statistics pool active during vkCmdDrawMeshTasksEXT no longer enables the two clipping counters that VUID-vkCmdDrawMeshTasksEXT-pipelineStatistics-07076 forbids. Verified on an RTX 5070 Ti (sodove), RTX 4080 (quartz-heron-58) and RX 7900 XTX (bvtterbroot), all with validation on; the rebase to 916dbc6 is byte-identical (range-diff checked). Merged on its own first because #577 is stacked on it.

**Why it's good:** On the 4070 SUPER with LEONIDA_VK_VALIDATION=1: plain main fails d3d12_mesh with 3x VUID-...-07076; main + #540 + #577 passes d3d12_mesh, replay_query_edges and replay_query_predication with 0 validation errors, and the counters match sodove's numbers (mesh-only C 8/0, PS 1024).

Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bc or 51f3160) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c24 (git merge-tree: 0 conflicts against current main). Repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests): 566 passed / 5 skipped / 0 failed on main and on main + batch. compileall OK. Full ctest: 302/304 on main and on main + batch (the same two pre-existing failures, d3d12_execute_indirect_validation and d3d12_depth_resolve, no new ones).

AI-assisted (Claude Code, Claude Opus 5.5).
QemmHD added a commit that referenced this pull request Nov 24, 2026
Merging.

**Why merged:** Stacked on #540: the clipping invocations of a mesh segment now come from a mesh-pipeline query, so CInvocations/CPrimitives stay correct for mixed vertex + mesh work. sodove verified the exact head, including the disconnected-feature negative control that found (and now proves fixed) a gap in the test.

**Why it's good:** The embedded SPIR-V in statistics_sum_spirv.h was recompiled from the PR's .comp: all 431 words are identical and spirv-val passes. d3d12_mesh with validation: 0 errors, mixed C 12 vs vertex-only C 2, so the mesh share is 10, as expected.

Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bc or 51f3160) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c24 (git merge-tree: 0 conflicts against current main). Repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests): 566 passed / 5 skipped / 0 failed on main and on main + batch. compileall OK. Full ctest: 302/304 on main and on main + batch (the same two pre-existing failures, d3d12_execute_indirect_validation and d3d12_depth_resolve, no new ones).

AI-assisted (Claude Code, Claude Opus 5.5).
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.

3 participants