php.net |  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
Votes:1
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
Description:
------------
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://172.16.0.1:515", $this->errNo, $this->errStr, $this->timeout);
stream_set_write_buffer($stream,0);
		stream_set_blocking($stream,1);
stream_set_timeout($stream,2,0);



Reproduce code:
---------------
<?
$stream = stream_socket_client("tcp://172.16.0.1:515", $this->errNo, $this->errStr, $this->timeout);
stream_set_write_buffer($stream,0);
		stream_set_blocking($stream,1);
stream_set_timeout($stream,2,0);

$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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-13 09:09 UTC] tony2001@php.net
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 Mar 19 07:01:29 2024 UTC