cURL / Mailing Lists / curl-library / Single Mail

curl-library

Crashes at inet_ntop4 when verbose is on

From: Chris Fong <Chris.Fong_at_digeo.com>
Date: Mon, 27 Mar 2006 13:52:20 -0800

Hi,

We are currently running curl 7.12.1 on Linux 2.4.20/glibc 2.3.5.

curl 7.12.1 (i386-digeo-linux-gnu) libcurl/7.12.1 OpenSSL/0.9.6b
zlib/1.2.1.2
Protocols: ftp gopher telnet dict ldap http file https ftps
Features: IPv6 Largefile NTLM SSL libz

We noticed libcurl intermittently crashes at Curl_inet_ntop/inet_ntop4
when verbose flag is on when we are doing HTTPS POST.

#0 0x408648dd in inet_ntop4 () from /usr/lib/libcurl.so.3
(gdb) bt
#0 0x408648dd in inet_ntop4 () from /usr/lib/libcurl.so.3
#1 0x40864b7e in Curl_inet_ntop () from /usr/lib/libcurl.so.3
#2 0x40846e62 in Curl_printable_address () from /usr/lib/libcurl.so.3
#3 0x40852c1e in verboseconnect () from /usr/lib/libcurl.so.3
#4 0x4085398f in Curl_connect () from /usr/lib/libcurl.so.3
#5 0x4085f99c in Curl_connect_host () from /usr/lib/libcurl.so.3
#6 0x4085fbb6 in Curl_perform () from /usr/lib/libcurl.so.3
#7 0x408602ac in curl_easy_perform () from /usr/lib/libcurl.so.3

I can't reproduce the problem all the time but the frequency tends to be
roughly once every hundreds times under stress test. What we are doing
is repeating the following steps serially with the same curl handle:

1) HTTPS GET (URL1, no verbose)
2) curl_easy_reset()
3) HTTPS POST (URL2, same host as URL1, verbose)

Browsing around, I noticed someone else has the similar crash stack
trace.

https://mail.internet2.edu/wws/arc/shibboleth-users/2005-01/msg00314.htm
l

I then noticed in a slightly newer version of curl (7.12.2), there is a
fix that may have addressed this issue.

* a case of read-already-freed-data when CURLOPT_VERBOSE is used and a
(very) persistent connection

Before I make any change to upgrade to the newer version of libcurl, I
would like to know am I in the right direction? (Is my case considered
to be a very persistent connection?) Or there is something else I am
missing?

Thanks,

--Chris
Received on 2006-03-28