From owner-freebsd-sparc64@FreeBSD.ORG Sat Jan 22 09:39:59 2005 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 62B9516A4CE; Sat, 22 Jan 2005 09:39:59 +0000 (GMT) Received: from ns.kt-is.co.kr (ns.kt-is.co.kr [211.218.149.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C58F43D1D; Sat, 22 Jan 2005 09:39:58 +0000 (GMT) (envelope-from yongari@kt-is.co.kr) Received: from michelle.kt-is.co.kr (ns2.kt-is.co.kr [220.76.118.193]) (authenticated bits=128) by ns.kt-is.co.kr (8.12.10/8.12.10) with ESMTP id j0M9d1Ah019718 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sat, 22 Jan 2005 18:39:01 +0900 (KST) Received: from michelle.kt-is.co.kr (localhost.kt-is.co.kr [127.0.0.1]) by michelle.kt-is.co.kr (8.13.1/8.13.1) with ESMTP id j0M9dsqb021767 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 22 Jan 2005 18:39:54 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Received: (from yongari@localhost) by michelle.kt-is.co.kr (8.13.1/8.13.1/Submit) id j0M9dsld021766; Sat, 22 Jan 2005 18:39:54 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Date: Sat, 22 Jan 2005 18:39:54 +0900 From: Pyun YongHyeon To: John Baldwin Message-ID: <20050122093954.GA21145@kt-is.co.kr> References: <200411301035.12035.jhb@FreeBSD.org> <200411301410.46329.jhb@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Dxnq1zWXvFF0Q93v" Content-Disposition: inline In-Reply-To: <200411301410.46329.jhb@FreeBSD.org> User-Agent: Mutt/1.4.2.1i X-Filter-Version: 1.11a (ns.kt-is.co.kr) cc: sparc64@freebsd.org cc: freebsd-sparc64@freebsd.org cc: Poul-Henning Kamp Subject: Re: Duplicate mbuf free panic in hme(4) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: yongari@kt-is.co.kr List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jan 2005 09:39:59 -0000 --Dxnq1zWXvFF0Q93v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Nov 30, 2004 at 02:10:46PM -0500, John Baldwin wrote: > On Tuesday 30 November 2004 10:35 am, John Baldwin wrote: > > I got the following panic on my ultra60 while the box was idle over the > > holidays: > > > > Nov 26 00:20:25 amd[293]: reload of map /etc/amd.map is not needed (in > > sync) Nov 26 01:24:26 amd[293]: reload of map /etc/amd.map is not needed > > (in sync) Nov 26 02:28:26 amd[293]: reload of map /etc/amd.map is not > > needed (in sync) Nov 26 03:32:26 amd[293]: reload of map /etc/amd.map is > > not needed (in sync) Slab at 0xfffff80085467ed8, freei 2 = 0. > > panic: Duplicate free of item 0xfffff80085466200 from zone > > 0xfffff80027ffd5c0 (Mbuf) > > > > cpuid = 0 > > KDB: enter: panic > > [thread 100039] > > Stopped at kdb_enter+0x38: ta %xcc, 1 > > db> tr > > panic() at panic+0x19c > > uma_dbg_free() at uma_dbg_free+0x138 > > uma_zfree_arg() at uma_zfree_arg+0x1a4 > > m_freem() at m_freem+0x4c > > hme_intr() at hme_intr+0x2d0 > > psycho_intr_stub() at psycho_intr_stub+0x8 > > ithread_loop() at ithread_loop+0x218 > > fork_exit() at fork_exit+0x9c > > fork_trampoline() at fork_trampoline+0x8 > > db> > > > > Perhaps this can also explain the memory used after free panics that myself > > and others see on our sparcs under load? > When I read this mail, I couldn't reproduce this panic. With new ata controller(hpt372) with UDMA100 disk I could easily reproduce this panic. It seems that the panic is occurred under heavy system I/O and the bug survivied for a long time. Anyway, it seems that the following patch fix the issue to me. But it seems that hme(4) now prints "device timeout" messages under heavy loads. That needs more investigation. -- Regards, Pyun YongHyeon http://www.kr.freebsd.org/~yongari | yongari@freebsd.org --Dxnq1zWXvFF0Q93v Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="if_hme.c.patch" --- sys/dev/hme/if_hme.c.orig Mon Jan 17 19:51:39 2005 +++ sys/dev/hme/if_hme.c Sat Jan 22 17:15:36 2005 @@ -1032,6 +1032,7 @@ return (0); fail: bus_dmamap_unload(sc->sc_tdmatag, td->htx_dmamap); + td->htx_m = NULL; return (error); } --Dxnq1zWXvFF0Q93v--