cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Segmentaion Faults!

From: jna <jna_at_tcpbbs.net>
Date: Wed, 22 Oct 2003 23:24:09 -0500

> Nice backtrace.

Thanks :)

> Hm, this looks like a bad gethostbyname_r() in your glibc. What version of
> glibc do you have? (ldd --version shows it). Can you try to increase the

ldd (GNU libc) 2.2.4

> initial value of the variable step_size? (It is within the
my_getaddrinfo()
> function a few lines above the gethostbyname_r() call). It starts at 200
and
> gets increased if found out to be too small, but apparently this crash
happens
> on the first run (as 'buflen' shown above is 180). It seems as if the
function
> crashes instead of returning ERANGE.

Ok I tried increasing it from 200 to 2000and then recompiled/installed and
it still seg faulted and then I tried to increase it to 20000 and still
same. Here is the trace:

Starting program: /usr/local/bin/curl www.google.com

Program received signal SIGSEGV, Segmentation fault.
0x219e in ?? () at eval.c:88
88 }
(gdb) bt
#0 0x219e in ?? () at eval.c:88
#1 0x4003da0e in _nss_files_gethostbyname_r () at eval.c:88
#2 0x402ad11b in __gethostbyname_r (name=0x8081b50 "www.google.com",
resbuf=0x8082220, buffer=0x8082234 "",
    buflen=19980, result=0xbffff3d4, h_errnop=0xbffff3d8) at
../nss/getXXbyYY_r.c:200
#3 0x4001cf71 in my_getaddrinfo (data=0x806d080, hostname=0x8081b50
"www.google.com", port=80,
    bufp=0xbffff414) at hostip.c:619
#4 0x4001cd0c in Curl_resolv (data=0x806d080, hostname=0x8081b50
"www.google.com", port=80) at hostip.c:253
#5 0x4002808d in CreateConnection (data=0x806d080, in_connect=0xbffff6f8)
at url.c:2675
#6 0x400284b4 in Curl_connect (data=0x806d080, in_connect=0xbffff6f8) at
url.c:2822
#7 0x40031821 in Curl_perform (data=0x806d080) at transfer.c:1561
#8 0x40031c10 in curl_easy_perform (curl=0x806d080) at easy.c:245
#9 0x804c9c5 in operate (config=0xbffffa08, argc=2, argv=0xbffffb94) at
main.c:2879
#10 0x804ccff in main (argc=2, argv=0xbffffb94) at main.c:2985
#11 0x401e987f in __libc_start_main (main=0x804ccd0 <main>, argc=2,
ubp_av=0xbffffb94,
    init=0x8048dd0 <_init>, fini=0x804e55c <_fini>, rtld_fini=0x4000c130
<_dl_fini>, stack_end=0xbffffb8c)
    at ../sysdeps/generic/libc-start.c:129
(gdb)

Clues?? :(

> > > Lovely. :-(
> >
> > Yeah I know I hate having to not being able to use updated stuff :(
>
> I was also thinking about the fact that these guys obviously have found
some
> kind of bug in later curl versions that we don't know about and thus
haven't
> fixed.

Most likely but I can not get the older versions to work so the newer would
most likely not work alone either even if they supported it.

Thanks,
John

-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
Received on 2003-10-23