Bug #63411 [Com]: curl_multi_select() returns invalid value
| From: | aa dot vasilenko at gmail dot com | Date: | Mon, 05 Nov 2012 15:21:29 +0000 |
| Subject: | Bug #63411 [Com]: curl_multi_select() returns invalid value | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-174528@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=63411&edit=1
ID: 63411
Comment by: aa dot vasilenko at gmail dot com
Reported by: marcel at silverstreet dot com
Summary: curl_multi_select() returns invalid value
Status: Assigned
Type: Bug
Package: cURL related
Operating System: CentOS 6.3
PHP Version: 5.3.18
Assigned To: pierrick
Block user comment: N
Private report: N
New Comment:
This bug breaks existing libs, like Buzz https://github.com/kriswallsmith/Buzz ,
that relies on curl_multi_* functions. This is how I came here.
Previous Comments:
------------------------------------------------------------------------
[2012-11-03 03:42:09] pierrick@php.net
I'm not sure we really want to wait 1 second for nothing in this specific case.
Furthermore, as mentioned in my commit message, when libcurl returns -1 in
max_fd after calling curl_multi_fdset, it is because libcurl currently
does something that isn't possible for your application to monitor
with a socket and unfortunately you can then not know exactly when
the current action is completed using select().
I would personally keep the current behaviour.
------------------------------------------------------------------------
[2012-11-02 04:52:57] reeze@php.net
This is related to this
see:
https://github.com/php/php-src/commit/2e8ab65270e7d1ebe1ef0dfe13836c29d72c7010
http://curl.haxx.se/libcurl/c/curl_multi_fdset.html
There is no handles in the test script, it is expected after the patch.
------------------------------------------------------------------------
[2012-11-01 18:33:41] aa dot vasilenko at gmail dot com
Confirming the same bug. PHP 5.4.8, CentOS 5.8
------------------------------------------------------------------------
[2012-11-01 11:10:46] marcel at silverstreet dot com
Description:
------------
curl_multi_select() seems broken in PHP 5.3.18 on CentOS 6.3.
The behavior of the test script below is different than it used to be, returning
immediately without select with a -1 (failure) return value.
Test script:
---------------
$mh = curl_multi_init();
print curl_multi_select($mh, 1.0);
curl_multi_close($mh);
Expected result:
----------------
curl_multi_select() should take 1.0 seconds to complete and returns 0
Actual result:
--------------
curl_multi_select() returns immediately with return value of -1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63411&edit=1