From owner-freebsd-current@FreeBSD.ORG Tue May 4 14:08:06 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 80B81106566C for ; Tue, 4 May 2010 14:08:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 515B38FC17 for ; Tue, 4 May 2010 14:08:06 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 0369246B5C; Tue, 4 May 2010 10:08:06 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 10F1C8A021; Tue, 4 May 2010 10:08:05 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org, pyunyh@gmail.com Date: Tue, 4 May 2010 09:39:36 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <20100503195538.GF1231@michelle.cdnetworks.com> In-Reply-To: <20100503195538.GF1231@michelle.cdnetworks.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201005040939.36906.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 04 May 2010 10:08:05 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Mark Atkinson Subject: Re: exclusive sleep mutex mskc0 (network driver) r = 0 (0xc32c3690) locked @ /usr/src/sys/dev/msk/if_msk.c:3589 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 04 May 2010 14:08:06 -0000 On Monday 03 May 2010 3:55:38 pm Pyun YongHyeon wrote: > On Mon, May 03, 2010 at 07:01:56AM -0700, Mark Atkinson wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > I updated to current yesterday and got the following 'witness_warn' > > panic upon executing 'reboot': > > > > suspending ithread with the following locks held: > > exclusive sleep mutex mskc0 (network driver) r = 0 (0xc32c3690) locked @ > > /usr/src/sys/dev/msk/if_msk.c:3589 > > panic: witness_warn > > cpuid = 0 > > KDB: enter: panic > > Physical memory: 495 MB > > Dumping 80 MB: 65 49 33 17 1 > > > > > > 3579 static void > > 3580 msk_intr(void *xsc) > > 3581 { > > 3582 struct msk_softc *sc; > > 3583 struct msk_if_softc *sc_if0, *sc_if1; > > 3584 struct ifnet *ifp0, *ifp1; > > 3585 uint32_t status; > > 3586 int domore; > > 3587 > > 3588 sc = xsc; > > 3589 MSK_LOCK(sc); > > It seems msk(4) didn't honor IFF_DRV_RUNNING in status block update > check so it continued to process received packets. > Would you try attached patch? Actually, this panic looks like a leaked lock. I think this might fix it: Index: if_msk.c =================================================================== --- if_msk.c (revision 207329) +++ if_msk.c (working copy) @@ -3580,6 +3580,7 @@ (sc->msk_pflags & MSK_FLAG_SUSPEND) != 0 || (status & sc->msk_intrmask) == 0) { CSR_WRITE_4(sc, B0_Y2_SP_ICR, 2); + MSK_UNLOCK(sc); return; } -- John Baldwin