From:             yurtesen at ispro dot net
Operating system: FreeBSD 6.3
PHP version:      5.2.6
PHP Bug Type:     CGI related
Bug description:  PHP does not time out when accepting for connections while 
working as CGI

Description:
------------
When apache worker mpm and fastcgi and php-cgi are used together, the
php-cgi processes sometimes hang and do not exit ever.

I tried to backtrace the running process using 'gdb -q -p'

[Switching to LWP 100164]
0x28affbe9 in accept () from /lib/libc.so.6
(gdb) backtrace
#0  0x28affbe9 in accept () from /lib/libc.so.6
#1  0x28a4193a in accept () from /lib/libpthread.so.2
#2  0x082da06f in fcgi_accept_request ()
#3  0x082dc345 in main ()
(gdb)

It looks like once PHP enters to function to accept request, it never
exits unless instructed to do so. These processes wait idle for hours and
when I find them I have to kill them manually.

Reproduce code:
---------------
Setup apache worker mpm, fastcgi, and php to work together. Load it up
with requests and restart/reload server or cancel the requests in the
middle (I dont exactly know what is causing this but these are the most
probable suspects in my opinion). Sometimes apache process quits without
transfering any data to PHP (perhaps browser canceled, server
reload/restart etc.) PHP processes stay waiting...

The problem does not exist when apache prefork mpm is used...

Expected result:
----------------
I expect that PHP would die after max_input_time passses...

Actual result:
--------------
PHP hangs and waits until killed manually...

-- 
Edit bug report at http://bugs.php.net/?id=45254&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45254&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45254&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45254&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45254&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45254&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45254&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45254&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45254&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45254&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45254&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45254&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45254&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45254&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45254&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45254&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45254&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45254&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45254&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45254&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45254&r=mysqlcfg

Reply via email to