cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl crash - curl_easy_perform() ???

From: Pedro Neves <pneves_at_av.it.pt>
Date: Thu, 23 Jun 2005 00:41:50 +0100

Daniel Stenberg wrote:

> On Wed, 22 Jun 2005, Pedro Neves wrote:
>
>> The curl_easy_perform() function does not even return because it
>> stops. I have declared a return variable to analyse the error, but
>> the function does not return when it stops. If everything goes ok,
>> the variable res is filled with a zero.
>>
>> res = curl_easy_perform() -> however, the function does not even return
>
>
> So what does it do? Use strace or gdb to figure it out.

Daniel, thanks for being patient with me and with my problem. My lack of
experience is delaying the process. Sorry for that.

I used gdb and backtrace in order to find out the problem (I ran the
program several times in order to clearly show you the 2 problems that
are ocurring).

In the reply data that I show below, you can see that curl stopped and
it seems to me that it stayed waiting for data since it has not reached
the end of the reply. In this case, I had to make Ctrl-c to go back to
gdb and perform backtrace (the curl crashed after receiving the
character *n*).

/*............
noresize><tr><th width=150><th width=150><th width=150><th
width=150><th></th><tr><td><input type=text size=18 name=HAD value=><td
colspan=2><input type=submit name=ADD value=Add onclick="return
validate()">&nbsp;&nbsp;&nbsp;&nbsp;<input type=submit n

*/When I made backtrace, I got the following result. As you can see, the
problem seems to be in the curl source code...it comes from inside the
curl_easy_perform()./*

(gdb) bt
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb7ddc4fa in poll () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7fd0374 in Curl_select () from /usr/lib/libcurl.so.3
#3 0xb7fc9541 in Curl_single_fdset () from /usr/lib/libcurl.so.3
#4 0xb7fc9edd in Curl_perform () from /usr/lib/libcurl.so.3
#5 0xb7fca535 in curl_easy_perform () from /usr/lib/libcurl.so.3
(gdb)
*/
Next, I show you the same problem as the last one, but in this case the
reply data is complete. However (once again), the curl stops and I have
to do Ctrl-c to go back to gdb and perform the backtrace.

/*................
ue=Delete onclick="return validate()">&nbsp;&nbsp;&nbsp;&nbsp;<input
type=submit name=RET value=Close
onclick="window.close()">&nbsp;&nbsp;&nbsp;&nbsp;<td><table
bgcolor=#7F7F7F border=0 cellspacing=1 cellpadding=3 width=100%><tr><td
bgcolor=#F0F0F0 align=center>2 Addresses
</td></tr></table></td><tr><td>&nbsp;<td><td><td></td><tr><td><a
href=E0>00:E0:18:E0:B8:32</a><td><a
href=E1>33:33:FF:E0:B8:32</a><td><td></td><tr><td><td><td><td></td><tr><td><td><td><td></td>
<tr><td><td><td><td></td><tr><td><td><td><td></td><tr><td><td><td><td></td><tr><td><td>
<td><td></td><tr><td><td><td><td></td><tr><td><td><td><td></td><tr><td><td><td><td></td>
<tr><td><td><td><td></td><tr><td><td><td><td></td><tr><td><td><td><td></td><tr><td><td>
<td><td></td><tr><td><td><td><td></td><tr><td><td>
<td><td></td></tr></table></center></form></body></html>
*/

The backtrace result is the same as before.

/*(gdb) bt
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb7ddc4fa in poll () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7fd0374 in Curl_select () from /usr/lib/libcurl.so.3
#3 0xb7fc9541 in Curl_single_fdset () from /usr/lib/libcurl.so.3
#4 0xb7fc9edd in Curl_perform () from /usr/lib/libcurl.so.3
#5 0xb7fca535 in curl_easy_perform () from /usr/lib/libcurl.so.3
(gdb)*/

>From what I see, the problem is the same in both cases. Do you have any
idea of what is going on?

Thanks in advance for your time.

Regards,
Pedro Neves
Received on 2005-06-23