Odd behaviour with parallel snapcraft installs
Metadata
Current evaluation
Closed as unconfirmed. The reporter could not reproduce the error after re-enabling the parallel instances flag. Concluded snapd mishandles disabled parallel installs and filed a separate snapd bug report.
Suggested action: —
No scores available.
Issue body
### Bug Description
When one has different revisions of snapcraft available, kicking off a build with one revision and performing a build with a different revision may fail.
This may only truly be the case with parallel installs of snapcraft.
### To Reproduce
Attempt to build a snap with some revision of snapcraft and, at a later time, attempt a build with a different revision.
### Environment
Ubuntu 24.04, snapcraft 8.7+ (tested with a fork of 8.7 and latest/edge). Build using multipass (for core20 base snaps) and lxd (for core24 base snaps). Reproducible for both cases.
### snapcraft.yaml
```yaml
name: test # you probably want to 'snapcraft register <name>'
base: core24 # the base snap is the execution environment for this snap
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: |
This is my-snap's description. You have a paragraph or two to tell the
most important story about your snap. Keep it under 100 words though,
we live in tweetspace and your description wants to look good in the snap
store.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
parts:
my-part:
# See 'snapcraft plugins'
plugin: nil
```
### Relevant log output
```shell
dilyn@Ares:~/test -> snapcraft
Starting snapcraft, version 8.7.4.post115
Logging execution to '/home/dilyn/.local/state/snapcraft/log/snapcraft-20250524-003630.231509.log'
Launching managed ubuntu 24.04 instance...
Creating instance from base instance
Starting instance
Starting snapcraft, version 8.7.4.post115
Logging execution to '/tmp/snapcraft.log'
Initialising lifecycle
Installing build-packages
Installing build-snaps
Pulling my-part
Building my-part
Staging my-part
Priming my-part
Packing...
Reading snap metadata...
Running linters...
Running linter: classic
Running linter: library
Creating snap package...
Packed test_0.1_amd64.snap
dilyn@Ares:~/test -> sce
/snap/snapcraft_edge/14924/bin/python: can't open file '/snap/snapcraft/14924/bin/snapcraft': [Errno 2] No such file or directory
```
### Additional context
Enable the parallel installs experimental feature and install two versions of snapcraft. It might be that even the same version (revision) but with two different `$SNAP_INSTANCE_NAME`s would satisfy reproducing this (but perhaps not).
Install snapcraft from e.g. 8.x/stable and latest/edge. I specifically have a snapcraft from 8.7.x and a snapcraft from latest/edge (aliased to `sce`).
I've reproduced this with `base: core2{0,4}` snaps building with both LXD and Multipass as providers. The issue is reminiscent of previously reported parallel install bugs:
https://github.com/canonical/snapcraft/issues/4683
https://github.com/canonical/snapcraft/issues/4927
Uncertain if this is a regression in behaviour; I haven't been dilligently testing my parallel snapcrafts (heavily testing kernel/initrd plugins mostly, can't use other snapcrafts...)
The specific error message in the log output *is* accurate; there is no `14924` directory in `/snap/snapcraft`; I only have `x1` and `x2` in that directory :)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Closed as unconfirmed. The reporter could not reproduce the error after re-enabling the parallel instances flag. Concluded snapd mishandles disabled parallel installs and filed a separate snapd bug report. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed as unconfirmed. The reported parallel install failure traced to a disabled experimental feature flag. Unable to reproduce after re-enabling it, the issue was abandoned and attributed to a snapd configuration oversight. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed as not reproducible. Traced to snapd failing to enforce the parallel-instances experimental flag. Unable to reproduce after re-enabling it. Filed as upstream snapd bug #2111940. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed as not a snapcraft bug. Reporter could not reproduce after discovering the parallel-instances feature was disabled. Identified as a snapd enforcement bug, with a new issue filed upstream. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4683 Cannot use parallel installations of snapcraft if a non-aliased version is not installed | snapcraft | closed | Parallel snapcraft installations failed when injecting non-aliased versions due to malformed assertion headers. The bug was fixed by correcting snap name parsing in craft-providers, with the solution merged via PRs #5085 and #5087. |