apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40651] New: - SHELL_PATH in apr_arch_threadproc.h hangs Apache piped logger
Date Sun, 01 Oct 2006 19:49:18 GMT
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=40651>.
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=40651

           Summary: SHELL_PATH in apr_arch_threadproc.h hangs Apache piped
                    logger
           Product: APR
           Version: 1.2.7
          Platform: Other
        OS/Version: Solaris
            Status: NEW
          Severity: normal
          Priority: P2
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: rainer.jung@kippdata.de


I use Apache 2.2.3 on Solaris. All Logfiles are configured to use rotatelogs.
Whenever I restart Apache either with "restart" or with "graceful" The first
piped logger, which cares about the global error log, is left over in the
process table. To be more precise: For all loggers new processes get started,
and all apart from the described old one terminate. The problem is this
unnecessary old process that doesn't die.

One description of a reason is, that Apache 2.2 uses APR to do the fork and APR
uses "/bin/sh -c" to do that. Unfortunately /bin/sh on Solaris doesn an
additional fork when called with "-c" and we end up with a process tree of depth
three: Apache-/bin/sh-rotatelogs. It looks like the termination mechanism and
the signal handling of Apache is not made for this situation.

I described a related problem in Bugzilla 

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

I didn't really trace the signal problem down to the details for Apache 2.2/APR
but again the same solution does work: If I use another Shell in SHELL_PATH,
which does not fork for "-c", the problem goes away.

Changing the SHELL_PATH in apr_arch_threadproc.h from "/bin/sh" to
"/usr/xpg4/bin/sh" worked. That's a XPG4 compliant shell
which exists on Solaris since Solaris 2.5, so for about 10 years.

The shell is similar to ksh (see "man ksh") and does *not* fork when called with
"-c".

It would be nice to at least document the behaviour. Really nice would be to
make SHELL_PATH changeable via configure and to be able to change it via Apaches
configure (and if that would be documented).

If it's really necessary, I could pin down, why the problem only applies for the
first error logger. On the other hand, I also would like to get rid of the
additional /bin/sh processes, so using another shell would solve both problems.

-- 
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.

Mime
View raw message