HydraIssues

A kiosk overlay on the captured display blocks D3D12 device creation outright, and a routine hydrabody restart is enough to arm it
open bug Project: hydrabody Reporter: 8 Nov 2026 21:30

Description

Measured on cosmic-pretzel-98 (node-4c2be4b0) on 2026-11-08. An operator started World of Warcraft from ipad-head-cederik and watched a black screen for fourteen minutes while every layer reported success.

This is the recurrence of #377, which was closed. #377 point 1 was stale overlay processes and its proposal (a) was to kill any existing kioskoverlay.exe BY NAME before starting a new one. What shipped kills by PID at kiosk enable time, which does not cover tonight's path.

What happened

20:46:05  [kiosk] killed stale overlay PID 5424
20:46:05  Started kioskoverlay.exe defaultbackdrop.png in interactive session 1 (PID 36640)
20:46:05  [kiosk] kiosk mode enabled
21:08:51  [sunshine] API silent during session world-of-warcraft: context deadline exceeded - triggering kill
21:08:51  [stream] cleanup: world-of-warcraft (action=kill, reason=watchdog: sunshine-api, pid=0)
21:13:46  [sunshine] stream started: world-of-warcraft
21:13:47  [sunshine] no unclaimed PID for world-of-warcraft (Program) yet, session world-of-warcraft#2 stays untracked
21:13:47  [stream] stream started: world-of-warcraft orientation=landscape (layer 2 via Sunshine auto)

Note what is NOT in the 21:13 stream start: any kiosk line. Kiosk mode was already enabled from 20:46, so the launch path never ran, so the overlay was never reconciled. Overlay PID 36640 stayed up, fullscreen and topmost in session 1, for two and a half hours and straight through a watchdog kill and two ForceStops into a brand new stream.

Sunshine then captured the backdrop image faithfully. The head was healthy throughout: latency 38 ms, routing wireguard, and about 50 frames per second arriving and decoding, measured from the head log frame counters (frame 2718 to frame 3925 in 24 seconds).

The overlay did not merely cover the game, it blocked it

This is worse than #586, where the backdrop covers part of the window. The game never started drawing at all.

Wow.exe launched at 21:13:47 into session 1 with no arguments, with GxApi D3D12 and GxMaximize 1 in Config.wtf. It then created six empty log files and wrote nothing for fourteen minutes, never touching gx.log, while holding 393 handles, a 149 MB working set and burning CPU. The previous run had written 9320 bytes to gx.log.

The overlay process was killed at about 22:27:3x local. The SAME process, PID 17772, then immediately proceeded:

22:27:40.793  [0] Dx12 Device Create Successful (431.7 ms)
22:27:40.793  [0] Using shader family SM6

Working set went from 149 MB to 1.59 GB and CPU from 36 to 128 seconds. So an always on top fullscreen window on the captured display stops D3D12 device creation in a non Unreal title outright, for as long as it is there. #377 point 2 anticipated this for UE fullscreen detection. It is not limited to UE.

Two structural fixes

  1. Reconcile the overlay at STREAM START, not only at kiosk enable. Kill every kioskoverlay.exe by name, as #377 proposal (a) says, on every stream start, whatever the cached kiosk state believes. The cached state is exactly what failed here: hydrabody thought kiosk was already enabled and therefore did nothing. A kill by name needs no stored PID and survives a hydrabody restart.

  2. Keep adopting the application PID instead of giving up after one look. The 21:13:47 line says the PID was not there "yet" and the session stayed untracked from then on. Tonight the window appeared fourteen minutes later. An untracked session gets no lifecycle management, no window placement and no reliable cleanup, which is also why the watchdog logged pid=0 when it killed the earlier session. Retry adoption for as long as the stream lives, or adopt by executable path rather than by unclaimed PID.

A third, smaller one: when the overlay must exist while a stream is running, it must not be topmost on the captured surface. That is #586 and #373 and is not required to fix this.

How to reproduce

  1. Start a stream on a body and let hydrabody enable kiosk mode.
  2. Make Sunshine's local API time out, or kill the session so the watchdog fires. The overlay is left running.
  3. Start a new stream of a D3D12 title.
  4. The stream shows the backdrop. The title runs, burns CPU and never creates its graphics device.

Related

  • #377 is this defect, closed, with the right proposal (a) only half applied
  • #586 is the overlay covering part of a window, which is the milder form
  • #373 is the overlay on VDD blocking Mercator
  • #798 is the hourly provider 404 on this same body, which is noise in these logs
  • #974 is the orphaned session, which is how the 21:08 cascade started
  • hydraheadipad #1151 is the head crash that orphaned the first session

Second, independent occurrence, 2026-11-09, and it corrects this issue

Measured by another session on tvl-body-one, from an Interactive scheduled task running as tvl-body-one\tvl-experiencenet so that it genuinely sees session 1. Every reading below is theirs.

