From owner-freebsd-current@FreeBSD.ORG Fri Feb 11 23:06:57 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 71B8316A4CE; Fri, 11 Feb 2005 23:06:57 +0000 (GMT) Received: from dglawrence.com (dsl-230-156.ipns.com [209.210.230.156]) by mx1.FreeBSD.org (Postfix) with ESMTP id 887A343D49; Fri, 11 Feb 2005 23:06:56 +0000 (GMT) (envelope-from dg@dglawrence.com) Received: from opteron.dglawrence.com (localhost [127.0.0.1]) by dglawrence.com (8.13.1/8.13.1) with ESMTP id j1BN6t7l032000; Fri, 11 Feb 2005 15:06:55 -0800 (PST) (envelope-from dg@dglawrence.com) Received: (from dg@localhost) by opteron.dglawrence.com (8.13.1/8.13.1/Submit) id j1BN6t3c031999; Fri, 11 Feb 2005 15:06:55 -0800 (PST) (envelope-from dg@dglawrence.com) Date: Fri, 11 Feb 2005 15:06:55 -0800 From: "David G. Lawrence" To: Kris Kennaway Message-ID: <20050211230655.GL2146@opteron.dglawrence.com> References: <20050130025217.GA32612@xor.obsecurity.org> <20050130075422.GL48777@opteron.dglawrence.com> <20050130093527.GA89923@xor.obsecurity.org> <20050130101403.GM48777@opteron.dglawrence.com> <20050211225017.GA58711@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050211225017.GA58711@xor.obsecurity.org> cc: alc@freeBSD.org cc: current@freeBSD.org Subject: Re: do_execve() finding vmspace_destroyed set under load 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: Fri, 11 Feb 2005 23:06:57 -0000 > > The first thing to do is to add some kernel printf's to do_execve() > > in each of the 'if (error)' cases to determine where the error is occuring. > > It's probably not worth putting them in cases prior to the 'loop through > > the list of image activators', since the vmspace isn't destroyed until > > then. > > Once you've done that, the cause of the problem should become obvious. > > It's the error branch here: > > for (i = 0; error == -1 && execsw[i]; ++i) { > if (execsw[i]->ex_imgact == NULL || > execsw[i]->ex_imgact == img_first) { > continue; > } > error = (*execsw[i]->ex_imgact)(imgp); > } > > if (error) { > if (error == -1) { > if (textset == 0) > imgp->vp->v_vflag &= ~VV_TEXT; > error = ENOEXEC; > } > goto exec_fail_dealloc; > } > > But I forgot to print the value of error..duh :-( This tells us that the failure is coming from the image activator. Assuming it's an ELF binary that is failing, you'll need to add some printf's to the imgact_elf.c as well in order to narrow the problem down further. -DG David G. Lawrence President Download Technologies, Inc. - http://www.downloadtech.com - (866) 399 8500 TeraSolutions, Inc. - http://www.terasolutions.com - (888) 346 7175 The FreeBSD Project - http://www.freebsd.org Pave the road of life with opportunities.