← Back to issue list

Snapcraft tutorial errors out on OSX with multipass error, "returned exit code 2"

View original Launchpad issue

Metadata

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

Current evaluation

Dec 2019 report: snapcraft 3.9 on macOS fails via multipass (apt 404s, mount exit code 2) and crashes with AttributeError on os.sched_getaffinity. No maintainer activity; that code path no longer exists in current snapcraft, and macOS support was dropped.

Suggested action: close stale

Reason: The issue is 6.7 years old with 0 comments, no labels, and no maintainer engagement, and it is no longer applicable: the traceback's os.sched_getaffinity call in _project_options.py no longer appears anywhere in the current codebase (only parallel_build_count/SNAPCRAFT_PARALLEL_BUILD_COUNT remain), and the current snapcraft 8.x layout is Linux-only, so the macOS/multipass scenario cannot be reproduced. The apt 404s were an EOL/transient mirror issue and the mount failure was a multipass environment problem, not a snapcraft defect.

Impact: 25 Quick Win: 16.25 Staleness: 95 Complexity: 35 Confidence: 70 Support Request: 45

Issue body

Attempting to run through the Go tutorial on OSX results in the following when running `snapcraft` the first time: ``` Launching a VM. Launched: snapcraft-test-httplab-dobs 2019-12-16T15:57:59Z INFO Waiting for restart... snapd 2.42.5 from Canonical✓ installed core18 20191126 from Canonical✓ installed snapcraft 3.8 from Canonical✓ installed Ign:1 http://security.ubuntu.com/ubuntu bionic-security InRelease Ign:2 http://archive.ubuntu.com/ubuntu bionic InRelease Ign:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease Err:4 http://security.ubuntu.com/ubuntu bionic-security Release 404 Not Found [IP: 91.189.91.14 80] Ign:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease Err:6 http://archive.ubuntu.com/ubuntu bionic Release 404 Not Found [IP: 91.189.88.24 80] Err:7 http://archive.ubuntu.com/ubuntu bionic-updates Release 404 Not Found [IP: 91.189.88.24 80] Err:8 http://archive.ubuntu.com/ubuntu bionic-backports Release 404 Not Found [IP: 91.189.88.24 80] Reading package lists... Done E: The repository 'http://security.ubuntu.com/ubuntu bionic-security Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://archive.ubuntu.com/ubuntu bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://archive.ubuntu.com/ubuntu bionic-updates Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://archive.ubuntu.com/ubuntu bionic-backports Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. Failed to update the package cache: Some files could not be downloaded: failed to run apt update Check that the sources on your host are configured correctly. An error occurred when trying to execute 'sudo -i env SNAPCRAFT_HAS_TTY=True snapcraft refresh' with 'multipass': returned exit code 2. ``` On subsequent runs: ``` Launching a VM. snap "snapd" has no updates available snap "core18" has no updates available snap "snapcraft" has no updates available mount failed: Error enabling mount support in 'snapcraft-test-httplab-dobs' An error occurred with the instance when trying to mount with 'multipass': returned exit code 2. Ensure that 'multipass' is setup correctly and try again. ``` I've confirmed that multipass is running, though unclear how to confirm that it's set up "correctly." Based on others' incidents I attempted to run `snapcraft clean`, the result was the following: ``` Sorry, an error occurred in Snapcraft: module 'os' has no attribute 'sched_getaffinity' Traceback (most recent call last): File "/usr/local/bin/snapcraft", line 8, in <module> sys.exit(run()) File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/snapcraft/cli/_command.py", line 87, in invoke return super().invoke(ctx) File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/snapcraft/cli/lifecycle.py", line 338, in clean lifecycle.clean(project, parts, steps.PRIME) File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/snapcraft/internal/lifecycle/_clean.py", line 198, in clean config = project_loader.load_config(project) File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/snapcraft/internal/project_loader/__init__.py", line 47, in load_config return Config(project) File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/snapcraft/internal/project_loader/_config.py", line 212, in __init__ self.data = self._expand_env(snapcraft_yaml) File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/snapcraft/internal/project_loader/_config.py", line 335, in _expand_env snapcraft_global_environment(self.project) File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/snapcraft/internal/project_loader/_env.py", line 110, in snapcraft_global_environment "SNAPCRAFT_PARALLEL_BUILD_COUNT": str(project.parallel_build_count), File "/usr/local/Cellar/snapcraft/3.9/libexec/lib/python3.7/site-packages/snapcraft/project/_project_options.py", line 135, in parallel_build_count return len(os.sched_getaffinity(0)) AttributeError: module 'os' has no attribute 'sched_getaffinity' We would appreciate it if you created a bug report at https://launchpad.net/snapcraft/+filebug with the above text included. You can find the traceback in file '/var/folders/8t/bcy9yfg90c56_4m_36wmtyrm0000gp/T/tmp4o1p110g/trace.txt'. ``` Which led me here.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 25
Quick Win: 16.25
Staleness: 95
Complexity: 35
Confidence: 70
Support Request: 45
close stale Dec 2019 report: snapcraft 3.9 on macOS fails via multipass (apt 404s, mount exit code 2) and crashes with AttributeError on os.sched_getaffinity. No maintainer activity; that code path no longer exists in current snapcraft, and macOS support was dropped.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 25
Confidence: 92
Support Request: 65
close stale Snapcraft tutorial fails on macOS due to multipass errors, EOL Ubuntu Bionic repos, and a Python 3.7 macOS compatibility issue. Issue is over 6 years old with no maintainer interaction.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 25
Confidence: 95
Support Request: 30
close stale Snapcraft tutorial fails on macOS due to Multipass VM errors, outdated Ubuntu Bionic repositories, and Python 3.7 compatibility issues. No activity for over 6 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 15
Confidence: 95
Support Request: 30
close stale Reported snapcraft and multipass failures on macOS with Ubuntu 18.04 (bionic) repositories and Python compatibility errors. Issue is over 6 years old with no maintainer response.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 20
Confidence: 90
Support Request: 85
close stale Snapcraft tutorial fails on macOS with multipass returning exit code 2, triggering apt update and mount errors. Open issue with zero comments and no labels, awaiting triage and assignment.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft (launchpad)#1904774 (confidence 55%)

    Similar closed Launchpad bug about snapcraft failing during multipass setup; same multipass-on-macOS failure family, but a distinct incident.

