Files
velzieandClaude Opus 5.5 dab67632e7 gl: an exited GL program is forgotten, and forgetting one no longer hangs
Nothing told the compositor a process had exited: compositor.js had no
dropMemory and the page passed the host no onExit. So every Wayland or GL
client's whole memory stayed held by the compositor Worker, and the host's
Mesa kept each GL program's context and windows; a second glxgears, given
the first one's X window id, matched both. runtime.js now sends
drop-memory on a process's exit (not a thread's), through compositor.js
and the in-realm system-worker compositor alike.

That made the forget run, which then never returned:
gex_gl_forget_client dropped surfaces until none were left, but dropping
the current one points the context at another, and with none left that is
surface 0, made anew. The compositor Worker spun in st_framebuffers_purge
for good (stack taken over CDP) and drew and answered nothing. The context
is now destroyed first and the surfaces dropped with nothing to re-point
to. drop_surface also takes the drawable out of st/mesa's table of live
drawables, which kept a pointer to freed memory that the next client's
drawable, at the same address with the same ID, was taken for.

mesa-gl.js: a forget that lands while a submit is suspended waits for it,
as display() does, rather than re-entering the module.

tests/demo/desktop.mjs: after each glxgears exits, the host's Mesa must
hold none of its GL windows (describe().glWindows); a compositor that stops
answering gets its Workers' stacks printed (workerStacks, over CDP); a null
readout prints the compositor's log, which now says why; DEMO_STDERR
saves the browser's whole stderr.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_ea9f71488b6e448da93d6c2dabf4879c
2026-10-12 18:12:59 -04:00
..