Building ISO in RAM often fails: mksquashfs reaped by OOM killer
My local builds with TAILS_BUILD_OPTIONS=ram
, that use gzip SquashFS
compression by default, often fail like this:
kernel: Out of memory: Kill process 12575 (mksquashfs) score 145 or sacrifice child
kernel: Killed process 12575 (mksquashfs) total-vm:3580684kB, anon-rss:1992044kB, file-rss:4kB, shmem-rss:2288kB
kernel: oom_reaper: reaped process 12575 (mksquashfs), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
It seems that xz SquashFS compression is not affected because this does not happen on Jenkins.
When building in RAM we’re mounting a tmpfs with size=100%
, which can
potentially trigger this kind of issues if that filesystem is almost
filled. Bumping the amount of RAM given to the VM (via VM_MEMORY_BASE
)
should fix it; this has been done on feature/buster
already and our CI
was adjusted for it already. Now, what’s strange is the fact this
problem only happens ~20-40% of the time. So perhaps a system event
eats precious RAM at the exact wrong time and we could fix the problem
by disabling it or ensuring it’s done before the build starts.
Feature Branch: bugfix/16177-limit-mksquashfs-memory-usage
Related issues
- Related to #9788 (closed)
- Related to #16457 (closed)
- Blocks #15507 (closed)
Original created by @intrigeri on 16177 (Redmine)