Before the kill: Wow.exe pid 44116, launched by Sunshine at 09:48:21, alive with NO top level window at all. 35 s of user CPU climbing at about 16% of a core. readOps frozen at 59 and readMB at 81 across three samples, so no disk work at all, a pure spin. The module list held only Wow_loader.dll plus base Windows DLLs, with no dxgi and no d3d12. Every Logs file from that day was zero bytes, and gx.log and Tact.log were untouched since 11/8 23:19.

After Stop-Process on kioskoverlay pid 14260: working set 122 MB to 589 MB in 3 s and to 1541 MB in 10 s. Modules 58 to 117, with dxgi.dll, d3d12.dll, D3D12Core.dll and nvapi64.dll appearing. gx.log wrote Dx12 Device Create Successful (430.1 ms). Same PID throughout, so the game was blocked mid initialisation and then resumed. It did not restart.

This matches the first occurrence line for line, including the 400 ms device creation and the 149 MB to 1.59 GB working set jump.

The correction, and it widens the issue

The overlay does NOT have to be left over from an earlier session. hydrabody pid 40844 restarted at 01:04:01 and spawned kioskoverlay pid 14260 one second later at 01:04:02. That overlay blocked the FIRST game launch of the day, nine hours later. A routine hydrabody restart is enough to arm this. The original title said the overlay survives a watchdog kill into the next stream, which describes only the first occurrence. The title is corrected.

The cheap fix, and it is now known to work

After the kill, hydrabody respawned the overlay within one second as pid 39968, and that fresh one is harmless: its window sits at x=-1920 on DISPLAY1, not on DISPLAY18, which is the primary display Sunshine captures. The game kept its device.

So the overlay does not need to stay dead. A kill and respawn at stream start is enough, and it is the cheaper of the two changes this issue asks for. It is also the one that unblocks the owner today. The PID adoption retry is still worth having, but it is not the blocker.

Reading hydrabody logs while working on this

no unclaimed PID ... stays untracked is NOT a launch failure. It means hydrabody looked once and gave up. The game can be running fine.

Fix written and pushed, hydrabody master 9bd4c58, 2026-11-09

NOT TAGGED. The owner is playing on that body, so the deploy is theirs to time. Written by another session, recorded here to keep one voice on the issue.

The overlay reports for itself. Once its window is created and shown, and before it enters its message loop, it sets the manual reset event Global\HydraBodyKioskReady and holds the handle until it exits. Holding the handle is the mechanism: the kernel destroys a named event when its last handle closes, so the event exists for exactly as long as that overlay runs. hydrabody opens and closes it on every check rather than caching it. An overlay that hung before creating the event fails the open, and one that hung after creating it but before showing the window fails the zero timeout wait.

hydrabody replaces an overlay that never signals, in two places. The periodic tick now reconciles rather than only relaunching a dead process. POST /api/v1/stream/started reconciles first thing in the handler, above the slot branch, because a hung overlay blocks every lane on the body and not only the single slot path. On a replace it waits up to 6 s for the new overlay to signal ready, because Sunshine launches the experience as soon as the hook returns and a half started replacement blocks device creation exactly like the one just removed.

It is a kill and respawn, not a suppress, and that is directly because the fresh overlay measured at x=-1920 on DISPLAY1 is harmless.

Three guards:

  • Startup grace of 5 s, so a healthy overlay is never killed while it is still decoding its backdrop and enumerating monitors. A stream start skips the interval but still honours this.
  • Minimum replace interval of 60 s, on the tick only, so a replacement that hangs the same way cannot turn the tick into a kill loop.
  • Give up after 3 fruitless replacements, resetting as soon as anything signals ready.

The third guard exists for a checked reason, not a guessed one. Creating a Global\ event needs SeCreateGlobalPrivilege, so the design rests on the interactive user holding it. Verified on cosmic before the commit: SYSTEM in session 0 can open Global\HydraBodyKioskStop, which the overlay created, and tvl-body-one\tvl-experiencenet is in Administrators. A body set up with a non administrator interactive session would otherwise have had its overlay replaced forever. It now degrades to the old behaviour with a log line saying why.

Testable on Linux. The policy sits in a new kiosk_reconcile.go with no Win32 in it: 14 cases over the grace period, the interval, force, the give up point, and that giving up on replacing never stops a dead overlay being relaunched. Full gate green including the Windows cross build and vet.

New diagnostic. kiosk/status gains overlay_ready beside overlay_running. A body reading running but not ready for more than a few seconds is now answerable from the API.

PID adoption retry is NOT in this commit and stays open, ranked below this.

Open question on the ready event, raised before the deploy. ANSWERED, and the answer was yes, see 791fa46 below

The ready event proves the overlay STARTED correctly. It does not prove the overlay is still pumping messages. If an overlay shows its window, sets the event, enters its message loop and then wedges, the event stays signalled and hydrabody reads it as healthy.

That shape may be real. The first occurrence on cosmic was described as a window titled "HydraBody Kiosk Overlay (Not Responding)", and a window that exists while not pumping messages is exactly a post ready hang. Today's occurrence on tvl-body-one had no visible window at all, which is a pre ready hang and IS covered.

