#37256 [Opn->Bgs]: php-fastcgi + CLOSE_WAIT

From: Date: Thu, 04 May 2006 19:28:12 +0000
Subject: #37256 [Opn->Bgs]: php-fastcgi + CLOSE_WAIT
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-96613@lists.php.net to get a copy of this message
ID: 37256 Updated by: tony2001@php.net Reported By: faerion at eggdrop dot org dot ru -Status: Open +Status: Bogus Bug Type: Other web server Operating System: Linux 2.6.15 PHP Version: 5.1.2 New Comment: Do not file bugs when you have Zend extensions (zend_extension=) loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache, APC, Xdebug and ionCube loader. These extensions often modify engine behavior which is not related to PHP itself. Previous Comments: ------------------------------------------------------------------------ [2006-05-04 19:14:04] faerion at eggdrop dot org dot ru PHP 5.1.5-dev (cgi-fcgi) (built: May 4 2006 14:15:11) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies with eAccelerator v0.9.5-beta2, Copyright (c) 2004-2006 eAccelerator, by eAccelerator Nothing changes. ------------------------------------------------------------------------ [2006-05-03 13:23:05] iliaa@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip ------------------------------------------------------------------------ [2006-05-01 19:06:13] faerion at eggdrop dot org dot ru PHP 5.2.0-dev (cgi-fcgi) (built: May 1 2006 14:00:29) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies with eAccelerator v0.9.5-beta2, Copyright (c) 2004-2006 eAccelerator, by eAccelerator The same results with latest CVS snapshot: tcp 1 0 127.0.0.1:10000 127.0.0.1:54728 CLOSE_WAIT 29561/php ------------------------------------------------------------------------ [2006-05-01 14:43:22] tony2001@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip ------------------------------------------------------------------------ [2006-05-01 03:31:42] faerion at eggdrop dot org dot ru Description: ------------ I use nginx+php-fastcgi under linux. My script outputs some part of file and waits for ipc message to continue sending file. max_execution_time is set to 0, ignore_user_abort is off. When user aborts the connection - nginx closes client connection and connection to php-fastcgi server. But the socket on php doesn't close and remains beeing in CLOSE_WAIT state without any timeout. There is also no script execution break caused by connection abort - connection_status() always returns 0. Example of netstat output: tcp 1 0 127.0.0.1:10000 127.0.0.1:42347 CLOSE_WAIT 29566/php Reproduce code: --------------- while (!$t) { if (msg_receive($GLOBALS['stream_queue'], 1, $msg_type, 1024, $msg, true, MSG_IPC_NOWAIT)) { $t = true; } else { usleep(10000); } } Expected result: ---------------- That code execution should break on user abort. Actual result: -------------- Actually it doesn't break. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37256&edit=1

« previous php.bugs (#96613) next »