Related issues

Issue Project State Summary Similarity
#1806083 snapcraft fails to locate multipass (inside a multipass session) snapcraft (launchpad) open snapcraft 3.0.1 fails to detect an installed multipass when run inside a multipass VM, prompting to install and dropping the user into a shell. No maintainer activity for ~7 years; affected version is long obsolete.
80%
#1904774 Snapcraft runs multipass setup but fails snapcraft (launchpad) closed Abandoned. Snapcraft failed during multipass VM cleanup after reporting a missing instance. Closed without comments or fixes.
78%
#1810915 snapcraft can't tell when multipass is installed but disabled snapcraft (launchpad) open Snapcraft fails to detect a disabled multipass snap, prompting to install it and then erroring out. Reported against multipass 2018.12.1 / ~2019 snapcraft; untriaged, 0 comments, no labels, inactive for ~7.6 years.
76%
#5145 snapcraft fails to launch multipass instance when multipass isn't pre-installed snapcraft open Snapcraft fails to launch a multipass VM with 'Remote snapcraft is unknown or unreachable' when multipass is installed on-demand. Maintainer triaged it as an image-server availability issue and linked craft-providers#211 for better error messaging; still open.
75%
#1794955 snapcraft erroneously errors when deleting non-existent multipass container snapcraft (launchpad) open snapcraft clean fails with 'instance does not exist' when the multipass container is already gone; reporter suggests treating it as a no-op. Open since 2018, unlabeled, no maintainer activity for ~7.9 years.
74%
#1996511 snapcraft try with multipass provider crashes snapcraft (launchpad) closed Closed without resolution. The multipass provider crashed on core22 due to missing base mappings in the legacy codebase. Superseded by newer snapcraft releases that added core22 support.
74%
#1813979 snapcraft cleanbuild wants to install multipass but it's already installed snapcraft (launchpad) closed Closed without resolution. Likely abandoned or superseded by newer snapcraft and multipass versions that resolved the detection and launch failures.
73%
#1866251 snapcraft clean on macOS failing, python os.sched_getaffinity does not exist snapcraft (launchpad) closed Closed without discussion. The macOS snapcraft clean failure caused by missing os.sched_getaffinity was likely abandoned or resolved in a later release.
73%
#4106 Error 2 on snapcraft on linux with multipass: snapcraft closed Resolved as fixed after a temporary Multipass remote image unavailability cleared. The reporter closed the issue.
73%
#1803708 Snapcraft should detect being run inside multipass and error snapcraft (launchpad) closed Rejected. Maintainers disagreed, noting users may legitimately run snapcraft inside multipass VMs. The issue was closed without implementation.
72%