cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Segmentaion Faults!

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 23 Oct 2003 09:02:51 +0200 (CEST)

On Wed, 22 Oct 2003, jna wrote:

> > Hm, this looks like a bad gethostbyname_r() in your glibc. What version of
> > glibc do you have?
>
> ldd (GNU libc) 2.2.4

Ok, then we can rule out a few assumptions. I have a glibc 2.2.4 box here
myself and I've never experienced that problem on that machine... It runs
kernel 2.4.18 though. I also have a glibc 2.1.3 installation that I regularly
runs and tests curl on that works fine (running both 2.4 and 2.6 kernels).

> 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.

Right, that's probably not relevant anyway.

> Here is the trace:
>
> Starting program: /usr/local/bin/curl www.google.com

Uh, does any other name resolves work with curl on this box? Does name
resolves work with other tools?

> #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
>
> Clues?? :(

Not many. You *can* run configure --disable-thread to prevent curl to attempt
to use the thread-safe gethostbyname_r() function and instead use the
traditional gethostbyname() instead. But that breaks the "thread-safetyness"
in libcurl.

> 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.

Speaking of older versions. Can you get _any_ version of curl to work on your
host? (I mean without the --disable-thread trick)

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
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