← Back to issue list

Snapcraft concurrent build

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1889741
Type
issue
State
open
Author
~lawrencegripper
Labels
Created
Updated
Closed

Current evaluation

Race condition when running multiple snapcraft instances concurrently: both check for $HOME/.cache/snapcraft/download and stage-packages, both see missing, one creates, other fails. Reported ~6 years ago, 0 comments, no maintainer response, no labels.

Suggested action: needs triage

Reason: The issue has zero comments, no labels, no assignee, and no maintainer interaction in ~6 years — it has never been triaged. The bug report itself is well-structured with a clear reproduction (concurrent snapcraft in CI/docker) and a workaround (pre-create dirs with mkdir -p), but no maintainer has acknowledged it. The referenced goreleaser issue (#1715) is from a different project and unrelated to this repo's issue #1715 (which is about catkin/rosinstall). Without evidence of a fix in the codebase, it cannot be closed as stale or fixed; it needs a maintainer to assess whether the race condition still exists in current snapcraft.

Impact: 40 Quick Win: 24.0 Staleness: 85 Complexity: 40 Confidence: 55 Support Request: 10

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

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 40
Quick Win: 24.0
Staleness: 85
Complexity: 40
Confidence: 55
Support Request: 10
needs triage Race condition when running multiple snapcraft instances concurrently: both check for $HOME/.cache/snapcraft/download and stage-packages, both see missing, one creates, other fails. Reported ~6 years ago, 0 comments, no maintainer response, no labels.
qwen/qwen3.6-35b-a3b
Staleness: 90
Complexity: 40
Confidence: 85
Support Request: 10
close stale Race condition in snapcraft when running concurrent builds, causing cache folder creation failures. The report remains unlabelled and inactive for over six years with no maintainer engagement.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 90
Support Request: 10
needs triage Reports a race condition when running multiple snapcraft instances concurrently, causing folder creation failures. Unlabeled, no maintainer comments, inactive for over two years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 10
Confidence: 80
Support Request: 5
close stale Reports a race condition when running multiple snapcraft instances concurrently, causing folder creation failures. The issue is over 6 years old with no maintainer engagement or comments.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 30
Confidence: 85
Support Request: 10
close stale Concurrent snapcraft builds trigger a race condition during directory creation, causing failures. The report lacks maintainer labels or comments and has been inactive for over two years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 30
Confidence: 75
Support Request: 10
needs triage Reports a race condition when running multiple snapcraft instances concurrently, causing folder creation failures. Unlabeled, no maintainer response, and inactive for over two years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 35
Confidence: 75
Support Request: 10
needs triage Reports a race condition when running multiple snapcraft instances concurrently, causing folder creation failures. Unlabelled, unassigned, and has received no maintainer comments in over two years.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2104274 Snapcraft has unclear behavior when providing same build-snap from different channels snapcraft (launchpad) open Bug report: snapcraft resolves build-snap from wrong channel (stable vs candidate). Untriaged, no maintainer response in 527 days.
75%
#1869030 Running several instances of snapcraft in parallel for a given snap name results in failures to acquire an apt lock file snapcraft (launchpad) open Parallel snapcraft builds for the same snap name share a multipass VM, causing apt lock file conflicts. Feature request to allow unique VM/container names. 6.4 years old, zero comments, no labels, no maintainer interaction.
71%
#1793471 snapcraft trggers unnecessary pulls from unrelated file modifications snapcraft (launchpad) open Feature request to add .snapignore support so IDE and .git changes stop marking snapcraft stages stale and triggering unnecessary re-pulls/rebuilds. Open since 2018 with label 18.10-build-caching, zero comments, no maintainer engagement for ~8 years.
71%