On Thu, Mar 29, 2007 at 01:59:44PM -0700, Philip M. Gollucci wrote:
> Cough: http://p6m7g8.net
> No issues here.
[...]
Thanks Philip,
I would still run lsof -ac apache2 -d0,1
on that host. You may find that some of the processes have their
fd 1 closed. The problem is not especially with mod_python, it's
with the fact that fd 1 is closed.
In my case, the problem was in viewvc.py run by mod_python.
That's a CVS/SVN web interface.
viewvc is retrieving the output of some RCS commands (co,
rcsdiff) to retrieve information from a CVS repository.
To do that, it uses some home made fork/pipe handling.
It was doing:
pipe([fd1, fd2]);
fork();
dup2(fd2, 1);
close(fd1);
exec("co"...);
But because apache's file descriptor 1 had been closed
beforehand by a mod_perl script called some time ago, the code
ended up doing something like dup2(15, 1); close(1) because fd1
was 1, allocated by pipe() as it was free.
Cheers,
Stephane