You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
render: a present that never reaches the compositor leaves a stale frame and nothing retries it #2989
The window can keep showing an older frame indefinitely while the app is otherwise healthy, so the UI looks frozen ("nothing responds") even though input and IPC are alive.
Observed on 0.0.34 (pid=603801, 2026-11-08 00:18:35):
the user's screen was stuck on one frame;
the process was in do_epoll_wait at ~1.6% CPU and answered every bitty ctl request (instance list, window list, view list, terminal list);
bitty ctl workspace new + workspace focusrepainted the window (the compositor title changed with the newly focused pane), so the runtime re-presented as soon as a state change forced a frame;
bitty-runtime/src/runtime/present.rs already retries a failed present (#2570: surface_retry with backoff, re-armed on a retry tick). What it does not cover is a present that reports success but never reaches the compositor — a lost frame callback, an acquire that never completes, or a configure that is never followed by a commit. In that state the app believes it is idle, so no retry tick is armed and nothing forces a new frame until an unrelated event arrives.
bitty_render::telemetry already counts present_ok, present_err, acquire_timeout, acquire_outdated, acquire_lost, retry_failures, retry_recoveries and presenter_in_flight-style state in the crash/exit report, so the missing piece is a bounded stuck-present deadline with the same recovery the failed-present path has.
Acceptance
A present that is in flight past a bound (or an acquire that never acks) recovers and re-presents without waiting for an unrelated event.
The recovery is counted in the existing surface telemetry and reported in the stall/crash report.
A test drives a presenter that never acks and asserts the frame is re-presented within the bound.
The idle window keeps repainting its last known-good frame after a workspace switch, a resize, and an unfocused/focused transition.
Related: #2980 (a tokenless ack can arrive before the frame's own ack, in the same component), #2983 (the loop-stall evidence).
Third occurrence on the same live instance (pid=603801, 0.0.34, uptime 23 h), this time with the watchdog line at the exact moment the user reported the freeze:
bitty: main-loop stall detected: completed-tick ring gap (capacity=16 missed_at_most=4
seq=2104505..2104508, phase=chrome-bands, app_uptime=84157633 ms, pid=603801)
Written 02:21:25; the user reported the frozen screen at the same time.
Main thread was in do_epoll_wait at 1.5% CPU, 30 threads, and every bitty ctl verb answered instantly (instance list, workspace list, view list).
~/.local/state/bitty/stall-watchdog-delivery.log at the same time: attempts=57712 failures=429 last=delivered with repeated outcome=timed-out — the watchdog report itself is being delivered unreliably.
Forcing a repaint restored the screen immediately: bitty ctl workspace focus ws:1 then workspace focus ws:2. The user confirmed recovery. A view focus change alone does not repaint; a workspace focus change does.
Only two plugins are enabled: bitty-terminal.bar (local-path install, 19/19 grants, ~4.3 k lines of Lua, ~12 timer modules) and the bundled bitty-terminal.shell-integration.
The bar's host sensor commands are fast when probed (pactl info 58 ms, bluetoothctl show 16 ms, nmcli 95 ms, brightnessctl 11 ms, upower -d 29 ms), so a standing hanging sensor call is not the cause.
Phase::ChromeBands is set at crates/bitty-terminal/src/terminal_app.rs:1618, immediately before update_chrome_bands() reads mounted UiBlocks from the plugin runtime. Both known stalls (cold-commands, chrome-bands) are in plugin-runtime-adjacent phases, so the open question is whether the main thread can block there and consume frame damage without presenting.
Activity
Xuepoo commentedon Nov 7, 2026
Third occurrence on the same live instance (
pid=603801, 0.0.34, uptime 23 h), this time with the watchdog line at the exact moment the user reported the freeze:do_epoll_waitat 1.5% CPU, 30 threads, and everybitty ctlverb answered instantly (instance list,workspace list,view list).~/.local/state/bitty/stall-watchdog-delivery.logat the same time:attempts=57712 failures=429 last=deliveredwith repeatedoutcome=timed-out— the watchdog report itself is being delivered unreliably.bitty ctl workspace focus ws:1thenworkspace focus ws:2. The user confirmed recovery. Aview focuschange alone does not repaint; a workspace focus change does.bitty-terminal.bar(local-path install, 19/19 grants, ~4.3 k lines of Lua, ~12 timer modules) and the bundledbitty-terminal.shell-integration.pactl info58 ms,bluetoothctl show16 ms,nmcli95 ms,brightnessctl11 ms,upower -d29 ms), so a standing hanging sensor call is not the cause.Phase::ChromeBandsis set atcrates/bitty-terminal/src/terminal_app.rs:1618, immediately beforeupdate_chrome_bands()reads mountedUiBlocksfrom the plugin runtime. Both known stalls (cold-commands,chrome-bands) are in plugin-runtime-adjacent phases, so the open question is whether the main thread can block there and consume frame damage without presenting.fix(render): re-close the speculative gate when the repair cannot commit
fix(render): repaint once when the compositor never confirms a commit…
fix(render): queue a from-truth frame for a redundant reveal edge (#3031
[CTX-1907] fix(render): keep visible unconfirmed surfaces retrying fr…