ID: 42682 Updated by: [EMAIL PROTECTED] Reported By: Slig at free dot fr -Status: Open +Status: Feedback Bug Type: Streams related Operating System: linux-64 PHP Version: 5CVS-2007-09-16 (snap) New Comment:
I still can not reproduce this on my system. OpenSSL Version => OpenSSL 0.9.8b 04 May 2006 Are you able to reproduce this on more than one machine? (and with other linux distro than debian) Previous Comments: ------------------------------------------------------------------------ [2007-09-16 20:27:23] Slig at free dot fr Description: ------------ stream_select fails to return the number of modified descriptors. The bug happen on linux amd64 (tested on a quad core xeon, debian etch amd64) but not on x86 install (tested on a similar computer but dual core xeon, debian etch x86). It seems to happen only when php is built with openssl (i tried many combinaisons), with php 5.2.0, 5.2.1, 5.2.2, 5.2.3, 5.2.4, php5 snap, and also php6 snap. This bug is the same as #40735 but I am unable to modify the status of that bug. I can eventually provide a ssh access to the computer further tests and debug (ask me by email). Reproduce code: --------------- <?php // replace with your smtp ip if needed, need a tcp server which reply data immediatly $handle = fsockopen('tcp://smtp',25); while(!feof($handle)) { $r = array($handle); $w = null; $e = array($handle); $nb = stream_select($r,$w,$e,3); echo "select : $nb, r=".count($r).', w='.count($w).', e='.count($e)."\n"; while($nb>0){ echo "Reading...\n"; $contents = fread($handle,8192); echo "Contents: [$contents]\n"; $r = array($handle); $w = null; $e = array($handle); $nb = stream_select($r,$w,$e,1); echo "select : $nb, r=".count($r).', w='.count($w).', e='.count($e)."\n"; } usleep(20000); } fclose($handle); ?> Expected result: ---------------- select : 1, r=1, w=0, e=0 Reading... Contents: [220 naxos2.unice.fr ESMTP Sendmail 8.13.1/8.13.1; Sun, 16 Sep 2007 22:23:04 +0200 ] select : 0, r=0, w=0, e=0 Actual result: -------------- select : 0, r=1, w=0, e=0 select : 0, r=1, w=0, e=0 select : 0, r=1, w=0, e=0 select : 0, r=1, w=0, e=0 select : 0, r=1, w=0, e=0 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42682&edit=1