#29886 [NoF->Csd]: segment fault when processing curl output with "wrapper-registered" stream
| From: | public at grik dot net | Date: | Wed, 18 May 2005 14:16:37 +0000 |
| Subject: | #29886 [NoF->Csd]: segment fault when processing curl output with "wrapper-registered" stream | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-79147@lists.php.net to get a copy of this message | ||
ID: 29886
User updated by: public at grik dot net
Reported By: public at grik dot net
-Status: No Feedback
+Status: Closed
Bug Type: cURL related
-Operating System: Linux
+Operating System: Linux (not FreeBSD)
PHP Version: 5CVS-2004-08-30 (dev)
New Comment:
I found out that the bug was in the PHP stream wrapper - the
segmentation fault arized on Linux platform.
That bug was recently fixed (thanx, Tony):
http://bugs.php.net/?id=32742
Previous Comments:
------------------------------------------------------------------------
[2005-05-18 16:08:05] joel at joelstrellner dot com
I am having the exact same problem in version 5.0.4. I have narrowed
it down to curl, but I can't narrow it down any further.
I tried using CURLOPT_BUFFERSIZE to overcome it but I am not sure that
it is even working.
I am pretty sure that it has to do with curl_multi_init and the related
multi functions.
The exact same code using one connection at a time does not cause an
error of any kind.
the options I am giving it are:
$conn[$i] = curl_init($url);
curl_setopt ($conn[$i], CURLOPT_BUFFERSIZE, 8192000);
curl_setopt ($conn[$i], CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($conn[$i], CURLOPT_URL, "$url");
curl_setopt ($conn[$i], CURLOPT_USERAGENT, $user_agent);
if (($referer!=NULL) AND ($referer!='')) curl_setopt ($conn[$i],
CURLOPT_REFERER, $referer);
curl_setopt ($conn[$i], CURLOPT_CONNECTTIMEOUT, $connecttimeout);
curl_setopt ($conn[$i], CURLOPT_TIMEOUT, $timeout);
curl_setopt ($conn[$i], CURLOPT_HEADER, 0);
curl_setopt ($conn[$i], CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($conn[$i], CURLOPT_MAXREDIRS, 3);
curl_setopt ($conn[$i], CURLOPT_FAILONERROR, 1);
curl_setopt ($conn[$i], CURLOPT_ENCODING, '');
curl_setopt ($conn[$i], CURLOPT_COOKIEJAR,"cookie.txt");
curl_setopt ($conn[$i], CURLOPT_COOKIEFILE,"cookie.txt");
curl_setopt ($conn[$i], CURLOPT_FOLLOWLOCATION,TRUE);
curl_setopt ($conn[$i], CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt ($conn[$i], CURLOPT_SSL_VERIFYHOST, 1);
curl_multi_add_handle ($mh,$conn[$i]);
the error I am getting is a seg fault (11) then the script stops
executing.
------------------------------------------------------------------------
[2005-03-16 01:00:07] 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".
------------------------------------------------------------------------
[2005-03-08 10:44:17] derick@php.net
Set to feedback until real feedback has been provided.
------------------------------------------------------------------------
[2005-03-08 09:35:39] public at grik dot net
Thank you, I'll try with the new version today.
------------------------------------------------------------------------
[2005-03-07 21:33:34] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
I can't get it to crash..
------------------------------------------------------------------------
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/29886
--
Edit this bug report at http://bugs.php.net/?id=29886&edit=1