# reboot after panic: kmem_malloc(4096)



## RSCAForever (Nov 10, 2009)

Hey,

I'm having trouble with running a backupscript I wrote.
The script starts running. Runs fine for about 10 to 15 min's.
Everything works as expected but suddenly the server crashes.

This is the message the server gives me:


```
savecore: reboot after panic: kmem_malloc(4096): kmem_map too small: 171315200 total allocated
Nov  8 13:18:23 SERVERNAME savecore: reboot after panic: kmem_malloc(4096): kmem_map too small: 171315200 total allocated
```

The server crashes while tar is in the process of archiving.
Tar archives snapshots which is mounted as file-backed memory devices.

snapshots are created via mksnap_ffs
devices are created this way:

```
mdconfig -a -t vnode -f snapshotfile -u devicenumber
```
The devices then get mounted via mount -r.

I've ran the script in a testenvironment without any problems.
The only difference between test and production is the outputdirectory for the script. In test this was a local directory, in production this is a NFS share that is mounted from another server.

Does anyone have an idea?


----------



## Lowell (Nov 10, 2009)

What is kern.ipc.nmbclusters? What is the output of vmstat -z before the panic?  

You may need to increase the vm memory, but it's not clear yet.


----------

