From owner-freebsd-current@FreeBSD.ORG Sun Oct 9 23:29:01 2005 Return-Path: X-Original-To: current@freebsd.org 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 F0AEE16A41F; Sun, 9 Oct 2005 23:29:00 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BF7343D49; Sun, 9 Oct 2005 23:28:57 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id j99NSrjZ028025; Mon, 10 Oct 2005 03:28:53 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id j99NSoL8028023; Mon, 10 Oct 2005 03:28:50 +0400 (MSD) (envelope-from yar) Date: Mon, 10 Oct 2005 03:28:49 +0400 From: Yar Tikhiy To: Andrew Thompson , Brooks Davis , Pawel Jakub Dawidek , FreeBSD Current , Brooks Davis Message-ID: <20051009232849.GA27349@comp.chem.msu.su> References: <20051005024903.GA72743@heff.fud.org.nz> <20051005203639.GA20552@garage.freebsd.pl> <20051005205515.GA30350@odin.ac.hmc.edu> <20051005210950.GB75848@heff.fud.org.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051005210950.GB75848@heff.fud.org.nz> User-Agent: Mutt/1.5.9i Cc: Subject: Re: panic: ifc_free_unit: bit is already cleared X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 09 Oct 2005 23:29:01 -0000 On Thu, Oct 06, 2005 at 10:09:50AM +1300, Andrew Thompson wrote: > On Wed, Oct 05, 2005 at 01:55:15PM -0700, Brooks Davis wrote: > > On Wed, Oct 05, 2005 at 10:36:39PM +0200, Pawel Jakub Dawidek wrote: > > > On Wed, Oct 05, 2005 at 03:49:03PM +1300, Andrew Thompson wrote: > > > +> Hi, > > > +> > > > +> I have found a repeatable panic with network device cloning, unfortunatly I am > > > +> unable to dump on this box. This is sparc64 with a 2 day old current. > > > > > > The order is wrong in vlan_modevent(). > > > > > > if_clone_detach() is freeing ifc_units field, so ifc_free_unit() should not > > > be called after that. > > > > > > This patch should fix the problem: > > > > > > http://people.freebsd.org/~pjd/patches/if_vlan.c.patch > > > > Yes. This does introduce a race in that a new interface could > > be created between the vlan_clone_destroy loop and the call to > > if_clone_detach. > > I dont think this is the problem. IF_CLONE_REMREF(ifc) is freeing > ifc->ifc_units in if_clone_detach(). It look like the ref counting isnt > working quite right. FWIW, I tried to look at the $subject problem since I had had it before, but just got a different panic: Memory modified after free 0xc140b000(4092) val=deadc0dc @ 0xc140b000 panic: Most recently used by clone The clone code seems to have decremented something (refcount?) twice after freeing the memory chunk. -- Yar