Severity: HIGH Status: ✅ RESOLVED
Three sites treat a non-atomic queue as atomic:
behind or an appendSlice fails (catch continue at :3128) between them, the header reaches the wire without its body. The client’s stream parser then consumes the next frame’s bytes as the missing body — display garbled until a .redraw.dc.out_buf.clearRetainingCapacity() (:3126) before the frame discards anything queued since the last flush, including urgent command replies — the exact guarantee bug #376 documents (:2660-2663)..detach action queues the detach packet (:1113) and one statement later dc.deinit(self.allocator) (:1120) frees out_buf. On EAGAIN the packet never leaves; the client stays “attached” to a server that stopped rendering to it — the silent-truncation failure the code comment at :1107-1109 says bug #374 fixed.Fix: enqueue header+body as one operation (append both to a scratch, queue once); never clearRetainingCapacity while a reply backlog exists; for detach, keep the DisplayClient alive until the buffer flushes (or close the fd so the client sees EOF).