cleanbuild fails with lxd snap
Metadata
Current evaluation
Closed as obsolete: the cleanbuild command was removed; Snapcraft builds now perform clean builds by default.
Resolution: closed stale
Reason: Maintainer @~sergiusens closed the report on 2023-08-17, stating that cleanbuild was no longer supported and all builds now transparently perform a clean build.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Hello,
I am trying to run `snapcraft cleanbuild` on PureOS with the lxd snap, but it fails every time with:
```
$ snapcraft cleanbuild
Creating snapcraft-superlaboriously-harmonious-vernon
Starting snapcraft-superlaboriously-harmonious-vernon
Waiting for a network connection...
Network connection established
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security/main Sources [116 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial/main Sources [868 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/restricted Sources [2116 B]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [59.5 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial/restricted Sources [4808 B]
Get:10 http://security.ubuntu.com/ubuntu xenial-security/multiverse Sources [1516 B]
Get:11 http://archive.ubuntu.com/ubuntu xenial/universe Sources [7728 kB]
Get:12 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [459 kB]
Get:13 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [198 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial/multiverse Sources [179 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7532 kB]
Get:16 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [321 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial/universe Translation-en [4354 kB]
Get:18 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [120 kB]
Get:19 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3208 B]
Get:20 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [144 kB]
Get:21 http://archive.ubuntu.com/ubuntu xenial/multiverse Translation-en [106 kB]
Get:22 http://archive.ubuntu.com/ubuntu xenial-updates/main Sources [298 kB]
Get:23 http://archive.ubuntu.com/ubuntu xenial-updates/restricted Sources [2524 B]
Get:24 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [1408 B]
Get:25 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources [191 kB]
Get:26 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse Sources [7968 B]
Get:27 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [736 kB]
Get:28 http://archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [305 kB]
Get:29 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [592 kB]
Get:30 http://archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [239 kB]
Get:31 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [16.2 kB]
Get:32 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse Translation-en [8052 B]
Get:33 http://archive.ubuntu.com/ubuntu xenial-backports/main Sources [3432 B]
Get:34 http://archive.ubuntu.com/ubuntu xenial-backports/universe Sources [4900 B]
Get:35 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [4836 B]
Get:36 http://archive.ubuntu.com/ubuntu xenial-backports/main Translation-en [3220 B]
Get:37 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [6624 B]
Get:38 http://archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [3768 B]
Fetched 24.9 MB in 8s (3094 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libfreetype6
Use 'apt autoremove' to remove it.
The following NEW packages will be installed:
squashfuse
0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded.
Need to get 17.4 kB of archives.
After this operation, 54.3 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 squashfuse amd64 0.1.100-0ubuntu1~ubuntu16.04.1 [17.4 kB]
Fetched 17.4 kB in 1s (9096 B/s)
Selecting previously unselected package squashfuse.
(Reading database ... 25549 files and directories currently installed.)
Preparing to unpack .../squashfuse_0.1.100-0ubuntu1~ubuntu16.04.1_amd64.deb ...
Unpacking squashfuse (0.1.100-0ubuntu1~ubuntu16.04.1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up squashfuse (0.1.100-0ubuntu1~ubuntu16.04.1) ...
Looking up assertion ['account-key', 'public-key-sha3-384=BWDEoaqyr25nF5SNCvEv2v7QnM9QsfCc0PBMYD_i2NGSQ32EF2d4D0hqUel3m8ul']
Looking up assertion ['snap-declaration', 'snap-name=core']
Looking up assertion ['snap-revision', 'snap-revision=4110', 'snap-id=99T7MUlRhtI3U0QFgl5mXXESAiSwt776']
Adding assertion core_4110.assert
Installing /run/core_4110.snap
error: cannot perform the following tasks:
- Mount snap "core" (4110) ([start snap-core-4110.mount] failed with exit status 1: Job for snap-core-4110.mount failed. See "systemctl status snap-core-4110.mount" and "journalctl -xe" for details.
)
Stopping local:snapcraft-superlaboriously-harmonious-vernon
The following command failed to run: 'snap install /run/core_4110.snap' exited with 1
```
Unfortunately, the `--debug` flag doesn't seem to make a difference, but by stopping the process before it destroys the container, I can see the output of `systemctl status snap-core-4110.mount`:
```
$ lxc exec snapcraft-insuperably-epigenous-sunny -- /bin/bash -l
mesg: ttyname failed: Success
root@snapcraft-insuperably-epigenous-sunny:~# systemctl status snap-core-4110.mount
● snap-core-4110.mount - Mount unit for core
Loaded: loaded (/etc/systemd/system/snap-core-4110.mount; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2018-03-01 05:55:22 UTC; 56s ago
Where: /snap/core/4110
What: /var/lib/snapd/snaps/core_4110.snap
Process: 1008 ExecMount=/bin/mount /var/lib/snapd/snaps/core_4110.snap /snap/core/4110 -t fuse.squashfuse -o nodev,ro,allow_other (code=exited, status=1/FAILURE)
Mar 01 05:55:22 snapcraft-insuperably-epigenous-sunny systemd[1]: Mounting Mount unit for core...
Mar 01 05:55:22 snapcraft-insuperably-epigenous-sunny mount[1008]: fusermount: mount failed: Operation not permitted
Mar 01 05:55:22 snapcraft-insuperably-epigenous-sunny systemd[1]: snap-core-4110.mount: Mount process exited, code=exited status=1
Mar 01 05:55:22 snapcraft-insuperably-epigenous-sunny systemd[1]: Failed to mount Mount unit for core.
Mar 01 05:55:22 snapcraft-insuperably-epigenous-sunny systemd[1]: snap-core-4110.mount: Unit entered failed state.
```
I am not sure what steps I should take to debug this issue further. Any help that you can provide would be greatly appreciated!
Thanks!
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed stale | Closed as obsolete: the cleanbuild command was removed; Snapcraft builds now perform clean builds by default. | |
| stealth/space-bunny-alpha | — | closed stale | LXD-snap cleanbuild mount-permission failure (fusermount: Operation not permitted). Closed in 2023 by maintainer sergiusens: cleanbuild is no longer supported and all builds now cleanbuild transparently; no code fix. | |
| stealth/space-bunny-alpha | — | closed stale | The LXD-snap cleanbuild mount-permission failure was closed as abandoned after years of inactivity, with no fix or version identified. | |
| stealth/space-bunny-alpha | — | closed stale | LXD cleanbuild failed when PureOS blocked snap-core mounting; closed abandoned after years without comments or a fix. | |
| qwen/qwen3.6-35b-a3b | — | — | snapcraft cleanbuild failed due to an LXD snap mount permission error. Closed as abandoned after years of inactivity with no comments or resolution. | |
| qwen/qwen3.6-35b-a3b | — | — | A user reported snapcraft cleanbuild failing with the LXD snap due to a FUSE mount permission error inside the container. With zero comments and years of inactivity, the report was abandoned and closed without a fix or resolution. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution or comments, likely abandoned due to inactivity or superseded by newer Snap/LXD versions. The original report detailed snapcraft cleanbuild failures with the LXD snap caused by a fusermount Operation not permitted error. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Reported snapcraft cleanbuild failures with the LXD snap due to FUSE mount permission errors. Closed without resolution due to zero comments and extended inactivity, indicating abandonment or staleness. |
Update history
| Date | Change |
|---|---|
| created |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1796980 Remove cleanbuild | snapcraft (launchpad) | closed | Merged snapcore/snapcraft#2335 as 27ec9ba63, removing LXD lifecycle builds for base-based snaps and making cleanbuild redundant for them. | |
| #1666735 snapcraft cleanbuild does not work with lxd installed via snap | snapcraft (launchpad) | closed | Fixed by merged canonical/snapcraft#1199 (commit 417989880), making cleanbuild LXD detection packaging-independent instead of relying on apt package metadata. | |
| #1697979 snapcraft fails on initial cleanbuild probe | snapcraft (launchpad) | closed | Closed as obsolete: cleanbuild was decommissioned, and standard Snapcraft builds now transparently use a clean build environment. | |
| #1788654 snapcraft cleanbuild doesn't work with cross-compile stage-packages | snapcraft (launchpad) | closed | Closed as an obsolete legacy cleanbuild/LXD issue after a maintainer directed users to migrate to bases; no targeted cross-architecture fix was recorded. | |
| #1769 lxd: add an --image argument to cleanbuild | snapcraft | closed | Closed unmerged as stale after Snapcraft moved from container builds toward VMs, abandoning LXD cleanbuild --image support. | |
| #1775585 cleanbuild fails when source tree contains file with >65535 ownership(from LXD) | snapcraft (launchpad) | closed | Closed as obsolete after the separate cleanbuild command was removed; builds now clean-build transparently by default, so the old LXD failure path no longer applies. | |
| #1746612 Snapcraft cleanbuild doesn't work if you're not using the LXD snap | snapcraft (launchpad) | closed | Closed after the missing hostfs behavior was fixed upstream in lxc/lxd#4183. Snapcraft PR #1912 offered a workaround but was not merged. | |
| #1703344 snapcraft cleanbuild exits with a traceback when lxd is not installed | snapcraft (launchpad) | closed | Fixed cleanbuild’s traceback when LXD is absent by handling the missing lxc executable and reporting a clear error. Merged in snapcraft#1400. | |
| #1480144 cleanbuild (through lxd) | snapcraft (launchpad) | closed | Wishlist request for cowbuilder/pbuilder-style clean cross-arch snap builds. Closed by moving it to GitHub ubuntu-core/snapcraft#5, where clean-room building was later delivered as the LXD build provider (--use-lxd, snapcraft#2509, commit 067024732). | |
| #1800119 snapcraft cleanbuild | snapcraft (launchpad) | closed | The obsolete cleanbuild command was retired because builds became clean by default; a maintainer closed the report in August 2023. |