From owner-freebsd-current@FreeBSD.ORG Fri May 2 21:37:14 2003 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 E33D437B401; Fri, 2 May 2003 21:37:14 -0700 (PDT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 807FE43FCB; Fri, 2 May 2003 21:37:13 -0700 (PDT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 3 May 2003 05:37:12 +0100 (BST) To: Scott Long In-Reply-To: Your message of "Fri, 02 May 2003 17:11:49 MDT." <3EB2FB35.8060104@btc.adaptec.com> Date: Sat, 03 May 2003 05:37:08 +0100 From: Ian Dowse Message-ID: <200305030537.ab79568@salmon.maths.tcd.ie> cc: mckusick@mckusick.com cc: Jeff Roberson cc: current@freebsd.org cc: alc@freebsd.org Subject: Re: Panic in ffs_blkfree() 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, 03 May 2003 04:37:15 -0000 In message <3EB2FB35.8060104@btc.adaptec.com>, Scott Long writes: >Kirk and all, > >Recently a panic started appearing on mine and other's systems while >under load. I have an SMP system with all UFS1+softupdates Try reverting revisions sys/vm/vm_object.c 1.274 and kern/vfs_subr.c revision 1.444, i.e. apply the patch below. I think there may be cases where the `all' flag was necessary; instrumentation of vm_object_page_remove() in a kernel from Apr 5th shows cases where pages with both wrapped negative (indirection blocks I presume) and larger than object->size page indices get selected, so this would have been broken by limiting the range to < object->size. Ian Index: vm/vm_object.c =================================================================== RCS file: /home/iedowse/CVS/src/sys/vm/vm_object.c,v retrieving revision 1.281 diff -u -r1.281 vm_object.c --- vm/vm_object.c 2 May 2003 04:55:21 -0000 1.281 +++ vm/vm_object.c 3 May 2003 04:28:52 -0000 @@ -1684,22 +1684,22 @@ * The object must be locked. */ void -vm_object_page_remove(vm_object_t object, vm_pindex_t start, vm_pindex_t end, - boolean_t clean_only) +vm_object_page_remove(vm_object_t object, vm_pindex_t start, vm_pindex_t end, boolean_t clean_only) { vm_page_t p, next; + int all; - VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); - if (object->resident_page_count == 0) + if (object == NULL || + object->resident_page_count == 0) return; + all = ((end == 0) && (start == 0)); /* * Since physically-backed objects do not use managed pages, we can't * remove pages from the object (we must instead remove the page * references, and then destroy the object). */ - KASSERT(object->type != OBJT_PHYS, - ("attempt to remove pages from a physical object")); + KASSERT(object->type != OBJT_PHYS, ("attempt to remove pages from a physical object")); vm_object_pip_add(object, 1); again: @@ -1717,7 +1717,7 @@ * or (2) NULL. */ for (; - p != NULL && p->pindex < end; + p != NULL && (all || p->pindex < end); p = next) { next = TAILQ_NEXT(p, listq);