Netgraph/mpd5 stability issues
Gleb Smirnoff
glebius at FreeBSD.org
Wed Feb 16 10:54:42 UTC 2011
On Wed, Feb 16, 2011 at 03:04:09PM +0600, Eugene Grosbein wrote:
E> On 16.02.2011 14:46, Gleb Smirnoff wrote:
E> > On Wed, Feb 16, 2011 at 10:13:59AM +0600, Eugene Grosbein wrote:
E> > E> I run AMD64 with 4GB of memory, lots of memory is free and
E> > E> I still get panics often, sometimes two in a couple of hours.
E> > E> It does not seem memory exhaustion to me. It seems as very low probable race
E> > E> that happens occasionally but may happen any time.
E> > E>
E> > E> With Gleb's patch, it is obvious that panic happens at moments of user disconnect.
E> >
E> > I missed: did my patch fix panics in the ng_address_hook(), in this block?
E> >
E> > if ((hook == NULL) ||
E> > NG_HOOK_NOT_VALID(hook) ||
E> > NG_HOOK_NOT_VALID(peer = NG_HOOK_PEER(hook)) ||
E> > NG_NODE_NOT_VALID(peernode = NG_PEER_NODE(hook))) {
E> > NG_FREE_ITEM(item);
E> > TRAP_ERROR();
E> > return (ENETDOWN);
E> > }
E>
E> It seems, yes. All my panics now are in _chkhook() being called
E> with bad hook as first argument.
That is because of NETGRAPH_DEBUG, not my patch :(. Unfortunately, we don't have
coredumps and can't tell whether locking the destroy path helped or not.
E> Only one of my panics was unrelated to netgraph, with igmp_change_state() in trace.
E>
E> > May be there is some kind of memory corruption? May be try memguard(9)?
E>
E> I can try memguard too, please tell again what setting should I use.
You need to set vm.memguard.desc to a memory type you want to monitor.
You can try for some time (several hours) all netgraph related memory types:
vmstat -m | grep -i netgraph | awk '{print $1}'
E> One more thing: I've noticed my traced show there are plenty of recursive calls,
E> for example (from my letter of 07.02):
...
E> Is it normal, is NETGRAPH protected from such execution flow?
Yes, this is weird. For example kern_sendit() can't call kern_sendit() for sure.
Most other double calls in the trace are weird too.
--
Totus tuus, Glebius.
More information about the freebsd-net
mailing list