Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Feb 2005 15:06:55 -0800
From:      "David G. Lawrence" <dg@dglawrence.com>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        current@freeBSD.org
Subject:   Re: do_execve() finding vmspace_destroyed set under load
Message-ID:  <20050211230655.GL2146@opteron.dglawrence.com>
In-Reply-To: <20050211225017.GA58711@xor.obsecurity.org>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
> >    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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050211230655.GL2146>