cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Segmentaion Faults!

From: David Seaman <dseaman_at_luminet.net>
Date: Sun, 26 Oct 2003 10:21:08 -0600

John,

> > John,
> >
> > Re: gethostbyname_r problem:
> >
> > I have a few ideas to throw out:
> >
> > 1. What does your /etc/nsswitch.conf look like? Will it still segfault
> > if you simplify it (e.g. "hosts: files)?

> Here is a copy of it:

> passwd: compat
> group: compat

> hosts: files dns
> networks: files

> services: db files
> protocols: db files
> rpc: db files
> ethers: db files
> netmasks: files
> netgroup: files
> bootparams: files

> automount: files
> aliases: files

Wow, mine looks like this:

hosts: files dns

(That's the whole thing.) I think that the hosts line is probably the
only thing the name lookup cares about, though. What I was thinking is
if you took out "dns" from the hosts line, would it still segfault? Or
if you took out "files"? That would just be an experiment to narrow
down the problem, though; it would not be a good solution.

> > 2. Are all (any?) of the programs that do work also linked against 2.2.4?

> Yes all programs were compild using the existing 2.2.4 on the system now,
> even the bind we are running.

> > 3. Try running strace on it if all else fails; you might come up with
> > some more ideas from looking at that.

> Sorry not familuar with strace? Would be glad to do it if you get me some
> instructions :)

Just put "strace" before the command line; you might want to redirect the
output because there will be a lot of it. For example:

strace curl http://whatever.example.com 2>curl.out

The output shows all the kernel calls it makes, so you can see what it was
doing right before it died.

> Thanks,
> John

David

-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community? Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
Received on 2003-10-26