You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Stephen Uitti <su...@yahoo.com> on 2001/09/07 19:17:57 UTC

os-aix/8310: 1.3.19 on AIX does not kill idle child processes down to MaxSpareServers

>Number:         8310
>Category:       os-aix
>Synopsis:       1.3.19 on AIX does not kill idle child processes down to MaxSpareServers
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Sep 07 10:20:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     suitti@yahoo.com
>Release:        1.3.19
>Organization:
apache
>Environment:
I believe this is AIX 4.3.  It's a pretty big server - 4 CPUs and 8 GB RAM.
I attempted to compile Apache with the IBM native compiler, but though it
compiles, it doesn't run.  A little debugging seemed to indicate that C
pointer aliases weren't handled correctly, as unlikely as that seems.
So, I'm using gcc version 2.95.3.
>Description:
Apache 1.3.19 on AIX does not kill idle child processes down to MaxSpareServers.
1.3.19 on Linux does.

>How-To-Repeat:
Build and install apache from source on AIX.
Edit httpd.conf to allow server-status.
Add "sleep 5" to the begining of cgi-bin/test-cgi, and run "chmod +x test-cgi".
Launch a browser, and point to "http://127.0.0.1/server-status".

Install wget, then run this script:
#!/bin/sh
for i in 1 2 3 4 5 6 7 8 9 0 a b c d e f g h i j; do
 wget http://127.0.0.1/cgi-bin/test-cgi &
done

(or use "lynx -dump http://127.0.0.1/cgi-bin/test-cgi &"
if wget is not available.)

Refresh the browser pointing to "http://127.0.0.1/server-status".
You should see 20 apache children.  Once the children become idle,
one should move from a "." (idle) to a "_" (no process) each second.

On Linux, (Red Hat 7), this is what you see.  On AIX, the idle processes
hang around forever.

I instrumented the code under AIX with fprintf's to a file.  
The code in http_main.c to send the SIGUSR1 to kill an idle child does
get executed.  It attempts to kill the same child once a second forever.
The child PID shows up in "ps".

The code to set the signal handler for the child is
set to "just_die".  However, the signal handler, "just_die" never
seems to be called.

When the server is shut down (apache_ctl stop), all process are correctly
killed.  There doesn't seem to be any significant delay in this process,
leading me to believe that it doesn't resort to SIGTERM or SIGKILL, though
I won't swear to it.  I instrumented all the calls to signal that set
the signal to ignore, and didn't find any at run time.  This seems unlikely,
but I'm not really sure what I should expect.


>Fix:
no.
>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <ap...@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]