From owner-freebsd-current@FreeBSD.ORG Mon Sep 6 15:52:54 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 3A4F516A4CE; Mon, 6 Sep 2004 15:52:54 +0000 (GMT) Received: from miranda.expro.pl (mail2.expro.pl [193.25.166.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id E8A7E43D41; Mon, 6 Sep 2004 15:52:51 +0000 (GMT) (envelope-from winfried@miranda.expro.pl) Received: by miranda.expro.pl (Postfix, from userid 1001) id 8DBDB153DF; Mon, 6 Sep 2004 17:52:50 +0200 (CEST) Date: Mon, 6 Sep 2004 17:52:50 +0200 From: Jan Srzednicki To: Robert Watson Message-ID: <20040906155250.GH5879@miranda.expro.pl> References: <20040905053005.GA80420@neo.redjade.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i cc: mlaier@freebsd.org cc: Sangwoo Shim cc: current@freebsd.org Subject: Re: syscons problem in ddb, if_afdata initialization (was: Re: 5.3-BETA3 , panic, probably IPv6+SMP+mpsafenet related) 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: Mon, 06 Sep 2004 15:52:54 -0000 On Sun, Sep 05, 2004 at 01:52:32AM -0400, Robert Watson wrote: > On Sun, 5 Sep 2004, Sangwoo Shim wrote: > > > I've reported nd6_slowtimo related panic some while ago. Please check > > kern/70393. mlaier@ suggested a patch to address this, but that wasn't > > work for me. I'll try your patch and report. Thanks. > > This patch may only fix the problem if running with debug.mpsafenet=0; I'm > currently exploring the more general if_afdata issues, and will look at > Max's patch (etc) in the report. I hope to have a patch that solves it in > the non-mpsafenet case in a day or two. Hello, It appears that a very similar panic (as Robert has figured out, related to if_afdata not being properly initialized) happens in in6_tmpaddrtimer function. The important part of the backtrace leading to this is: #22 0xc065759b in in6_tmpaddrtimer (ignored_arg=0x0) at /usr/src/sys/netinet6/in6_ifattach.c:899 ndi = (struct nd_ifinfo *) 0xc1406280 nullbuf = "\000\000\000\000\000\000\000" ifp = (struct ifnet *) 0xc1405c00 #23 0xc05a364f in softclock (dummy=0x0) at /usr/src/sys/kern/kern_timeout.c:259 c_func = (void (*)(void *)) 0xc0657520 c_arg = (void *) 0x0 c_flags = 6 c = (struct callout *) 0x0 bucket = (struct callout_tailq *) 0xcfd00490 steps = 6 depth = 1 mpcalls = 0 gcalls = 1 wakeup_cookie = 6 #24 0xc057dcad in ithread_loop (arg=0xc12b9c80) at /usr/src/sys/kern/kern_intr.c:546 ih = (struct intrhand *) 0xc12e0780 p = (struct proc *) 0xc12e7e00 count = 0 warming = 5000 warned = 0 __func__ = "ithread_loop" #25 0xc057cc09 in fork_exit (callout=0xc057dab0 , arg=0x0, frame=0x0) at /usr/src/sys/kern/kern_fork.c:820 p = (struct proc *) 0xc12e7e00 #26 0xc0720dac in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:209 No locals. (kgdb) select-frame 22 (kgdb) print ifp $1 = (struct ifnet *) 0xc1405c00 (kgdb) print *ifp if_prefixhead = {tqh_first = 0x0, tqh_last = 0xc1405d54}, if_afdata = { 0x0 }, if_afdata_initialized = 1, if_afdata_mtx = { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This thing still happens to be not initialized properly, which comes up again in a different function. So, I guess a similar workaround is needed here too, until the problem is solved. That's the workaround for the same (I think) problem that came up in the nd6_slowtimo() function (by Robert, of course), as it hasn't been posted on the list yet: ==== //depot/user/rwatson/netperf/sys/netinet6/nd6.c#9 - /home/rwatson/p4/rwatson_netperf/sys/netinet6/nd6.c ==== @@ -1779,6 +1779,8 @@ nd6_slowtimo, NULL); IFNET_RLOCK(); for (ifp = TAILQ_FIRST(&ifnet); ifp; ifp = TAILQ_NEXT(ifp, if_list)) { + if (ifp->if_afdata[AF_INET6] == NULL) + continue; nd6if = ND_IFINFO(ifp); if (nd6if->basereachable && /* already initialized */ (nd6if->recalctm -= ND6_SLOWTIMER_INTERVAL) <= 0) { greetings, -- Jan 'Winfried' Srzednicki w@expro.pl