4.10 kernel panic: Fatal trap 12: page fault while in kernel mode

Ian Dowse iedowse at maths.tcd.ie
Sat Jan 8 17:37:19 PST 2005


In message <20050109005838.GX79646 at 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


More information about the freebsd-stable mailing list