o8vm / krabs

An x86 bootloader written in Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OOM error

opened this issue · comments

Description
I'm testing krabs bootloader by following instruction.
https://github.com/ellbrid/krabs/blob/master/docs/linux-image-setup-64.md

When I launch a vm with qemu, I got OOM errors as follows:

26790 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 0kB
Total swap = 0kB
32638 pages RAM
0 pages HighMem/MovableOnly
3977 pages reserved
Tasks state (memory values in pages):
[  pid  ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name
Out of memory and no killable processes...
Kernel panic - not syncing: System is deadlocked on memory
---[ end Kernel panic - not syncing: System is deadlocked on memory ]---

How to Fix & My Verification
The error message looks life out of memory.
So I change memory option of qemu and launch it successfully:

qemu-system-x86_64 --hda disk.img -m 1G

The default value of memory size is 128 MB according to following document.
https://wiki.gentoo.org/wiki/QEMU/Options

I tested 256M and 512M, but it didn't work.
So specifying memory size explicitly is better.