mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:30:53 +01:00
[PR #2367] rdna2spirv: start a tool again when a Windows job refuses it with ERROR_NOT_ENOUGH_QUOTA (COMPUTE-WORKER-SPAWN-QUOTA) #2369
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2369
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2367
Author: @budanga
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:fix/compute-worker-spawn-quota📝 Commits (2)
80930f0rdna2spirv: start a tool again when a Windows job refuses it with ERROR_NOT_ENOUGH_QUOTA (COMPUTE-WORKER-SPAWN-QUOTA)1860dc5rdna2spirv: measured 10 s spawn retry budget, and say when it runs out (COMPUTE-WORKER-SPAWN-QUOTA)📊 Changes
2 files changed (+167 additions, -7 deletions)
View changed files
➕
tests/test_rdna2spirv_spawn_quota.py(+136 -0)📝
tools/rdna2spirv.py(+31 -7)📄 Description
Claimed in the coordination issue as: COMPUTE-WORKER-SPAWN-QUOTA (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7196128221)
What and why
scripts/translate_pipeline_compute.py --jobs Non native Windows fails now and then withand
tests/test_translate_pipeline_compute.py(WorkerParity) fails the same way.Cause: each Windows worker runs in a job that allows two active processes, itself and one tool (
TWO_ACTIVEinscripts/compute_workers_win.py). The worker runs spirv-as, then spirv-opt or spirv-val, one after another through_run_spirv_toolintools/rdna2spirv.py.subprocess.runreturns once the previous tool has exited, but the job can still count that process for a moment, soCreateProcessrefuses the next tool with ERROR_NOT_ENOUGH_QUOTA (1816).Measured with a minimal script that makes the job with
compute_workers_win.job(mib, True), puts a Python child in it and has the child start a short tool back to back (Windows 11 26300, Python 3.14.10, the machine busy with other work):spirv-val --version, in the jobcmd /c rem, in the jobspirv-val --version, no jobChange:
_run_spirv_toolstarts a tool again whenCreateProcessrefuses it with winerror 1816, with a doubling delay from 5 ms up to 100 ms, for at mostSPAWN_RETRY_SECONDS(10 s); then the error is raised as before, with a note saying how many times the tool was refused and for how long. The refused tool never started, so starting it again repeats nothing. It is the backofftools/replace_retry.pyuses for renames.New test,
tests/test_rdna2spirv_spawn_quota.py(standard library):cmd /c remthrough_run_spirv_toolinside a job made bycompute_workers_win.job(), as the worker does.On
mainthe new file fails (2 failures, 1 error, including the job test with WinError 1816); with the change it passes.Tested
On
fbf100b1b, Windows 11 Home 26300.9974, Python 3.14.10, SPIRV-Tools v2026.4 (Vulkan SDK 1.4.363.0), with the machine busy translating shaders in the background, as in the table:python -I tests/test_translate_pipeline_compute.py, 12 runs each:main3 passed, 9 failed (all WinError 1816); this branch 12 passed.python -I tests/test_rdna2spirv_spawn_quota.py: fails onmain; passes 7 of 7 runs here.python -m compileall -q make_game.py tools tests: clean.rdna2spirv: all pass. (test_make_game_argparse.pyfailed once under the load and passed 3 of 3 reruns, onmainas well.)python -I scripts/run_semantic_tests.py tests/semantic: 500 files, 6365 tests, 0 files failed.python -I scripts/check_no_game_data.pyon both files: passes.GPUs tested: n/a (no GPU involved)
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator rule; this changes how the tools are started)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.