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
Preserve exclusive device leases across daemon restarts #2150
An exclusive board reservation disappears when the fbuild daemon restarts. A second workflow can then take the board even though the original holder is still alive. This was observed during the ESP32-C6 investigation in FastLED/FastLED#5365. fbuild 2.5.53 fixes premature idle eviction, but a daemon restart still creates an empty device inventory.
DaemonContext::new creates a new DeviceManager, whose device map starts empty. The exclusive lease is stored on the in-memory device entry.
Reproduction and acceptance
On an isolated cache root, acquire a tracked exclusive lease on a test board, restart the daemon, then check status and attempt a second acquisition. Capture the current failure in a focused regression test before changing the implementation. After the fix the original lease should still admit the holder, reject a competing workflow, and be releasable using the original lease ID. Include coverage for stale or expired ownership and USB port renumbering.
Decisions
Scope this to exclusive reservations. Serial streams and in-flight operations are a separate lifecycle concern.
Verified reproduction on 2.5.53
Started a daemon on an isolated cache root and loopback port. A tracked C6 lease made device status report Available: no. After fbuild daemon restart, the same device reported Available: yes and a competing acquisition received a different lease ID. This reproduction only used the device inventory and lease APIs.
Activity