[DragonFlyBSD - Bug #911] (Feedback) kldload/kernel linker can exceed malloc reserve and panic system

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Mon Feb 24 14:27:13 PST 2014


Issue #911 has been updated by tuxillo.

File 64MB_X64.jpg added
Status changed from In Progress to Feedback

Hi,

64MB is very low mem capacity nowadays, at least for the platforms we support.

Real kernels can't even boot with low mem profiles. For example, i386 can't boot on 32MB and x86_64 can't boot with 64MB when both have no swap configured (well x64 could but the login process will be killed upon execution, see attached screenshot).

For me this issue can be closed, but a similar one could be opened if in the future we support additional architectures that run on low mem configs.

Cheers,
Antonio Huete


----------------------------------------
Bug #911: kldload/kernel linker can exceed malloc reserve and panic system
http://bugs.dragonflybsd.org/issues/911#change-11851

* Author: corecode
* Status: Feedback
* Priority: Normal
* Assignee: tuxillo
* Category: Kernel
* Target version: 3.8.0
----------------------------------------
hey,

I just booted with hw.physmem=64m and got a panic when trying to load a module:

panic: kld: malloc limit exceeded

(kgdb) bt
#0  dumpsys () at thread.h:83
#1  0xc018450c in boot (howto=256) at /usr/build/src/sys/kern/kern_shutdown.c:375
#2  0xc0184661 in panic (fmt=Variable "fmt" is not available.
) at /usr/build/src/sys/kern/kern_shutdown.c:800
#3  0xc0182129 in kmalloc (size=78, type=0xc02f5600, flags=2)
    at /usr/build/src/sys/kern/kern_slaballoc.c:445
#4  0xc01678b4 in linker_make_file (pathname=0xc641b000 "./nvidia.ko", priv=0xc63ea028, 
    ops=0xc02f5bc8) at /usr/build/src/sys/kern/kern_linker.c:369
#5  0xc016a773 in link_elf_load_module (filename=0xc641b000 "./nvidia.ko", result=0xc83efc7c)
    at /usr/build/src/sys/kern/link_elf.c:604
#6  0xc01684e0 in linker_load_file (filename=0xc641b000 "./nvidia.ko", result=0xc83efca8)
    at /usr/build/src/sys/kern/kern_linker.c:272
#7  0xc016871c in sys_kldload (uap=0xc83efcf0) at /usr/build/src/sys/kern/kern_linker.c:724

the problem seems to be that M_LINKER already used 10% of all memory (allegedly).  In this case kmalloc() simply panics if passing M_WAITOK without M_NULLOK.  This is quite unfortunate.  Shouldn't we try to stay alive and print a warning and block, hoping that the problem will resolve itself?

cheers
  simon

---Files--------------------------------
64MB_X64.jpg (8.83 KB)


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



More information about the Bugs mailing list