mirror of
https://github.com/moby/buildkit.git
synced 2026-11-06 05:16:45 +00:00
progressWriter.Close set done while other goroutines could still be writing to the writer, for example a shared vertex writing its snapshot into the progress of a job that is finishing. Write read the flag without synchronization. Make done an atomic.Bool. Add a test that closes a writer while it is being written to; it reports the race under -race without the fix. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>