Piping Apache ErrorLog directive problem--bug?

Piping Apache ErrorLog directive problem--bug?

Post by Marc Slemk » Mon, 11 Jan 1999 04:00:00




>I am running Apache 1.3.3 Sun Solaris 2.5.1
>Any help would be appreciated.  Anyone seeing a similar problem, I'd
>like to hear.
>There appears to be a bug when piping via the ErrorLog (but not the CustomLog)
>directive.  It appears that we many times (almost always)
>have an extra (orphaned?) process owned by init (no
>sh -c relating to it).
>Restart (kill -usr1) does not kill the process so we
>start using up processes (kill -15 does kill it--hmm?).

Are you saying that repeated USR1s will result in more and more of
these processes existing?

Quote:>I have tried the following directive in my configuration file as a simple
>test case
>    ErrorLog "| grep -v ABCDE >myfullpath"
>Interestingly, the pid of the "orphaned" process is one less than
>the parent Apache process????

Are you sure it isn't something else?  Nothing that Apache can
do on a typical system will result in creating a process with a PID
one less than the one creating it, since the pids certainly wouldn't
have wrapped around in that time.

Are you sure it goes away if you remove the piped error log?

 
 
 

Piping Apache ErrorLog directive problem--bug?

Post by Gary Mil » Tue, 12 Jan 1999 04:00:00




>>I am running Apache 1.3.3 Sun Solaris 2.5.1

Me too, and I'm seeing the same thing - one extra copy of the
log rotator...

     UID   PID  PPID  C    STIME TTY      TIME CMD
    root 13696 13694  0   Jan 08 ?        0:00 /usr/local/apache/sbin/cronolog /var/apache/log/%Y/error_log.%U
    root 13689     1  0   Jan 08 ?        0:00 /usr/local/apache/sbin/cronolog /var/apache/log/%Y/error_log.%U
    root 13694 13692  0   Jan 08 ?        0:00 /bin/sh -c /usr/local/apache/sbin/cronolog /var/apache/log/%Y/error_log.%U

Quote:>>There appears to be a bug when piping via the ErrorLog (but not the CustomLog)
>>directive.  It appears that we many times (almost always)
>>have an extra (orphaned?) process owned by init (no
>>sh -c relating to it).
>Are you sure it isn't something else?  Nothing that Apache can
>do on a typical system will result in creating a process with a PID
>one less than the one creating it, since the pids certainly wouldn't
>have wrapped around in that time.

Yes, but apache forks to put itself into the background.  The process
in question could have been created before the fork.

--
-Gary Mills-    -Unix Support-    -U of M Academic Computing and Networking-

 
 
 

1. SIGSEGV in apache 1.3.20 when using ErrorLog directive in virtualhosts

Hi,

First of all, apache is compiled with mod_ssl as module and php as a
DSO. The server is a PC runing debian, Linux 2.2.18pre21
Haven't been able to find anything regarding this....

I have 3 virtualhosts, each whith its own ErrorLog and CustomLog.
If only one virtualhosts have an ErrorLog defines it goes ok. If 2 or
more have ErrorLog defined, httpd goes to SIGSEGV in a strange manner.
-> it's not an openfile/filedescriptor related problem, as I dans add
more and more virtualhosts.

When started, the first httpd process forks. first children load conf
files, stats files, and then SIGSEGV.

I can give httpd.conf, normal and buggy traces (strace) if needed.
Here is what's done when sigsegV :

 strace -f -s 256 -o /tmp/httpd-buggy.trace /opt/web/apache1/bin/httpd
Process 4588 attached
Process 4588 detached

more /tmp/httpd-buggy.trace

....
fork()
exit()
...
4588  open("/etc/protocols", O_RDONLY)  = 6
4588  fcntl(6, F_GETFD)                 = 0
4588  fcntl(6, F_SETFD, FD_CLOEXEC)     = 0
4588  fstat(6, {st_mode=S_IFREG|0644, st_size=1748, ...}) = 0
4588  old_mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40285000
4588  read(6, "# /etc/protocols:\n# $Id: protocols,v 1.1 1995/02/24

on RFC 1340, Assigned N
umbers (July 1992).\n\nip\t0\tIP\t\t# internet protocol, ps"..., 4096)
= 1748
4588  close(6)                          = 0
4588  munmap(0x40285000, 4096)          = 0
4588  --- SIGSEGV (Segmentation fault) ---

So the children dies I don't know why....

Any idea ?

2. SGI Tar Tape

3. Apache ErrorLog directive

4. [2.5 patch] MODULE_FORCE_UNLOAD must depend on MODULE_UNLOAD (fwd)

5. Apache: Value of ErrorLog directive via mod_perl

6. Problem using BSD network functions on Linux

7. Apache ignores my configuration file ErrorLog directive

8. SoundBlaster Pro skipping (newbie question)

9. Apache 1.3.2 - Can't pipe ErrorLog

10. problem with ErrorLog directive

11. Apache 1.3.12 / VHost ErrorLog problem

12. Satisfy directive bug, or has it revealed a problem with my config?

13. Apache 1.2: ErrorLogging multiple virtual hosts to ONE file