From owner-freebsd-bugs@FreeBSD.ORG Wed Dec 3 13:20:03 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA56A1065676 for ; Wed, 3 Dec 2008 13:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A7A8A8FC0C for ; Wed, 3 Dec 2008 13:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mB3DK2KW097134 for ; Wed, 3 Dec 2008 13:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mB3DK2aX097133; Wed, 3 Dec 2008 13:20:02 GMT (envelope-from gnats) Date: Wed, 3 Dec 2008 13:20:02 GMT Message-Id: <200812031320.mB3DK2aX097133@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: KOIE Hidetaka (=?iso-2022-jp?B?GyRCOHE5PjFRTjQbKEI=?=) Cc: Subject: Re: kern/125859: [ata] sata access failure [regression] X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "KOIE Hidetaka \(=?iso-2022-jp?B?GyRCOHE5PjFRTjQbKEI=?=\)" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Dec 2008 13:20:03 -0000 The following reply was made to PR kern/125859; it has been noted by GNATS. From: KOIE Hidetaka (=?iso-2022-jp?B?GyRCOHE5PjFRTjQbKEI=?=) To: bug-followup@FreeBSD.org Cc: hide@koie.rg Subject: Re: kern/125859: [ata] sata access failure [regression] Date: Wed, 03 Dec 2008 21:56:49 +0900 (JST) I found how to fix at last. This fix is to disable pre-allocation. Please anybody fix the problem correctly. Index: ata-dma.c =================================================================== RCS file: /museum/freebsd/repo/usr/src/sys/dev/ata/ata-dma.c,v retrieving revision 1.158 diff -u -p -r1.158 ata-dma.c --- ata-dma.c 21 Oct 2008 18:51:55 -0000 1.158 +++ ata-dma.c 2 Dec 2008 12:19:54 -0000 @@ -183,7 +186,11 @@ ata_dmaalloc(device_t dev) ch->dma.max_address, BUS_SPACE_MAXADDR, NULL, NULL, ch->dma.max_iosize, ATA_DMA_ENTRIES, ch->dma.segsize, +#if 1 /*XXX KOIE*/ + 0, NULL, NULL, &slot->data_tag)) { +#else BUS_DMA_ALLOCNOW, NULL, NULL, &slot->data_tag)) { +#endif device_printf(ch->dev, "FAILURE - create data_tag\n"); goto error; } Before applying this patch, boot single user and then zfs volinit and then zfs mount -a and then ldd if=/dev/zero of=/tmp/chunk bs=2m count=2000 and then happen bus_dmamap_load() failure invoked by ata_dmaload(). The callgraph is ata_begin_transaction ata_dmaload bus_dmamap_load _bus_dmamap_load_buffer reserve_bounce_pages return non-zero because bz->free_bpages == 0. ENOMEM After the event, any ata devices on the system do not work. (The kernel can not dump to adX. To dump, scsi device or usb mass storage is needed.) -- KOIE Hidetaka