From owner-freebsd-current@FreeBSD.ORG Thu Dec 9 10:15:27 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A3EB616A4CE; Thu, 9 Dec 2004 10:15:27 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id A725643D46; Thu, 9 Dec 2004 10:15:26 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id iB9AFPFD042498; Thu, 9 Dec 2004 12:15:25 +0200 (EET) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 05238-10; Thu, 9 Dec 2004 12:15:24 +0200 (EET) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id iB9AFORQ042494 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 9 Dec 2004 12:15:24 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.1/8.13.1) id iB9AFO7N062709; Thu, 9 Dec 2004 12:15:24 +0200 (EET) (envelope-from ru) Date: Thu, 9 Dec 2004 12:15:24 +0200 From: Ruslan Ermilov To: Max Laier Message-ID: <20041209101524.GC62331@ip.net.ua> References: <200412090411.42258.max@love2party.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0eh6TmSyL6TZE2Uz" Content-Disposition: inline In-Reply-To: <200412090411.42258.max@love2party.net> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at ip.net.ua cc: gnn@freebsd.org cc: freebsd-current@freebsd.org cc: Robert Watson cc: Steve Kargl Subject: Re: protocol timer running before protocol is fully initialized (again) (was re: panic: mtx_lock() of spin mutex ...) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Dec 2004 10:15:27 -0000 --0eh6TmSyL6TZE2Uz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Max, On Thu, Dec 09, 2004 at 04:11:26AM +0100, Max Laier wrote: > On Thursday 09 December 2004 03:31, Robert Watson wrote: > > On Wed, 8 Dec 2004, Steve Kargl wrote: > > > panic: mtx_lock() of spin mutex (null) @ sys/netinet/frag6.c:682 > > > cpuid =3D 0 > > > kdb_backtrace+0x37 > > > panic+0x1d1 > > > _mtx_lock_flags+0x72 > > > frag6_slowtimo+0x26 > > > pfslowtimo+0x5a > > > softclock+0x1c0 > > > ithread_loop+0x179 > > > fork_exit+0xe9 > > > fork_trampoline+0xe > > > > > > This is FreeBSD/amd64 from today's sources of about 30 minutes ago. > > > > > >From the instant interpretation unit: it looks like this is another > > > > example of a protocl's timeout firing before the protocol is properly > > initialized, as the mutex appears to be zero'd due to being in BSS. >=20 > Here is a lazy fix: > http://people.freebsd.org/~mlaier/uipc_domain.c.lazy.diff >=20 > Should help for (almost) sure. This fixes all domains that are initialize= d in=20 > SI_SUB_PROTO_DOMAIN, those that are initialized later on (netgraph e.g.) = can=20 > still trigger this prime example why it's bad to hook something in before= =20 > initializing it properly. Unfortunately our code and API force us to do s= o at=20 > the moment :-\ >=20 > Please tell me if the patch (apply to src/sys/kern/uipc_domain.c) helps. >=20 I've got the same panic early on boot, but in ip_input(), on i386. Your patch helps. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --0eh6TmSyL6TZE2Uz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBuCW8qRfpzJluFF4RAhgFAJ96SsxXyyuSwLbnvfPPp2Z8JYOdKwCgjI+S +DCfDmYsUbxqYl6SjtgF3Qg= =Gda9 -----END PGP SIGNATURE----- --0eh6TmSyL6TZE2Uz--