cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Segmentaion Faults!

From: jna <jna_at_tcpbbs.net>
Date: Thu, 23 Oct 2003 03:20:53 -0500

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

That makes me feel better, I think :)

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

Ok I reconfigured using the above --disable-thread and recompiled and
reinstalled and it *STILL* seg faults!? This is an active web/email/dns
server on the net and all other resolutions work fine with all other
programs, just not curl :-/ Here is the stack trace after the failed trick:

tarting program: /usr/local/bin/curl http://www.yahoo.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=0x8081b70 "www.yahoo.com",
resbuf=0x402e76e4, buffer=0x8082218 "",
    buflen=1024, result=0xbffff3a4, h_errnop=0xbffff3a8) at
../nss/getXXbyYY_r.c:200
#3 0x402acaf9 in gethostbyname (name=0x8081b70 "www.yahoo.com") at
../nss/getXXbyYY.c:145
#4 0x4001d10c in my_getaddrinfo (data=0x806d088, hostname=0x8081b70
"www.yahoo.com", port=80,
    bufp=0xbffff414) at hostip.c:682
#5 0x4001ccec in Curl_resolv (data=0x806d088, hostname=0x8081b70
"www.yahoo.com", port=80) at hostip.c:253
#6 0x400281cd in CreateConnection (data=0x806d088, in_connect=0xbffff6f8)
at url.c:2675
#7 0x400285f4 in Curl_connect (data=0x806d088, in_connect=0xbffff6f8) at
url.c:2822
#8 0x40031961 in Curl_perform (data=0x806d088) at transfer.c:1561
#9 0x40031d50 in curl_easy_perform (curl=0x806d088) at easy.c:245
#10 0x804c9c5 in operate (config=0xbffffa08, argc=2, argv=0xbffffb94) at
main.c:2879
#11 0x804ccff in main (argc=2, argv=0xbffffb94) at main.c:2985
#12 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

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

I tried 7.10.2 - 7.10.1 - 7.10 -7.9 they do the same thing!? Welcome to any
ideas I really need this program to work to use my merchant perl wrappers.

On a side note since curl does not work with names but *seems* to work with
ips, I tried the test script that was sent to me and replaced the domain for
the secure server with the ip address and ran the script to see if this
would be a short term fix and allow me to go live but that fails well see
below:

POST https://63.150.147.101:1139/LSGSXML
<order><creditcard><cardexpyear>05</cardexpyear><cardexpmonth>12</cardexpmon
th><cardnumber>4111-1111-1111-1111
</cardnumber></creditcard><orderoptions><result>GOOD</result><ordertype>SALE
</ordertype></orderoptions><paymen
t><chargetotal>9.99</chargetotal></payment><merchantinfo><configfile>1909100
515</configfile><port>1139</port><
host>63.150.147.101</host><keyfile>sm.pem</keyfile></merchantinfo></order>

SHELL> /usr/local/bin/curl -v -s -S -m 90 -E 'sm.pem' -d
'<order><creditcard><cardexpyear>05</cardexpyear><car
dexpmonth>12</cardexpmonth><cardnumber>4111-1111-1111-1111</cardnumber></cre
ditcard><orderoptions><result>GOOD
</result><ordertype>SALE</ordertype></orderoptions><payment><chargetotal>9.9
9</chargetotal></payment><merchant
info><configfile>1909100515</configfile><port>1139</port><host>63.150.147.10
1</host><keyfile>sm.pem</keyfile><
/merchantinfo></order>' 'https://63.150.147.101:1139/LSGSXML'
* About to connect() to 63.150.147.101:1139
* Connected to 63.150.147.101 (63.150.147.101) port 1139
* SSL: error:00000000:lib(0):func(0):reason(0)* Closing connection #0
curl: (35) SSL: error:00000000:lib(0):func(0):reason(0)

curl error. aborting

ARGG! :(

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