Re: do_execve() finding vmspace_destroyed set under load

From: David G. Lawrence <dg_at_dglawrence.com>
Date: Fri, 11 Feb 2005 15:06:55 -0800
> >    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.
Received on Fri Feb 11 2005 - 22:06:57 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:28 UTC