httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Corcoran" <mcorco...@warpsolutions.com>
Subject RE: piped log files
Date Mon, 01 Dec 2003 09:54:39 GMT

Hi,

Maybe this is something to do with a bug that I just reported.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25103

The bug I reported is actually in the APR, it seems to cause very strange things to happen.
 What's happening, it seems, is that Apache calls apr_proc_create() to spawn off a new process,
and the caller doesn't want to send a list of environment variables (char *env[]).  But, apr_proc_create()
still ends up calling execve() and provides a NULL for the char *env[] argument.  That seems
to cause weird things to happen, including segmentation faults when Apache tries to spawn
off rotatelogs.

Here's a simple diff that I did for a simple patch I've done:

diff ./httpd-2.0.48/srclib/apr/threadproc/unix/proc.c ./httpd-2.0.48.fix/srclib/apr/threadproc/unix/proc.c
482c482
<             execve(progname, (char * const *)args, (char * const *)env);
---
>             execv(progname, (char * const *)args);
489c489
<             execv(progname, (char * const *)args);
---
>             execve(progname, (char * const *)args, (char * const *)env);

Maybe it'll help.

Thanks,
Mike C.


-----Original Message-----
From: Bastiaan van der Put [mailto:bas@web4friends.com]
Sent: Sunday, November 30, 2003 6:07 AM
To: dev@httpd.apache.org
Subject: Re: piped log files


At 14:50 11/30/2003, you wrote:
>Bastiaan van der Put wrote:
>
>>Been using the patch for a while now.
>>But it seems not only some notice/error in the error logs
>>piped log program '/usr/local/apache2/bin/logresolve >> 
>>/home/accounts/x/xxxxxx/logs/access_log' failed unexpectedly
>
>Does that happen when you stop/restart apache, or can it happen at any 
>time (steady state)?

No only when stopping/starting that is offcource.

>>But also the program keeps running after stopping/starting apache.
>>So got a load of them.
>
>Hopefully this undesired restarting is due to PR 24805
>
>http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24805
>
>which has a patch too.  (groan)

It looks indeed that bug to me, I use prefork also.
I will test the patch later on.

Greetings, Bas






Mime
View raw message