The share's lock was a folder in the share (tools/.lock) removed only by
devvm's cleanup, so a devvm that crashed or was killed left the next one
waiting ten minutes and then failing with share_lock_held. The --from
conversion lock on Lima was a folder holding its devvm's pid, taken over
from one that had ended.
Both are now platform.LockFileWaiting on a file in devvm's data folder
(tools.lock, outside the share VMs mount; oci-build.lock), which the system
lets go of when devvm ends, however it ends. Another devvm waits until the
holder lets go or the run is interrupted, saying so after 3 s
(share_waiting, oci_waiting).
- share_lock_held is gone, with the try count, the cleanup and the pid
takeover; tools.Env's ShareWait and Lima's OCIWait are ShareNote and
OCINote, how long before devvm says it's waiting.
- Docs: Building tools and How it's converted describe the locks; the
state tables list tools.lock, oci-build.lock and images/locks/<key>.
Tests: tools TestLockShareKilled (a killed holder's lock is taken at
once; it failed with share_lock_held before), TestLockShare rewritten
(waits, says so, gets it once let go, the lock outside the share);
lima TestLockOCI rewritten (a lock file nothing holds is taken at once,
a held one is waited for, saying so); from.txtar converts with a lock
file left as a crashed devvm leaves it, and no wait.
Co-Authored-By: Claude Opus 5.5 <[email protected]>