Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jan 1999 16:49:44 +0100 (MET)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        steven@shellnet.co.uk (Steven Fletcher)
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: IPFW, Dummynet under 2.2.8-RELEASE.
Message-ID:  <199901101549.QAA17193@labinfo.iet.unipi.it>
In-Reply-To: <3699df97.14510975@smtp.shellnet.co.uk> from "Steven Fletcher" at Jan 10, 99 05:24:05 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> >that is) so you need some option NMBCLUSTERS=3Dsome-high-value
> >to be safe.
> 
> My kernel already has:
> 
> maxusers 	512
> options		"NMBCLUSTERS=3D9000"

ok...

> >Another possible source of problems could be that buffers reference a
> >route (descriptor)=20
> 
> Aha. Could this have anything to do with the errors I'm getting?
> 
> Jan  9 13:11:48 freebsd /kernel: rtfree: 0xf4822a00 not freed (neg
> refs)

yes this could be a source of problems. There are a couple of places in
ip_dummynet.c where i manipulate the rt_refcnt field.
I am doing this at splimp() so i don't think i can be a victim of some
race condition.
Perhaps you can try removing the decrease of the counter in dn_move(),
near the lines below:

	case DN_TO_IP_OUT: {
		...
-		if (tmp_rt)
-			tmp_rt->rt_refcnt--; /* XXX return a reference count */

could be that it results in some false release of route entries.
(remove the lines marked with '-')
If this is a fix the system should remain stable. If it is not, then
you might see reference counts for such structures increase too much
(with netstat -nr, probably the Refs field is what you need)

> I searched the mail archives, but found no real result about this.

If the problem is htere, dummynet is the only responsible.

> However, these errors don't usually happen near the crashes.

unfortunately the problem is that if dummynet makes reference counts
incorrect, then a route could be silently freed right before it is used,
and the actions on the not-existing-anymore rtentry can destroy some
other piece of information.

let me know if the above fixes problems.

	cheers
	luigi

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901101549.QAA17193>