cpu '0' panicked at 'pmm: frame allocator not initialized'
YusufKhan-gamedev opened this issue · 7 comments
When running lua or tcc with a full sysroot it returns:
ERROR cpu '0' panicked at 'pmm: frame allocator not initialized'
ERROR aero_kernel/src/mem/paging/frame.rs:159:14
ERROR
TRACE ---------------------------------- BACKTRACE -----------------------------------
TRACE 0: 0xffffffff8023e464 - rust_begin_unwind
TRACE 1: 0xffffffff8025f5af - core::panicking::panic_fmt::h86713eebd88b31bf
TRACE 2: 0xffffffff8026013b - core::panicking::panic_display::h705ec34ecff6e0dc
TRACE 3: 0xffffffff802600ec - core::panicking::panic_str::hcce4f9aa570a143f
TRACE 4: 0xffffffff802600c9 - core::option::expect_failed::h923bd113315aae1c
TRACE 5: 0xffffffff80224102 - aero_kernel::mem::paging::frame::pmm_alloc::hd1efec97d53fb599
TRACE 6: 0xffffffff8020ac7b - aero_kernel::userland::vm::Vm::handle_page_fault::habab6a5757c2c843
TRACE 7: 0xffffffff8022dcb4 - __interrupt_page_fault
TRACE 8: 0xffffffff80228d12 - page_fault
TRACE 9: 0x0000750000001f75 - <unknown>
TRACE 10: 0x0000750000001836 - <unknown>
TRACE 11: 0x0000750000001250 - <unknown>
TRACE 12: 0x000075000000ae8d - <unknown>
TRACE 13: 0x0000750000008c4c - <unknown>
TRACE 14: 0x00007500000140df - <unknown>
TRACE 15: 0x0000000000000019 - <unknown>
TRACE 16: <guard page>
Is there a fix for this issue?
I have a one line patch for it! Yay! It is a bit of a hack but it will do temporarily. This is not fixed btw, just less broken, I would like you to post a fix for this(that is different than my hack).
It will allow me to run lua and tcc but other programs will nonetheless crash.
I feel like we’re leaking physical memory somewhere and that’s why it’s happening. The kernel ran out of physical memory that it can allocate and panicked. For a temporary fix you can assign more memory to the QEMU machine. You can do so by passing-- -m 4G to aero.py, where 4G indicates how much memory you want to assign.
I feel like we’re leaking physical memory somewhere and that’s why it’s happening. The kernel ran out of physical memory that it can allocate and panicked. For a temporary fix you can assign more memory to the QEMU machine. You can do so by passing
-- -m 4Gto aero.py, where4Gindicates how much memory you want to assign.
Sorry, this does not fix the issue, my hotfix was just running init() before the error check and it worked well.... kinda.
Also im using Uwux which includes modification to bootstrap.yml(for the better) if I accidentally changed something in it, oops!
It looks like you ran out of memory.
It looks like you ran out of memory.
Does czapek mean to pass -- -m 4G to qemu or to aero.py like ./aero.py -- -m 4G
Anything passed after the double dash to the aero.py script will be passed through to QEMU, so adding calling ./aero.py -- -m 4G effectively passed -m 4G to QEMU