So this fix covers the occurrence that was measured end to end, and the deploy should not wait on this question. But if the cosmic shape is the other one, a second mechanism is needed: either a heartbeat, the overlay re pulsing the event from inside its message loop with hydrabody requiring a recent pulse, or a liveness probe such as SendMessageTimeout with WM_NULL, or IsHungAppWindow. Confirm which shape cosmic had before deciding.

Both hang shapes are the SAME body, and the second one is now covered: 791fa46

Pushed to master on top of 9bd4c58. Still not tagged.

The framing above is corrected. cosmic IS tvl-body-one. One body has produced both shapes, so this was never two bodies failing two ways.

The post ready shape is confirmed from a transcript, not from memory. 24 separate captures of a window titled HydraBody Kiosk Overlay (Not Responding) at -1920,0 1920x1080. Full size, correct position, the same place the healthy overlay sits today, and not pumping messages.

The mechanism is in what it did to the diagnosing session. A ShowWindow call against that window blocked the script outright. A top level window that has stopped pumping messages wedges OTHER processes that make user32 calls. That is how it reaches the game, and it explains a game spinning on CPU with no disk work and no dxgi or d3d12 in its module list.

So the two shapes are:

Shape What the overlay had Caught by 9bd4c58 alone
Pre ready, today's occurrence Only its hidden console, titled with the exe path. It never reached createOverlayWindow YES
Post ready, the cosmic captures A full size correctly placed window, not pumping NO, it sails past the ready latch

What 791fa46 adds. The overlay pulses Global\HydraBodyKioskAlive, an auto reset event, from its WM_TIMER handler and NOWHERE ELSE. The placement is load bearing and the comment in the code says so: a goroutine would keep pulsing while the pump was wedged and would report the broken case as healthy, which is worse than having no check at all.

A pulse from the message loop was chosen over IsHungAppWindow or SendMessageTimeout for two reasons. Both probes need an HWND that hydrabody cannot get from session 0. And a pulse proves the loop actually RAN, which is a stronger claim than a probe getting one synthetic message answered.

No timestamp crosses a process boundary. Auto reset means consuming a pulse is itself the proof, with nothing to compare against. hydrabody remembers locally only when it last consumed one, because the overlay pulses on a 2 s timer while the provider tick can drop to every 5 s, so two close checks would otherwise find nothing to consume and condemn a healthy overlay. The allowance is 10 s. Ready is unchanged: a latch whose lifetime is the handle's.

Expected behaviour worth knowing when reading logs: SetEvent on an already signalled auto reset event does not queue, so at the moment an overlay wedges there can be at most ONE stale pulse left to consume. Detection therefore lags by a single check, which the 10 s allowance already absorbs.

Healthy now means BOTH signals. kiosk/status carries overlay_alive beside overlay_ready, and the two flags together name which shape a body has. That is the diagnostic nobody had this morning.

17 test cases in kiosk_reconcile.go, three of them for the new shape, including that alive without ready is still unhealthy so neither signal can carry the decision alone. Full gate green including the Windows cross build.

Testbook steps, e1f0898

Six steps, NOT WALKED. The one that matters is 7b-4, a genuinely wedged overlay. It cannot be faked by killing one, so the step says to SUSPEND the process, which stops the message loop without ending it and reproduces the post ready shape exactly.

Not walked because the body is in the owner's hands and suspending its overlay mid session is not something to do uninvited.

Precision on the occurrence count, 2026-11-09

The blocking is measured twice. The SHAPE is confirmed once. These are different counts and the record should not merge them.

Occurrence Shape How it is known
2026-11-08 evening, overlay pid 36640 UNKNOWN Game side readings only. Identical either way
2026-11-09 morning, overlay pid 14260 Pre ready, no overlay window at all, only its hidden console The window list, read from an Interactive scheduled task in session 1
Earlier, 24 captures Post ready, full size window at -1920,0 1920x1080, not pumping The window list. It blocked a diagnosing SCRIPT, not a game

Why the first one cannot be settled. Every reading taken of that overlay came through the exec API, which runs PowerShell as SYSTEM in session 0. From there MainWindowHandle is 0 and MainWindowTitle is empty for any session 1 process, whatever its real window. .NET's Process.Responding returns true when there is no main window handle, so the responding=True captures from that evening are artifacts of exactly the same defect and are NOT evidence the overlay was pumping. There is no window state from that evening to recover.

The phrase "HydraBody Kiosk Overlay (Not Responding)" in the open question section above came from the earlier captures, not from the 2026-11-08 occurrence. It should not be read as describing that evening.

What is and is not proven about the post ready shape. It has been caught wedging another process that made a user32 call, a diagnosing script, through ShowWindow. It has NOT been caught blocking a game. The mechanism carries across, because a game client is also a process making user32 calls, and 791fa46 covers both shapes regardless. So this changes nothing in the fix. It only means the honest count is one confirmed pre ready occurrence and one of unknown shape, not two of one shape.

Session Context

Venue
cloud-seven