A stopped renderer leaves the title waiting on fences that are never reached #213

Closed
opened 2026-12-02 13:53:09 +00:00 by github-bot · 1 comment
Owner

@⁠TheRifai on GitHub · 2026-12-02 13:48 UTC · original

Finding (TASKS item "Renderer failure handling")

Seen on: main 963df8e (code read; not a reproduced crash).

When the renderer thread stops, it logs and keeps draining so the title never blocks on the event queue, but live_done still has no fences left to give:

  • greenfield/wine/vkback-unix/src/lib.rs:473,497,523 — idle-tick panic, batch panic and list-stage panic all set STOPPED, call maporder::stop(), drain, and return with the line "...it stops (the title goes on)".
  • live_done (lib.rs:759) waits up to the requested timeout and returns c.ret = 0 with no ready fences; the signaller thread (crates/victory-gpu/src/vklive.rs:60-79) only stops when st != 0 || call.ret < 0.
  • There is no unix-side op that ends the process. Calling abort()/ExitProcess from this thread would skip unixgate::close() and add a panic_cannot_unwind abort on top of the real failure (issue #60).

So a renderer stop leaves the title waiting on fence values that will never be reached, with only a log line saying it goes on.

What is already fixed

greenfield/vkback/src/submit.rs:135-142 rolls the serial back when vkQueueSubmit fails, so a failed submit without device loss no longer publishes a serial the timeline never reaches. That half of the task is done; this issue is only the stopped-renderer half.

Next

Decide the owner of process termination. A safe shape would be for the PE side to observe STOPPED through live_stats (c.o[2]) and use the loader's existing exit path (which closes the unix gate first, #64) with the reason from the log and a dedicated exit code — rather than adding an exit call to the unix library. No code change from me; no hardware claim.

**@⁠TheRifai** on GitHub · 2026-12-02 13:48 UTC · [original](https://github.com/vktory6/VKtory/issues/213) ## Finding (TASKS item "Renderer failure handling") **Seen on:** main `963df8e` (code read; not a reproduced crash). When the renderer thread stops, it logs and keeps draining so the title never blocks on the event queue, but `live_done` still has no fences left to give: - `greenfield/wine/vkback-unix/src/lib.rs:473,497,523` — idle-tick panic, batch panic and list-stage panic all set `STOPPED`, call `maporder::stop()`, drain, and return with the line "...it stops (the title goes on)". - `live_done` (`lib.rs:759`) waits up to the requested timeout and returns `c.ret = 0` with no ready fences; the signaller thread (`crates/victory-gpu/src/vklive.rs:60-79`) only stops when `st != 0 || call.ret < 0`. - There is no unix-side op that ends the process. Calling `abort()`/`ExitProcess` from this thread would skip `unixgate::close()` and add a `panic_cannot_unwind` abort on top of the real failure (issue #60). So a renderer stop leaves the title waiting on fence values that will never be reached, with only a log line saying it goes on. ## What is already fixed `greenfield/vkback/src/submit.rs:135-142` rolls the serial back when `vkQueueSubmit` fails, so a failed submit without device loss no longer publishes a serial the timeline never reaches. That half of the task is done; this issue is only the stopped-renderer half. ## Next Decide the owner of process termination. A safe shape would be for the PE side to observe `STOPPED` through `live_stats` (`c.o[2]`) and use the loader's existing exit path (which closes the unix gate first, #64) with the reason from the log and a dedicated exit code — rather than adding an exit call to the unix library. No code change from me; no hardware claim.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 13:53:10 +00:00
Author
Owner

@⁠vktory6 on GitHub · 2026-12-02 16:01 UTC · original

Thanks, the code read checks out. I added it to the TASKS item "Renderer failure handling" with your next step (the PE side reads STOPPED and exits through the loader's path, which closes the unix gate first): github.com/vktory6/VKtory@dcb33f3. Closing here, the task tracks it.

**@⁠vktory6** on GitHub · 2026-12-02 16:01 UTC · [original](https://github.com/vktory6/VKtory/issues/213#issuecomment-7351328835) Thanks, the code read checks out. I added it to the TASKS item "Renderer failure handling" with your next step (the PE side reads `STOPPED` and exits through the loader's path, which closes the unix gate first): https://github.com/vktory6/VKtory/commit/dcb33f3. Closing here, the task tracks it.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
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
github/vktory6--VKtory#213
No description provided.