|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40458 stream_select
Submitted: 2007-02-13 04:44 UTC Modified: 2007-02-21 01:00 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: roberto at spadim dot com dot br Assigned:
Status: No Feedback Package: Streams related
PHP Version: 5.2.1 OS: linux 64bits
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-02-13 04:44 UTC] roberto at spadim dot com dot br
hello i was using archlinux 32 bits version on pentium3 
i bought an intel core 2 duo e6600 and i'm using archlinux 64
my code on 32 bits was using

$read = array($stream);
if (false === ($num_changed_streams = stream_select($read, $write = NULL, $except = NULL, 1,0))){

on 32 bits ok, it wait one second or if data received return with num_changed_stream>0

on 64 bits no, it return imediatly and num_changed_stream=0, since tcpdump didn't show nothing i think that's an 64bits bug

i created $stream with:

$stream = stream_socket_client("tcp://", $this->errNo, $this->errStr, $this->timeout);

Reproduce code:
$stream = stream_socket_client("tcp://", $this->errNo, $this->errStr, $this->timeout);

$read = array($stream);
echo microtime(0)."\n";
$num_changed_streams = stream_select($read, $write = NULL, $except = NULL, 1,0);
echo microtime(0)."\n";


Expected result:
a long time (1 second of diff)

Actual result:
on 32bits php ok 
on 64 bits php return .0010 seconds of diff and tcpdump didn't showed nothing on this stream


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-13 09:09 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

 [2007-02-21 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 08:01:30 2024 UTC