From owner-freebsd-current@FreeBSD.ORG Sat Jan 15 23:30:00 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 53BC416A4CE for ; Sat, 15 Jan 2005 23:30:00 +0000 (GMT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 018DF43D41 for ; Sat, 15 Jan 2005 23:30:00 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.1/8.13.1) with ESMTP id j0FNTqrf035987; Sat, 15 Jan 2005 15:29:56 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <200501152329.j0FNTqrf035987@gw.catspoiler.org> Date: Sat, 15 Jan 2005 15:29:52 -0800 (PST) From: Don Lewis To: phk@phk.freebsd.dk In-Reply-To: <9551.1105816011@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: current@FreeBSD.org Subject: Re: reproduced: ffs_blkfree: freeing free block X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jan 2005 23:30:00 -0000 On 15 Jan, Poul-Henning Kamp wrote: > > Quite by accident my test-machine here can now reliably reproduce > the dreaded "panic: ffs_blkfree: freeing free block" in a few minutes > of time. > > It is very interesting that the location of the actual error is a > very narrow stripe of the filesystem: > > dev = ad8, block = 13456368, fs = /hex > dev = ad8, block = 13455888, fs = /hex > dev = ad8, block = 13454688, fs = /hex > dev = ad8, block = 13455040, fs = /hex > dev = ad8, block = 13455200, fs = /hex > dev = ad8, block = 13455880, fs = /hex > > The application I'm running at the time adds/modifies records in a > db(3) hash file and nothing much besides. > > Before I start implementing complete I/O traces and spend days > groveling over UFS/FFS on-disk bits, are there anybody who has > suggestions for things I should try to enable/disable to narrow > this down ? I'm reasonably certain that the on-disk bits are ok. I'm seeing it in the case where a freshly written file is being re-written. If I unmount the file system after the file is initially created, the file system fsck's clean, and if I then remount the file system, I am unable to reproduce the problem. Fsdb lists the block causing the panic as one that was initially allocated to the file. It looks like the in-core block bitmap is getting corrupted. In my openoffice build example, the following final step is sufficient to trigger the panic: jot -b x 174113 > \ /mnt/usr/ports/editors/openoffice-1.1/work/config_office/configure Merely truncating the file with "cat /dev/null" does not appear to be sufficient to trigger the panic.