DashboardopencodeserveSession outputDone deadlock

serveSession outputDone deadlock

Category: gotcha
Confidence: 1.00
ID: 01a07f79-8c67-7c46-9da3-99f8707d6188
Project ID: c0425955-02bc-4c17-9af2-b114c00077e7
Cross-project: No
Recalled in other projects: 0
Source session: 0HnYWt04hkHDZf4Yf
Created: 2026-09-08 05:24:27
Updated: 2026-09-08 05:24:27

Content

Trap: after systemd reports SubState=exited, waiting synchronously for output EOF looks necessary to drain buffered terminal data. With RemainAfterExit=true, descendants may retain stdout, so serveSession blocks before its deferred unit stop and stops processing cancellation or input. Fix: stop the control group before the final EOF wait, or coordinate unit completion, output draining, and cancellation in one nonblocking select.

Move to: