httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46379] New: unexpected termination
Date Thu, 11 Dec 2008 06:40:26 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46379

           Summary: unexpected termination
           Product: Apache httpd-2
           Version: 2.2.10
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Event MPM
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: ncross42@cyworld.com


Description:
This bug is a apache-thread related php excution bug.

This bug is repeatable and clear.

1. System setting.
 a. apache-2.2.10 : mpm=worker and using shared modules.
-=-=-= httpd.conf =-=-=-
for simple test, values are low.
<IfModule worker.c>
StartServers        1
MinSpareThreads     2
MaxSpareThreads     4
ThreadsPerChild     2   # <- this is important.
MaxRequestsPerChild 5   # <- this is important.
</IfModule>

 b. PHP-5.2.8 : using apxs2 and enable-maintainer-zts for threadsafe
(no external cache like APC or XCache)


Reproduce code:
-=-= code of 1.php =-=-
<?php
 echo '1<br>';

 echo date("H:i:s").'<br>';
sleep(10);
 echo date("H:i:s").'<br>';
?>

-=-= code of 2.php =-=-
<?php
 echo '2<br>';

 echo date("H:i:s").'<br>';
 echo date("H:i:s").'<br>';
?>

Expected result:
<bug scenario>

 (a) browse 1.php and 2.php <concurrently ONCE>. result are not problem.
-=-= result page of 1.php =-=-
1
11:04:29
11:04:39
-=-= result page of 2.php =-=-
2
11:04:30
11:04:30

 (b) I expected ...
  - browse 1.php and 2.php
  - refresh 2.php over 10 times very fast within 10 sec. (yes, using F5)
  - I expected below normal resuluts.
-=-= result page of 1.php =-=-
1
11:12:47
11:12:57
-=-= result page of 2.php =-=-
2
11:12:57
11:12:57


Actual result:
-=-= result page of 1.php =-=-
1
11:49:00
11:49:02
-=-= result page of 2.php =-=-
2
11:49:02
11:49:02
<ANALYSIS>

 (a) initial apache process is here
Shell> ps ax | grep httpd
 5697 ?        Ss     0:00 /skcomms/apache/bin/httpd -k restart
 5964 ?        Sl     0:00 /skcomms/apache/bin/httpd -k restart
  - becuase below apache setting
<IfModule worker.c>
StartServers        1
MinSpareThreads     2
ThreadsPerChild     2
...
</IfModule>

 (b) suppose
  - in (a) action, two connection is established with process 5964
  - in (b) action, new 1.php is sleeping in 5964 and 2.php is excuted in other
new process because below reason.
<IfModule worker.c>
...
ThreadsPerChild     2
MaxRequestsPerChild 5
</IfModule>

 (c) expected in 1.php excution time (within 10 sec)
 5697 ?        Ss     0:00 /skcomms/apache/bin/httpd -k restart
 5964 ?        Sl     0:00 /skcomms/apache/bin/httpd -k restart (1.php is
sleeping here)
 597x ?        Sl     0:00 /skcomms/apache/bin/httpd -k restart (2.php is
browsed here)

 (d) but actually 5964 is terminated early in 2 seconds.
 5697 ?        Ss     0:00 /skcomms/apache/bin/httpd -k restart
 5991 ?        Sl     0:00 /skcomms/apache/bin/httpd -k restart


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

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message