In the current log.c code, although the write-end of an initial error
logger is still held by the parent --- until the second logger process
has kicked off.  It seems someone's inherited that write end.  I have
a two line patch attached that

Needs some review before we kick off 2.2.7 into the real world, since
we close that write end of the logger right after we've launched the
logger.  Wondering if this might not be a prefork, worker or event mpm
specific failure case.

This patch wasn't for this bug, it was strictly for common sense, but
I'm wondering if it doesn't have a side effect of solving the bug;

Bill
Index: server/log.c
===================================================================
--- server/log.c	(revision 579397)
+++ server/log.c	(working copy)
@@ -414,6 +414,12 @@
                          "unable to replace stderr with error_log");
         }
         else {
+            /* We are safer having only a single apr_file_t reference 
+             * to the new main error logging stream
+             */
+            apr_file_close(s_main->error_log)
+            s_main->error_log = stderr_log;
+
             /* We are done with stderr_pool, close it, killing
              * the previous generation's stderr logger
              */
--- Begin Message ---
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43491>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43491

           Summary: Piped ErrorLog regression: two piped program started,
                    one attached to tty
           Product: Apache httpd-2
           Version: 2.2.6
          Platform: Other
        OS/Version: AIX
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Pb was reproduced with 2.2.6 on AIX and Solaris.

Once piped log are configured (ex with rotatelogs), if you start Apache, you 
will find two copies of the errorlog piped program: 
- one has been started a few seconds prior to the second one 
- the first one has parent pid=1 (not httpd) and is attached to your tty

Example below:
 UID     PID    PPID   C    STIME    TTY  TIME CMD
root 1761522       1   0 18:28:05      -  0:00 httpd -k start 
xxxx 1892358 1761522   0 18:28:05      -  0:00 httpd -k start 
root 1077456       1   0 18:28:02 pts/12  0:00 rotatelogs errors.%Y%m%d 86400
root 2170970 1761522   0 18:28:05      -  0:00 rotatelogs errors.%Y%m%d 86400 

Since the first one is attached to your tty, you can no longer exit your ssh 
connection easily nor automate things with remote shell commands

Located the pb in server/log.c: latest revision commited in 2.2.x branch 
introduced the regression
http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/server/log.c?
r1=569542&r2=570451&diff_format=h

Note: if first piped program is killed, no prob since the second one is the 
one doing the job

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--- End Message ---

Reply via email to