On Mon, 27 Mar 2000 19:41:14 +0100 , "Ricardo Cerqueira" writes:
> > According to this snippet of rspawn's code...
> >
> > switch(wait_exitcode(wstat))
> > {
> > case 0: break;
> > case 111: substdio_puts(ss,"ZUnable to run qmail-remote.\n"); return;
> > default: substdio_puts(ss,"DUnable to run qmail-remote.\n"); return;
> > }
> > Then, I changed the default exit code to "Z" (temporary
> > failure), recompiled, and ran the same tests. This time, it went
> > like it should... mails were not delivered, but were stored in
> > queue... qmail-remote was restored, I SIGALRM'ed qmail-send, and
> > all of the test messages were delivered.
> > So... Is there any reason why it should return "D"? Or is there
> > any reason why it shouldn't return "Z"?
Not as far as I can see. I'm running with a similar change.
Actually, my change neuters the effects of execvp returning:
*** qmail-rspawn.c 1999/04/23 16:48:16 1.1
--- qmail-rspawn.c 2000/01/27 15:16:35 1.2
***************
*** 96,103 ****
if (fd_move(1,fdout) == -1) _exit(111);
if (fd_copy(2,1) == -1) _exit(111);
execvp(*args,args);
! if (error_temp(errno)) _exit(111);
! _exit(100);
}
return f;
}
--- 96,102 ----
if (fd_move(1,fdout) == -1) _exit(111);
if (fd_copy(2,1) == -1) _exit(111);
execvp(*args,args);
! _exit(111);
}
return f;
}
The root problem in my case was a FreeBSD semi-bug...
Between 2.2.x and 3.x, the bad-old vfork() semantics
returned (i.e. parent and child had the same address
space). This lead to a memory pseudo-leak[1] in
qmail-rspawn, which then ran into an rlimit, which
prevented rspawn from, well, spawning.
Quick (and effective) fix:
sysctl -w kern.fast_vfork=0
stopped the leaking instantly.
--
Chris Mikkelson | Vampireware; n, a project capable of sucking the
[EMAIL PROTECTED] | lifeblood out of anyone unfortunate enough to be
| assigned to it which never actually sees the light
| of day, but nonetheless refuses to die. ([EMAIL PROTECTED])
[1] "pseudo" in the sense that it only leaked virtual memory.
The qmail-rspawn would have a VSZ of ~500M or so, while only
a couple hundred K resident.