No standard way of specifying memory requirements for multipass build VMs

Bug #1842376 reported by Dmitrii Shcherbakov on 2019-09-03
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

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 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
^[[6~/snap/go/4301/pkg/tool/linux_amd64/link: signal: killed
Failed to run 'go install' 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

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers