← Back to issue list

No standard way of specifying memory requirements for multipass build VMs

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1842376
Type
issue
State
open
Author
~dmitriis
Labels
—
Created
Updated
Closed
—

Current evaluation

Open, unlabelled request for a project-level Multipass RAM setting: Go builds are OOM-killed at the documented 2 GiB default, while only an environment-variable override is available.

Suggested action: needs triage

Reason: The issue has no labels, assignee, or maintainer assessment, and its only comment independently reproduces the failure at 1.8 GiB. Current documentation describes SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY, but the project schema and provider setup contain no project-level RAM field, so the requested behavior still requires maintainer design and triage.

Evaluated by: mr-cal-bot

Impact: 55 Quick Win: 15 Complexity: 64 Confidence: 93 Actionability: 74

Issue body

I tried to build Juju via snapcraft + multipass, however, the VM ran out of memory and OOM killer killed the linker process. Considering that this bug https://bugs.launchpad.net/snapcraft/+bug/1822265 was closed with a note that SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY is for development/debugging only there needs to be a standard way to do it as some software requires more that 2 GiB of memory to be built. snapcraft --debug Launching a VM. Loaded local plugin for dep Skipping pull juju (already ran) Skipping pull wrappers (already ran) Building juju go install github.com/juju/juju/cmd/juju ^[[6~/snap/go/4301/pkg/tool/linux_amd64/link: signal: killed Failed to run 'go install github.com/juju/juju/cmd/juju' for 'juju': Exited with code 1. Verify that the part is using the correct parameters and try again. Kernel log inside a VM: Sep 03 03:21:32 snapcraft-juju kernel: Out of memory: Kill process 1588 (link) score 859 or sacrifice child Sep 03 03:21:32 snapcraft-juju kernel: Killed process 1588 (link) total-vm:1947684kB, anon-rss:1813888kB, file-rss:0kB, shmem-rss:0kB Sep 03 03:21:32 snapcraft-juju kernel: oom_reaper: reaped process 1588 (link), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 55
Quick Win: 15
Complexity: 64
Confidence: 93
Actionability: 74
needs triage Open, unlabelled request for a project-level Multipass RAM setting: Go builds are OOM-killed at the documented 2 GiB default, while only an environment-variable override is available.
stealth/space-bunny-alpha
Impact: 50
Quick Win: 15
Complexity: 52
Confidence: 84
Actionability: 62
needs triage Multipass builds can OOM at the 2 GiB default; a second report confirms 1.8 GiB linker and compiler failures. RAM can be raised via an environment variable, but no per-project snapcraft.yaml setting is evident.
stealth/space-bunny-alpha
Impact: 55
Quick Win: 33
Complexity: 32
Confidence: 93
Actionability: 87
close resolved Historical Multipass build-VM memory sizing was addressed: RAM controls were added, and current setup docs document SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY for the 2 GiB default.
qwen/qwen3.8-27b
Impact: 35
Quick Win: 21
Staleness: 95
Complexity: 40
Confidence: 55
Support Request: 20
needs triage Request for a standard way to specify memory requirements for multipass build VMs in snapcraft, as OOM killer killed the linker during Juju build. Issue is 7 years old with no comments or maintainer engagement.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 30
Confidence: 85
Support Request: 20
needs triage Issue requesting a standard configuration method for multipass VM memory limits during builds, currently unlabelled and lacking maintainer engagement.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 30
Confidence: 85
Support Request: 20
close stale Request for a standard configuration method to set memory limits for multipass build VMs. Open for 7 years with no maintainer response or comments.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 25
Confidence: 80
Support Request: 10
close stale Snapcraft multipass build environment lacks a standard way to configure VM memory limits, causing OOM failures for memory-intensive builds. Unaddressed for over six years.

Update history

Date Change
created

Related work

  • Related To: snapcraft (launchpad)#1791661 (confidence 98%)

    An earlier Multipass OOM report was resolved by commit 8d9cc5c5a adding host-level RAM and disk overrides, but not snapcraft.yaml resource settings.

  • Related To: snapcraft (launchpad)#1822265 (confidence 98%)

    The report explicitly cites this bug, which a maintainer closed as intended because the environment-variable overrides are development/debugging-only.

Related issues

Issue Project State Summary Similarity
#1791661 multipass build dies - possibly OOM killed snapcraft (launchpad) closed Multipass builds gained configurable RAM and disk sizes in PR #2260 (commit 8d9cc5c5a), resolving the 1 GB VM/OOM limitation.
74%