mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-15 19:19:58 -04:00
Stop sending a request again to a new translator child after the first one gave no answer for the read timeout.
plat_child_read returned -1 both for a broken pipe and for a child that sent nothing for PLAT_CHILD_READ_MS (120 s), and svc_request retried any failure once on a fresh child. The translator is deterministic, so a program it hangs on hangs the second child too: a compute shader, which the replay thread looks up synchronously (vk_exec_draw.c shader_for), held the game for about 4 minutes instead of 2. plat_child_read now returns -2 on the timeout (win32.c and linux.c), child_exchange_raw returns 1, 0 for a broken pipe or a child that could not start, and -1 for the timeout, and svc_request stops the child and gives -1 without asking again; a dead child is still restarted once. translate_one fails such a request with its own reason, keeps its job and code for diagnosis and deletes whatever the stopped child wrote. The carry pass's child runs at idle priority, so a busy machine can starve it that long: carry_exchange does not resend after a timeout either, and carry_translate counts it as a failed input, not as an unavailable translator, so one slow program does not count towards the three that stop the pass. platform.h lets a build set PLAT_CHILD_READ_MS. Not reproduced before the change (no translator hang appears in the available logs). tests/child_timeout_check.py (new) builds the real child and request functions with a 300 ms timeout: a silent child gives -2 and costs one timeout with one child started, an exiting child is restarted once, an answering child gives its line. Every runtime file compiles, with no new warnings in gfx_shader.c and win32.c. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -653,6 +653,12 @@ A change to which translations of a previous translator are served (`runtime/gfx
|
||||
`gfx_shader.c` and runs them against stand-in caches: a translation whose texture pool array has the earlier length
|
||||
(32768) is freed and the lookup goes on, one with the current length or no pool is served. No game files, no GPU.
|
||||
|
||||
A change to how the translator children are read and restarted (`runtime/platform/win32.c` `plat_child_read`,
|
||||
`runtime/gfx_shader.c` `child_exchange_raw`, `svc_request`) passes `python tests\child_timeout_check.py`, which builds
|
||||
those functions with a 300 ms read timeout and runs `cmd.exe` children through them: one that never answers costs one
|
||||
timeout and is not asked again, one that exits is restarted once, one that answers gives its line. Windows only; no
|
||||
game files, no GPU.
|
||||
|
||||
A change to where the lazy write-back is on by default (`runtime/wb_lazy_choice.h`, `runtime/vk_memory.c`
|
||||
`vk_mem_lazy_decide`) passes `python tests\wb_lazy_check.py`, which builds the header alone and checks the choice and
|
||||
its reason by platform, by GPU driver and by what the player set. No game files, no GPU.
|
||||
|
||||
Reference in New Issue
Block a user