www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Monfiletto <t...@tntpro.com>
Subject apache-api/9507: sh proccess launched from an .shtml file dont die
Date Thu, 17 Jan 2002 06:02:37 GMT

>Number:         9507
>Category:       apache-api
>Synopsis:       sh proccess launched from an .shtml file dont die
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Wed Jan 16 22:10:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     tony@tntpro.com
>Release:        
>Organization:
apache
>Environment:
FreeBSD tntpro.com 4.5-RC FreeBSD 4.5-RC #0: Sun Jan 13 13:22:25 EST 2002     root@tntpro.com:/usr/obj/usr/src/sys/LUNAR
 i386
>Description:
I have a "systemstatus" page that I use to take a quick look at how things are going.. here
is an clip
<!--#exec cmd="w| /usr/local/www/data/convert2html.pl" -->
the convert2html.pl file
#!/usr/bin/perl -w

while (<>) {
        $_ =~ s/</&lt/g;
        $_ =~ s/>/&gt/g;
        print;
}

exit;

every time that page gets reloaded (every 10 seconds) 3 new zombie processes are created (three
cmds are run by the page)
here is what ps -aux shows:

root:/usr/local/www/data# ps -aux
USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED      TIME COMMAND
root     28589  0.0  0.1   492  220  p4  R+   12:30AM   0:00.00 ps -aux
www      28420  0.0  0.0     0    0  ??  Z    12:04AM   0:00.00  (sh)
www      28422  0.0  0.0     0    0  ??  Z    12:04AM   0:00.00  (sh)
www      28474  0.0  0.0     0    0  ??  Z    12:16AM   0:00.00  (sh)

as far as I can tell these never die _unless_ I do an apachectl restart a graceful will not
do it...
>How-To-Repeat:
load this code in an .shtml file on a server that allows SSI not sure if it has to be freebsd
or not..
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>

<HEAD>
        <TITLE>TNT - Current System Status of Lunar</TITLE>
        <META HTTP-EQUIV="Refresh" CONTENT="15">
        <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
        <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
</HEAD>

<BODY bgcolor="#8894AA" TEXT="#B0B0B0">
	<TABLE BGCOLOR="#000000" BORDER="1" CELLPADDING="8" CELLSPACING="1">
        	<TR>
                <TD VALIGN="TOP" ALIGN="RIGHT">
                	<B>Top Processes:</B>
                </TD>
                <TD>
                	<PRE><B><!--#exec cmd="top -d1 10 | /usr/local/www/data/convert2html.pl"
--></B></PRE>
                </TD>
                </TR>
                <TR>
                <TD VALIGN="TOP" ALIGN="RIGHT">
                        <B>Users Online:</B>
                </TD>
                <TD>
                        <PRE><B><!--#exec cmd="w| /usr/local/www/data/convert2html.pl"
--></B></PRE>
                </TD>
                </TR>
                <TR>
                <TD VALIGN="TOP" ALIGN="RIGHT">
                         <B>Disk Space:</B>
                </TD>
                <TD>
                         <PRE><B><!--#exec cmd="df -h| /usr/local/www/data/convert2html.pl"
--></B></PRE>
                </TD>
                </TR>
</BODY>

</HTML>

here is the convert2html.pl file if you need it again
#!/usr/bin/perl -w

while (<>) {
        $_ =~ s/</&lt/g;
        $_ =~ s/>/&gt/g;
        print;
}

exit;
>Fix:
No sorry
>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@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!     ]
 
 


Mime
View raw message