← Back to issue list

Odd behaviour with parallel snapcraft installs

View original Github issue

Metadata

Project
snapcraft
Number
#5509
Type
issue
State
closed
Author
dilyn-corner
Labels
Type: Bug Status: Needs information
Created
Updated
Closed

Current evaluation

Closed as unreproducible: maintainer could not reproduce parallel-install failure after experimental.parallel-instances was re-set; reporter pointed to a snapd bug, filed as LP bug #2111940.

Resolution: closed not a bug

Reason: mr-cal provided a reproducible multipass script and found no failure; dilyn-corner confirmed that once experimental.parallel-instances was set again the error vanished, concluding the root cause is snapd allowing parallel installs without the feature flag (LP bug #2111940). No Snapcraft code change was made, and earlier parallel-install reports (#4683, #4927) were already fixed by PRs #5085/#5087.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed not a bug Closed as unreproducible: maintainer could not reproduce parallel-install failure after experimental.parallel-instances was re-set; reporter pointed to a snapd bug, filed as LP bug #2111940.
stealth/space-bunny-alpha — closed not a bug Closed as unconfirmed; Snapcraft could not reproduce the parallel-install failure after the flag was re-enabled. The reporter identified a possible snapd cause and filed LP bug #2111940.
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.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/snapcraft#4683 (confidence 70%)

    Prior parallel-install issue (non-aliased version missing) already fixed by PRs #5085/#5087; reporter linked it as reminiscent

  • Related To: canonical/snapcraft#4927 (confidence 70%)

    Prior parallel-install bug (snapcraft not passed to LXD instance) fixed by PR #5085 and backport #5087

  • Superseded By: snapd#2111940 (confidence 60%)

    Launchpad snapd bug #2111940 filed by reporter: snapd should not allow parallel installs when experimental.parallel-instances is unset

  • Likely Fixed By: canonical/snapcraft#5085 (confidence 45%)

    Earlier fix passing the running (possibly parallel) snapcraft into managed instances; regression could stem from there

Related issues

Issue Project State Summary Similarity
#1985409 snapcraft-managed lxd containers do not respect parallel installs snapcraft (launchpad) closed Reported 2022 that parallel-installed snapcraft instances (e.g. snapcraft_7) launch the unsuffixed host snapcraft inside their managed LXD build container, causing '--build-for' build failures. Closed in 2026 after PR #5085 and 7.5 backport #5087.
74%
#411 Support snap parallel installs craft-application closed Parallel-installed snap injection was fixed by PR #467 (commit 77a3582b); #411 was closed as fixed, with a separate craft-providers gap noted.
71%