#22099 [NEW]: Strange freeze when EOF reached in socket.

From: Date: Thu, 06 Feb 2003 23:17:34 +0000
Subject: #22099 [NEW]: Strange freeze when EOF reached in socket.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-32333@lists.php.net to get a copy of this message
From: sthomas@townnews.com Operating system: Redhat 7.3 PHP version: 4.3.0 PHP Bug Type: Sockets related Bug description: Strange freeze when EOF reached in socket. I'm not sure this bug is related to bug #21529 or not; this is not a segfault, but a simple program hang. This is from a script I run from a PHP CLI, and is intermittent. I'd attach the script, but it's a 10k class file... I've used stream_set_timeout to set the limit to two seconds, and the connect timeout is also two seconds. From my debugging output, there are no infinite loops, the freezes are essentially random, and sometimes nonexistent - but always before a single call to fclose after feof() returns true. This leads me to believe that a remote server I'm contacting isn't behaving properly 100% of the time php -m returns: [PHP Modules] ctype dio ftp mysql overload pcre pgsql posix session standard tokenizer wddx xml zlib Backtrace: #0 0x401c941e in select () from /lib/libc.so.6 #1 0x08199f44 in __DTOR_END__ () #2 0x08121d01 in _php_stream_free (stream=0x83079c4, close_options=3) at /home/install/php-4.3.0/main/streams.c:327 #3 0x080acff7 in zif_fclose (ht=1, return_value=0x825e32c, this_ptr=0x0, return_value_used=0) at /home/install/php-4.3.0/ext/standard/file.c:1120 #4 0x0815b05c in execute (op_array=0x823a26c) at /home/install/php-4.3.0/Zend/zend_execute.c:1596 #5 0x0815b234 in execute (op_array=0x822b5f0) at /home/install/php-4.3.0/Zend/zend_execute.c:1640 #6 0x0815b234 in execute (op_array=0x8222518) at /home/install/php-4.3.0/Zend/zend_execute.c:1640 #7 0x0815b234 in execute (op_array=0x81daaa4) at /home/install/php-4.3.0/Zend/zend_execute.c:1640 #8 0x08145398 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/install/php-4.3.0/Zend/zend.c:864 #9 0x081188b5 in php_execute_script (primary_file=0xbffffa40) at /home/install/php-4.3.0/main/main.c:1573 #10 0x08163ecc in main (argc=2, argv=0xbffffae4) at /home/install/php-4.3.0/sapi/cli/php_cli.c:746 #11 0x4010a1c4 in __libc_start_main () from /lib/libc.so.6 I did it three times to make sure, and aside from memory segments, the trace is the same. -- Edit bug report at http://bugs.php.net/?id=22099&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22099&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22099&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22099&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22099&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22099&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22099&r=support Expected behavior: http://bugs.php.net/fix.php?id=22099&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22099&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22099&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22099&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22099&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22099&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22099&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22099&r=gnused

« previous php.bugs (#32333) next »