Date: Thu, 27 Sep 2007 20:05:53 +0200 From: Kris Kennaway <kris@FreeBSD.org> To: Ivan Voras <ivoras@freebsd.org> Cc: freebsd-net@freebsd.org Subject: Re: Panic in rt_check Message-ID: <46FBF101.6080402@FreeBSD.org> In-Reply-To: <9bbcef730709271054k5cbda605wcfd44adede05614f@mail.gmail.com> References: <fddd8n$s82$1@sea.gmane.org> <46FBE818.3020800@FreeBSD.org> <9bbcef730709271054k5cbda605wcfd44adede05614f@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Ivan Voras wrote: > On 27/09/2007, Kris Kennaway <kris@freebsd.org> wrote: >> Ivan Voras wrote: >>> Hi, >>> >>> I have a machine that panics almost daily in route.c, in rt_check(). >>> This panic has been reported by several users, including Marcel >>> Moolenaar for a machine in freebsd.org. >>> >>> The problem is present in both 6-STABLE and 7-CURRENT, and apparently it >>> manifests on SMP machines, both i386 and AMD64. >>> >>> The panic backtrace looks like this: >>> >>> panic: mtx_lock() of destroyed mutex @ /usr/src/sys/net/route.c:1305 >> I've asked this before of others without getting an answer: is it >> possible that your gateway route is disappearing (e.g. router going >> offline, flaky switch, cable unplugged, etc)? I have seen this panic >> (only) in that situation. > > If there is a way to find this out from the machine itself, I can try > and look it up, otherwise I don't (and cannot) know. The > infrastructure is a bit big but AFAIK it's nothing special. > > Should I just call mtx_initialized() before the line and bail out if > it isn't? OTOH I need a stable patch that will be committed. You will need to evaluate based on other evidence. e.g. if you've noticed other network flakiness on this machine to do with the gateway. If my guess is correct then it's likely to be a race with something else removing the gateway route without locking it, which means that it's not always going to panic and you may notice other effects from it going away. Checking mtx_initialized won't help in that case because the race is still there. You'd need to check the places that can remove it and make sure they are all correctly locking the route first. Kris
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46FBF101.6080402>