Snapcraft concurrent build
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
When running multiple instances of snapcraft concurrently there is a race condition in the `$HOME/.cache/snapcraft/download` and `stage-packages` creation.
Kicking off multiple instances of snapcraft where snapcraft hasn't already been run (like a CI system) causes a concurrency bug in the snapcraft python where two instances enter the check for the folders existing, both see the folder doesn't exist, then the first instance creates it and the second instance fails attempting to create it as it's already been done. Unlucky right?
I wanted proof - the way I proved it was to test with a single instance starting for snapcraft and it fixed it. Also pre-creating the folders with `mkdir -p` before launching snapcraft also resolves the issue.
For more details on the bug: https://github.com/goreleaser/goreleaser/issues/1715
I'm using snapcraft in docker following this guide here: https://snapcraft.io/docs/build-on-docker
Evaluation history
No evaluation history available.