ID:               46756
 Updated by:       [EMAIL PROTECTED]
 Reported By:      kyle at ifixit dot com
 Status:           Verified
 Bug Type:         cURL related
 Operating System: *
 PHP Version:      5CVS, 6CVS (2008-12-08)
 New Comment:

This bug has been reproduced without PHP by reproducing the same
sequence in C.

$ svn co http://ookoo.org/svn/snip/curl_bug
...
$ cd curl_bug
$ make
...
$ gdb ./curl_bug 
...
#0  0x00007f81692626c9 in ?? () from /usr/lib/libcurl.so.4
#1  0x00007f8169263ec4 in ?? () from /usr/lib/libcurl.so.4
#2  0x00007f816926444c in Curl_connect () from /usr/lib/libcurl.so.4
#3  0x00007f81692721ba in ?? () from /usr/lib/libcurl.so.4
#4  0x00007f8169272a6e in curl_multi_perform () from
/usr/lib/libcurl.so.4
#5  0x0000000000400b34 in main (argc=1, argv=0x7fff716a14d8) at
test.c:36

I'll build latest curl with debug mode, check if this can be
reproduced, and if so, I'll open a but on libcurl providing more debug
informations.


Previous Comments:
------------------------------------------------------------------------

[2008-12-10 19:32:11] [EMAIL PROTECTED]

I checked the origin of the crash, and it seems that libcurl does NOT
behave good if you duplicate a handle while it's part of a curl_multi.

Calling curl_multi_remove_handle($mh, $conn[$i]); before $conn2[$i] =
curl_copy_handle($conn[$i]); fixes the issue.

Checking curl's documentation, I found it to be quite picky about
processing order. I believe this is either a bug in libcurl, or a
"feature".

libcurl's manpages are not providing exact informations about calling
curl_easy_duphandle() on a curl handle part of a curl_multi.

I'm going to investigate this more and either fix this bug (by
providing a patch) or mark it as bogus (if this is a curl feature).

------------------------------------------------------------------------

[2008-12-08 11:33:38] [EMAIL PROTECTED]

Verified with latest CVS + Curl 7.18.2

------------------------------------------------------------------------

[2008-12-07 16:45:51] kyle at ifixit dot com

Reproducible using libcurl/7.19.2 OpenSSL/0.9.8b zlib/1.2.3
libidn/0.6.5 
on kernel 2.6.18-53.1.14.el5. This is not a new bug-- also reproducible

with PHP 5.2.6 and an older version of libcurl.

------------------------------------------------------------------------

[2008-12-07 09:54:13] [EMAIL PROTECTED]

I cannot reproduce this on PHP 5.2.7 using Windows Vista

------------------------------------------------------------------------

[2008-12-06 15:52:05] crrodriguez at opensuse dot org

VERIFIED, but it is curl_multi_exec() that crashes.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/46756

-- 
Edit this bug report at http://bugs.php.net/?id=46756&edit=1

Reply via email to