From owner-freebsd-stable@FreeBSD.ORG Sun Jan 9 01:37:19 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B835C16A4CE for ; Sun, 9 Jan 2005 01:37:19 +0000 (GMT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id DCB6243D48 for ; Sun, 9 Jan 2005 01:37:18 +0000 (GMT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 9 Jan 2005 01:37:18 +0000 (GMT) To: Peter Jeremy In-Reply-To: Your message of "Sun, 09 Jan 2005 11:58:39 +1100." <20050109005838.GX79646@cirb503493.alcatel.com.au> Date: Sun, 09 Jan 2005 01:37:17 +0000 From: Ian Dowse Message-ID: <200501090137.aa00596@salmon.maths.tcd.ie> cc: freebsd-stable@freebsd.org Subject: Re: 4.10 kernel panic: Fatal trap 12: page fault while in kernel mode X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jan 2005 01:37:19 -0000 In message <20050109005838.GX79646@cirb503493.alcatel.com.au>, Peter Jeremy wri tes: >On Wed, Dec 15, 2004 at 12:42:25PM -0800, Scott Sewall wrote: >> I'm running FreeBSD 4.10-RELEASE-p3 that occasionally panics. The panic >> occurs seems to happen when I'm running rsync of large directories >> possibly in combination with reading or writing to a compact flash >> attached to USB. > >Having just looked into an identical panic, the problem is an >interface bug between bus_dmamem_alloc() and contigmalloc(). It's >nothing to do with USB and (AFAIK) exists in 4.x, 5.x and 6.x. The USB code is not entirely free of blame here however. It allocates numerous big chunks of contiguous memory for tranfer buffers instead of using the (admittedly limited) scatter-gather capabilities of the USB host controllers. Try applying the change from revision 1.6 of usb_mem.c. This fixed one particularly inefficient memory use behaviour in the USB code. That change is already in 5.x and 6.x, but wasn't merged to 4.x. http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/usb/usb_mem.c Ian