From owner-freebsd-stable@FreeBSD.ORG Mon Aug 6 14:40:15 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DFDC91065723; Mon, 6 Aug 2012 14:40:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 0D8CD8FC18; Mon, 6 Aug 2012 14:40:06 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6D314B9BC; Mon, 6 Aug 2012 10:40:05 -0400 (EDT) From: John Baldwin To: Sean Bruno Date: Mon, 6 Aug 2012 10:38:20 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <1342742294.2656.24.camel@powernoodle.corp.yahoo.com> <201208021634.20529.jhb@freebsd.org> <1343948488.2838.0.camel@powernoodle.corp.yahoo.com> In-Reply-To: <1343948488.2838.0.camel@powernoodle.corp.yahoo.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201208061038.20056.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 06 Aug 2012 10:40:05 -0400 (EDT) Cc: "attilio@freebsd.org" , "freebsd-stable@freebsd.org" Subject: Re: [stable 9] panic on reboot: ipmi_wd_event() X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Aug 2012 14:40:16 -0000 On Thursday, August 02, 2012 7:01:28 pm Sean Bruno wrote: > On Thu, 2012-08-02 at 13:34 -0700, John Baldwin wrote: > > On Wednesday, August 01, 2012 6:48:48 pm Sean Bruno wrote: > > > On Wed, 2012-08-01 at 05:53 -0700, John Baldwin wrote: > > > > Index: vfs_subr.c > > > > =================================================================== > > > > --- vfs_subr.c (revision 238969) > > > > +++ vfs_subr.c (working copy) > > > > @@ -1868,8 +1868,11 @@ sched_sync(void) > > > > continue; > > > > } > > > > > > > > - if (first_printf == 0) > > > > + if (first_printf == 0) { > > > > + mtx_unlock(&sync_mtx); > > > > wdog_kern_pat(WD_LASTVAL); > > > > + mtx_lock(&sync_mtx); > > > > + } > > > > > > > > } > > > > if (!LIST_EMPTY(gslp)) { > > > > > > > > > > > > -- > > > > John Baldwin > > > > > > This definitely makes the panic go away on reboot. > > > > Do you have watchdogd enabled at all? > > > > No, we never had it enabled. Ok, can you try this instead of the other patch. It makes the IPMI driver not bother clearing the watchdog if it isn't running. Index: dev/ipmi/ipmi.c =================================================================== --- dev/ipmi/ipmi.c (revision 238992) +++ dev/ipmi/ipmi.c (working copy) @@ -653,11 +653,12 @@ if (timeout == 0) timeout = 1; e = ipmi_set_watchdog(sc, timeout); - if (e == 0) + if (e == 0) { *error = 0; - else + sc->ipmi_watchdog_active = 1; + } else (void)ipmi_set_watchdog(sc, 0); - } else { + } else if (atomic_readandclear_int(&sc->ipmi_watchdog_active) != 0) { e = ipmi_set_watchdog(sc, 0); if (e != 0 && cmd == 0) *error = EOPNOTSUPP; Index: dev/ipmi/ipmivars.h =================================================================== --- dev/ipmi/ipmivars.h (revision 238992) +++ dev/ipmi/ipmivars.h (working copy) @@ -105,6 +105,7 @@ struct cdev *ipmi_cdev; TAILQ_HEAD(,ipmi_request) ipmi_pending_requests; eventhandler_tag ipmi_watchdog_tag; + int ipmi_watchdog_active; struct intr_config_hook ipmi_ich; struct mtx ipmi_lock; struct cv ipmi_request_added; -- John Baldwin