[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbsd-tech
Subject:    Re: malloc errors
From:       Artur Grabowski <art () stacken ! kth ! se>
Date:       1999-11-25 6:31:33
[Download RAW message or body]

Pete Fritchman <petef@netreach.net> writes:

> What's the fix when my kernel keeps crashing with a "malloc: out of memory"
> error & dumps itself to the kernel debugger.
> 
> The logs don't really have anything useful:

The logs are useless in this case.

> That was the time between reboots.. 15:32 is when it came back up and there
> aren't any malloc errors before that
> 
> The only thing i was doing was running a "configure" script.. might have
> been processor intensive..

Shouldn't matter.
 
> What "memory" is malloc out of?  I have 512 mb of ram in this system..
> ~ 300 constantly used.

Doesn't matter.

>  What ways can I implement limits? Something with ulimit?  Or is it another
> memory block it's out of?

I suspect that it actually says: "malloc: out of space in kmem_map" (because
there is no case where it could say "out of memory".

I need a few thing to be able to diagnose this.
1. The full output of your dmesg.
2. The full output of "vmstat -m" (the best would be if you could produce a
   test case for the panic and mail me the output of vmstat -m just before the
   panic happens).
3. When the machine drops into "ddb>", type "trace" and try to write down
   the output from it (at least the call chain and the parameters to malloc,
   but I would prefer the whole thing).

The problem with malloc inside the kernel is that it has a very limited
space, mostly because nothing _should_ use that much malloc:ed memory.

//art

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic