cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: segfault in libcurl using uclibc

From: James Story <james_at_monkeyroom.com>
Date: Wed, 14 Apr 2010 09:50:39 +1200

Hey Daniel,

Thanks for taking a look at this and offering up some ideas!

To cut a long story short I tweaked my "hello curl" application to directly
mimic what was being set and passed off to "getaddrinfo" from the call into
libcurl. I found that setting the ai flag to "AI_CANONNAME" caused my test
app to also segfault and crash so by commenting out that flag setting on
line 164 of hostip4.c everything seems to be up and running. I would assume
that this is classed as a kernel bug/uclibc bug? I have a newer kernel
source available so I might compile and load that and see if that fixes up
that issue (unfortunately that kernel still ships with uclibc 0.9.29 so I'll
work on upgrading to uclibc 0.9.31 at the same time)

To also answer your questions:
- No I wasn't running threads (tried to keep it super simple :-) )
- Yep - I managed to get gdbserver running on the embedded side. That's how
I got the initial stack dump... are there any other tools you would
recommend for debugging applications in the Linux/embedded Linux world?
(sorry to go off topic but I'm new to this stuff - if there's some way to
get better info out of a trace that would be more useful for further
questions then I'll use those too)
- I'm working on a debug build of uclibc - I'm pretty new to both Linux and
embedded Linux dev so I'm trying to get hold of Telit to send me their
configuration file for buildroot so I can get hold of some non stripped
debug libraries... just waiting to hear back on that one.
- I originally had --disable-ipv6 and I had all the debug turned off until I
got to trying to hunt down what was going on. I have turned all that off
again and everything, at this stage, appears to be running nicely.

Thanks,

James

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-04-13