Symptom

Server startup could stall or degrade response time because updateServerInfo() in Lifecycle.kt performed blocking I/O — a File.readText() call, ProcessBuilder with process.waitFor() for camera detection, and SystemCommandOperator.getSystemInfo() (which itself calls proc.waitFor(60, TimeUnit.SECONDS)) — all on whichever coroutine dispatcher thread called the function. Identified by the Kraken nightly architectural scan.

Root cause

updateServerInfo() was a plain fun (not suspend), so it could not use withContext. It ran all blocking I/O on the Default dispatcher thread pool, which is sized for CPU work, not I/O waits. During startup this includes subprocess execution for camera detection (rpicam-still --list-cameras), which can take hundreds of milliseconds and blocks one of a limited number of Default threads.

Fix

Prevention