From owner-freebsd-stable@FreeBSD.ORG Mon May 24 13:48:59 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 401EE1065675 for ; Mon, 24 May 2010 13:48:59 +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 EF0EA8FC08 for ; Mon, 24 May 2010 13:48:58 +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 627BD46BC8; Mon, 24 May 2010 09:48:58 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id A6A568A026; Mon, 24 May 2010 09:48:57 -0400 (EDT) From: John Baldwin To: freebsd-stable@freebsd.org Date: Mon, 24 May 2010 09:48:33 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <77DFF2E5-7A1E-4063-A852-2C7AD9BC3DD4@gmail.com> In-Reply-To: <77DFF2E5-7A1E-4063-A852-2C7AD9BC3DD4@gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201005240948.33555.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 24 May 2010 09:48:57 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 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: Pyun YongHyeon , Nikolay Denev Subject: Re: if_sge related panics 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, 24 May 2010 13:48:59 -0000 On Monday 24 May 2010 6:35:01 am Nikolay Denev wrote: > On May 24, 2010, at 8:57 AM, Nikolay Denev wrote: > > > Hi, > > > > Recently I started to experience a if_sge(4) related panic. > > It happens almost every time I try to download a torrent file for example. > > Copying of large files over NFS seem not to trigger it, but I haven't tested extensively. > > > > Here is the panic message : > > > > Fatal trap 12: page fault while in kernel mode > > cpuid = 0; apic id = 00 > > fault virtual address = 0x8 > > fault code = supervisor write data, page not present > > instruction pointer = 0x20:0xffffffff80230413 > > stack pointer = 0x28:0xffffff80001e9280 > > frame pointer = 0x28:0xffffff80001e9510 > > code segment = base 0x0, limit 0xfffff, type 0x1b > > = DPL 0, pres 1, long 1, def32 0, gran 1 > > processor eflags = interrupt enabled, resume, IOPL = 0 > > current process = 12 (irq19: sge0) > > trap number = 12 > > panic: page fault > > cpuid = 0 > > Uptime: 1d20h56m20s > > Cannot dump. Device not defined or unavailable > > Automatic reboot in 15 seconds - press a key on the console to abort > > Sleeping thread (tid 100039, pid 12) owns a non-sleepable lock > > > > My swap is on a zvol, so I don't have dump. I'll try to attach a disk on the eSATA port and dump there if needed. > > Here is some info from the crashdump : > > (kgdb) #0 doadump () at pcpu.h:223 > #1 0xffffffff802fb149 in boot (howto=260) > at /usr/src/sys/kern/kern_shutdown.c:416 > #2 0xffffffff802fb57c in panic (fmt=0xffffffff8055d564 "%s") > at /usr/src/sys/kern/kern_shutdown.c:590 > #3 0xffffffff805055b8 in trap_fatal (frame=0xffffff000288a3e0, eva=Variable "eva" is not available. > ) > at /usr/src/sys/amd64/amd64/trap.c:777 > #4 0xffffffff805059dc in trap_pfault (frame=0xffffff80001e91d0, usermode=0) > at /usr/src/sys/amd64/amd64/trap.c:693 > #5 0xffffffff805061c5 in trap (frame=0xffffff80001e91d0) > at /usr/src/sys/amd64/amd64/trap.c:451 > #6 0xffffffff804eb977 in calltrap () > at /usr/src/sys/amd64/amd64/exception.S:223 > #7 0xffffffff80230413 in sge_start_locked (ifp=0xffffff000270d800) > at /usr/src/sys/dev/sge/if_sge.c:1591 Try this. sge_encap() can sometimes return an error with m_head set to NULL: Index: if_sge.c =================================================================== --- if_sge.c (revision 208375) +++ if_sge.c (working copy) @@ -1588,7 +1588,8 @@ if (m_head == NULL) break; if (sge_encap(sc, &m_head)) { - IFQ_DRV_PREPEND(&ifp->if_snd, m_head); + if (m_head != NULL) + IFQ_DRV_PREPEND(&ifp->if_snd, m_head); ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } -- John Baldwin