# 8.0-STABLE amd64 "keglim" process state issue



## tjninneman (Mar 2, 2010)

Hello,

We are having a real issue with our new FreeBSD 8 servers which we have not seen in any previous version.  After several hours of uptime, we are seeing long running processes go into a "keglim" state.  This can be anything...sshd, database processes, python processes, etc.  When this happens, almost all networking comes to a halt.  If I have an existing ssh session, I can continue to work on this session however all new connections (http, ssh, etc) get dropped immediately.  This is happening on every FreeBSD 8 server we have put into production. 

Any help would be much appreciated!  We may be downgrading to FreeBSD 7 soon as we can't deal with this much longer.

Thanks!

TJ Ninneman
Leisure Web LLC
www.twopeasinabucket.com


----------



## DutchDaemon (Mar 2, 2010)

This may be driver-related. Do you have a *bce* device, by any chance?


----------



## tjninneman (Mar 2, 2010)

No, I'm using Intel based em NICs.  I've attached more detailed hardware info.

Thanks!


----------



## DutchDaemon (Mar 2, 2010)

Can you browse this discussion and see if you see similar issues (mbuf errors, and such?). It's still about bce, but it's about the only thing mentioning keglim I could find.


----------



## DutchDaemon (Mar 2, 2010)

In the source tree, I only have one hit for keglim: /usr/src/sys/vm/uma_core.c.


```
/*
 * uma_core.c  Implementation of the Universal Memory allocator
 *
 * This allocator is intended to replace the multitude of similar object caches
 * in the standard FreeBSD kernel.  The intent is to be flexible as well as
 * effecient.  A primary design goal is to return unused memory to the rest of
 * the system.  This will make the system as a whole more flexible due to the
 * ability to move memory to subsystems which most need it instead of leaving
 * pools of reserved memory unused.
 *
 * The basic ideas stem from similar slab/zone based allocators whose algorithms
 * are well known.
 *
 */
```


----------



## DutchDaemon (Mar 2, 2010)

See also http://www.freebsd.org/doc/en/books/handbook/configtuning-kernel-limits.html -- you may be exhausting some networking buffers, e.g. kern.ipc.somaxconn.


----------



## tjninneman (Mar 2, 2010)

Thanks Dutch.  As I start to poke around with some of the tunables there are definitely things that could be adjusted.  I'll let you know the results.

TJ


----------

