No standard way of specifying memory requirements for multipass build VMs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
New
|
Undecided
|
Unassigned |
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 https:/
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.
^[[6~/snap/
Failed to run 'go install github.
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
Seconded. I bumped into it by doing `git clone github. com/juju/ juju && snapcraft`.
Then the build process failed with:
> Memory usage: 1.8GiB out of 1.9GiB
> go build github. com/Azure/ azure-sdk- for-go/ sdk/resourceman ager/network/ armnetwork: /snap/go/ 10029/pkg/ tool/linux_ amd64/compile: signal: killed
If we don't have a way to specify required memory size somewhere in snapcraft.yaml for example, the first developer experience is not going to be great.