cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Crash in gethostbyname_r?

From: Nathan O'Sullivan <nathan_at_ausgamers.com>
Date: Mon, 16 Feb 2004 09:46:17 +1000

> If you use 7.11.0, then we're intersted in seeing a stack trace and
getting to
> know a bit more about when you get the crashes.

I'm using the 7.11.0 tar.gz as downloaded from the web site.

Here's a copy of the output from gdb for the threads running at the time of
the crash.

Program terminated with signal 11, Segmentation fault.
#0 0x4007a92d in ?? ()
(gdb) info threads
  7 process 10300 0x080bdb14 in read ()
  6 process 10301 0x080f66ed in loser_poll ()
  5 process 10302 0x080be0df in nanosleep ()
  4 process 10338 0x080bdee1 in connect ()
  3 process 10340 0x400e0d76 in ?? ()
  2 process 10341 0x080f749a in select ()
* 1 process 10339 0x4007a92d in ?? ()
(gdb) bt
#0 0x4007a92d in ?? ()
#1 0x4000cf43 in ?? ()
#2 0x080faca5 in gethostbyname_r ()
#3 0x08065f2d in my_getaddrinfo (conn=0x0, hostname=0x40408a08
"my.domain.com", port=80, waitp=0x0) at hostip.c:982
#4 0x08065b95 in Curl_resolv (conn=0x404089a8, hostname=0x40408a08
"my.domain.com", port=80, entry=0xbe1ff060) at hostip.c:335
#5 0x08069e29 in CreateConnection (data=0x40400490, in_connect=0xbe1ff830,
addr=0xbe1ff804, async=0xbe1ff837 "") at url.c:3006
#6 0x0806af61 in Curl_connect (data=0x40400490, in_connect=0xbe1ff830,
asyncp=0xbe1ff837 "") at url.c:3186
#7 0x0807157c in Curl_perform (data=0x40400490) at transfer.c:1866
#8 0x080619be in curl::Fetch(std::string, CurlData*, char const*)
(this=0x816f31c, path=
        {static npos = 4294967295, _M_dataplus = {<allocator<char>> = {<No
data fields>}, _M_p = 0x81bca04
"http://my.domain.com/pc/services/gamecreate/monitor.php?ip=202.12.147.119&o
s=linux"}, static _S_empty_rep_storage = {0, 0, 4, 0}}, data=0xbe1ff9ec,
post=0x81b64f4 "procperf=112252&pid=31739&cpu=0.0&memory=70416") at
curl.cpp:226
#9 0x0805d3a4 in Perf(ThreadInfo*, std::string, std::string) (ti=0x81baef8,
id=
        {static npos = 4294967295, _M_dataplus = {<allocator<char>> = {<No
data fields>}, _M_p = 0x81ba87c "112252"}, static _S_empty_rep_storage = {0,
0, 4, 0}}, pid=
        {static npos = 4294967295, _M_dataplus = {<allocator<char>> = {<No
data fields>}, _M_p = 0x81bac2c "31739"}, static _S_empty_rep_storage = {0,
0, 4, 0}}) at perf.cpp:293
#10 0x0805daef in PerfThread(void*) (p=0x81baef8) at perf.cpp:313
#11 0x080bfabe in pthread_start_thread ()
(gdb) thr 2
[Switching to thread 2 (process 10341)]#0 0x080f749a in select ()
(gdb) bt
#0 0x080f749a in select ()
#1 0x00000000 in ?? ()
(gdb) thr 3
[Switching to thread 3 (process 10340)]#0 0x400e0d76 in ?? ()
(gdb) bt
#0 0x400e0d76 in ?? ()
#1 0x40159b5c in ?? ()
#2 0x4015918e in ?? ()
#3 0x40158331 in ?? ()
#4 0x4015894f in ?? ()
#5 0x401585b7 in ?? ()
#6 0x4014f007 in ?? ()
#7 0x4014f1e8 in ?? ()
#8 0x080faca5 in gethostbyname_r ()
#9 0x08065f2d in my_getaddrinfo (conn=0xfffffffc, hostname=0x81d7a50
"my.domain.com", port=80, waitp=0xfffffffc) at hostip.c:982
#10 0x08065b95 in Curl_resolv (conn=0x81d79f0, hostname=0x81d7a50
"my.domain.com", port=80, entry=0xbdfff060) at hostip.c:335
#11 0x08069e29 in CreateConnection (data=0x81cf6d8, in_connect=0xbdfff830,
addr=0xbdfff804, async=0xbdfff837 "") at url.c:3006
#12 0x0806af61 in Curl_connect (data=0x81cf6d8, in_connect=0xbdfff830,
asyncp=0xbdfff837 "") at url.c:3186
#13 0x0807157c in Curl_perform (data=0x81cf6d8) at transfer.c:1866
#14 0x080619be in curl::Fetch(std::string, CurlData*, char const*)
(this=0x816f31c, path=
        {static npos = 4294967295, _M_dataplus = {<allocator<char>> = {<No
data fields>}, _M_p = 0x81bcad4
"http://my.domain.com/pc/services/gamecreate/monitor.php?ip=x.12.147.119&os=
linux"}, static _S_empty_rep_storage = {0, 0, 4, 0}}, data=0xbdfff9ec,
post=0x81b6474 "procperf=112253&pid=31744&cpu=13.5&memory=69756") at
curl.cpp:226
#15 0x0805d3a4 in Perf(ThreadInfo*, std::string, std::string) (ti=0x81baf10,
id=
        {static npos = 4294967295, _M_dataplus = {<allocator<char>> = {<No
data fields>}, _M_p = 0x81ba8f4 "112253"}, static _S_empty_rep_storage = {0,
0, 4, 0}}, pid=
        {static npos = 4294967295, _M_dataplus = {<allocator<char>> = {<No
data fields>}, _M_p = 0x81bdab4 "31744"}, static _S_empty_rep_storage = {0,
0, 4, 0}}) at perf.cpp:293
#16 0x0805daef in PerfThread(void*) (p=0x81baf10) at perf.cpp:313
#17 0x080bfabe in pthread_start_thread ()
(gdb) thr 4
[Switching to thread 4 (process 10338)]#0 0x080bdee1 in connect ()
(gdb) bt
#0 0x080bdee1 in connect ()
#1 0xbe3ffd9c in ?? ()
#2 0x080fb2f8 in nscd_gethst_r ()
#3 0x080fb13f in __nscd_gethostbyname_r ()
#4 0x080fac1c in gethostbyname_r ()
#5 0x08065f2d in my_getaddrinfo (conn=0xfffffffe, hostname=0x4040b6e8
"my.domain.com", port=80, waitp=0xfffffffe) at hostip.c:982
#6 0x08065b95 in Curl_resolv (conn=0x4040b688, hostname=0x4040b6e8
"my.domain.com", port=80, entry=0xbe3ff060) at hostip.c:335
#7 0x08069e29 in CreateConnection (data=0x81ec008, in_connect=0xbe3ff830,
addr=0xbe3ff804, async=0xbe3ff837 "") at url.c:3006
#8 0x0806af61 in Curl_connect (data=0x81ec008, in_connect=0xbe3ff830,
asyncp=0xbe3ff837 "") at url.c:3186
#9 0x0807157c in Curl_perform (data=0x81ec008) at transfer.c:1866
#10 0x080619be in curl::Fetch(std::string, CurlData*, char const*)
(this=0x816f31c, path=
        {static npos = 4294967295, _M_dataplus = {<allocator<char>> = {<No
data fields>}, _M_p = 0x81bcba4
"http://my.domain.com/pc/services/gamecreate/monitor.php?ip=x.12.147.119&os=
linux"}, static _S_empty_rep_storage = {0, 0, 4, 0}}, data=0xbe3ff9ec,
post=0x81b6534 "procperf=111684&pid=31734&cpu=0.0&memory=69976") at
curl.cpp:226
#11 0x0805d3a4 in Perf(ThreadInfo*, std::string, std::string) (ti=0x81b9140,
id=
        {static npos = 4294967295, _M_dataplus = {<allocator<char>> = {<No
data fields>}, _M_p = 0x81bda6c "111684"}, static _S_empty_rep_storage = {0,
0, 4, 0}}, pid=
        {static npos = 4294967295, _M_dataplus = {<allocator<char>> = {<No
data fields>}, _M_p = 0x81ba8ac "31734"}, static _S_empty_rep_storage = {0,
0, 4, 0}}) at perf.cpp:293
#12 0x0805daef in PerfThread(void*) (p=0x81b9140) at perf.cpp:313
#13 0x080bfabe in pthread_start_thread ()
(gdb) thr 5
[Switching to thread 5 (process 10302)]#0 0x080be0df in nanosleep ()
(gdb) bt
#0 0x080be0df in nanosleep ()
#1 0x00000000 in ?? ()
(gdb) thr 6
[Switching to thread 6 (process 10301)]#0 0x080f66ed in loser_poll ()
(gdb) bt
#0 0x080f66ed in loser_poll ()
#1 0x080f679b in poll ()
#2 0x080bf808 in __pthread_manager ()
(gdb) thr 7
[Switching to thread 7 (process 10300)]#0 0x080bdb14 in read ()
(gdb) bt
#0 0x080bdb14 in read ()
#1 0x00000001 in ?? ()
#2 0x080dbd18 in _IO_default_uflow ()
#3 0x080dbbbb in __uflow ()
#4 0x080d64dc in _IO_getline_info ()
#5 0x080d63e5 in _IO_getline ()
#6 0x080d5d4f in fgets ()
#7 0x080483cd in main (argc=1, argv=0xbfffd8d4) at gsmc.cpp:47
#8 0x080c0fc9 in __libc_start_main ()
Received on 2004-02-16