Subject: amd64 panics
To: None <,>
From: Christopher A. Kantarjiev <>
List: port-amd64
Date: 08/09/2005 10:38:22
(this is a summary repost of several messages I sent to 
comp.unix.bsd.netbsd.misc; someone finally sent me a clue-by-four that the 
newsgroup isn't gated to people who know something.)

I've built up a dual dual-core Opteron machine with a lot of memory and have run 
into various panics. I'm running 2.0.2, and I have pretty much filled RAM with 
data that is mmap'd from disk files, accessed read-only by four processes.

At first, the machine had 8GB and I didn't have much difficulty, but I would 
occasionally get

panic: uvm_mapent_alloc: out of static map entries

I bumped the static number to 2000 and the issue 'went away'.

Then I added 8GB, total of 16GB, and had more fun:

panic: pmap_enter: no pv entries available

It was suggested that I bump NKMEMPAGES=100000, which I did, and got a quick 
'trap 6' on boot! But I have NKMEMPAGES=60000 now, and I'm not getting that 
panic any more.

But I continue to get

panic: uvm_mapent_alloc: out of static map entries

I have increased the static number to 8000, and pulled out 4GB (total 12GB at 
the moment), and the problem still exists; more annoyingly, the system doesn't 
crash cleanly (hangs while syncing disks). So we are rebooting every two days
to avoid the hangs.

I'd love to find a real fix for this. Is there a way to track the number of 
KMAPENT entries that are in use? vmstat doesn't seem to have an appropriate option.