cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: crash in fgets

From: Jean-Francois Bertrand <jeffy_at_broadsoft.com>
Date: Mon, 20 Nov 2006 17:25:47 -0500

since I upgraded to curl 7.16.0, I get periodic crashes that I was not
seeing with curl 7.12.2. I have curl statically linked against my test
program.

Following is a collection of backtraces.

#0 0x00000000007a3bc4 in ho_res_set (this=0x314500002000bf41,
res=0x2aaaaaadf3e8, free_res=0) at gen_ho.c:330
330 gen_ho.c: No such file or directory.
        in gen_ho.c
(gdb) bt
#0 0x00000000007a3bc4 in ho_res_set (this=0x314500002000bf41,
res=0x2aaaaaadf3e8, free_res=0) at gen_ho.c:330
#1 0x000000000078e6d8 in getaddrinfo (hostname=0x2aaab47b76d0
"mtlas04", servname=0x2aaae605fa00 "80", hints=0x0, res=0x2aaae605fad0)
    at getaddrinfo.c:1223
#2 0x0000000000762f08 in Curl_getaddrinfo ()
#3 0x000000000074e129 in Curl_resolv () at hostip.c:461
#4 0x000000000075504b in CreateConnection () at url.c:3801
#5 0x0000000000753d25 in Curl_connect () at url.c:3978
#6 0x000000000075c058 in Curl_connect_host () at transfer.c:2164
#7 0x0000000000759625 in Curl_perform () at transfer.c:2255
#8 0x000000000074d071 in curl_easy_perform () at easy.c:479
#9 0x0000000000565f48 in NetworkClient::performGet
(this=0x314500002000bf41, curlEasyHandle=0x2aaab47bff10, url=@0x0)
    at networkclient.cpp:294
#10 0x0000000000565ade in NetworkClient::get (this=0x314500002000bf41,
url=@0x2aaab47bff10, lastModifiedDate=0, networkObject=@0x0,
    updatedLastModifiedDate=@0xb00, maxFileAge=@0x2aaaaaae14e0) at
networkclient.cpp:239
#11 0x000000000055372a in try_end_0_1.0.38.171 () at
networkclientadapter.cpp:39

#0 0x00002aaaab97811d in raise () from /lib/libc.so.6
(gdb) bt
#0 0x00002aaaab97811d in raise () from /lib/libc.so.6
#1 0x00002aaaab97984e in abort () from /lib/libc.so.6
#2 0x00002aaaab9ace41 in __fsetlocking () from /lib/libc.so.6
#3 0x00002aaaab9b32e1 in free () from /lib/libc.so.6
#4 0x00002aaaab9b4cd2 in malloc () from /lib/libc.so.6
#5 0x00002aaaab9b9d12 in strdup () from /lib/libc.so.6
#6 0x000000000075daca in Curl_store_ip_addr () at connect.c:488
#7 0x000000000075653c in ConnectPlease () at url.c:2235
#8 0x000000000075640b in SetupConnection () at url.c:3927
#9 0x0000000000753d42 in Curl_connect () at url.c:3986
#10 0x000000000075c058 in Curl_connect_host () at transfer.c:2164
#11 0x0000000000759625 in Curl_perform () at transfer.c:2255
#12 0x000000000074d071 in curl_easy_perform () at easy.c:479
#13 0x0000000000565f48 in NetworkClient::performGet (this=0x299,
curlEasyHandle=0x3c6, url=@0x6) at networkclient.cpp:294
#14 0x0000000000565ade in NetworkClient::get (this=0x299, url=@0x3c6,
lastModifiedDate=6, networkObject=@0xffffffffffffffff,
    updatedLastModifiedDate=@0x6, maxFileAge=@0x3c6) at
networkclient.cpp:239
#15 0x000000000055372a in try_end_0_1.0.38.171 () at
networkclientadapter.cpp:39

#0 0x00000000007a32f8 in add_rule (irs=0x2aaaaab016a0, map=irs_nw,
acc=irs_lcl, options=0x2aaaaab016c8 "�����*") at gen.c:334
334 gen.c: No such file or directory.
        in gen.c
(gdb) bt
#0 0x00000000007a32f8 in add_rule (irs=0x2aaaaab016a0, map=irs_nw,
acc=irs_lcl, options=0x2aaaaab016c8 "�����*") at gen.c:334
#1 0x00000000007a383a in __irs_gen_acc (options=0x939505 "",
conf_file=0x0) at gen.c:377
#2 0x0000000000791ee9 in __net_data_create (conf_file=0x0) at
irs_data.c:160
#3 0x0000000000791fb0 in __net_data_init (conf_file=0x0) at
irs_data.c:140
#4 0x000000000078e226 in getaddrinfo (hostname=0x18ea990 "mtlas04",
servname=0x2aaaee06fa00 "80", hints=0x5e5e5e5e5e5e5e5e,
    res=0x2aaaee06fad0) at getaddrinfo.c:1211
#5 0x0000000000762f08 in Curl_getaddrinfo ()
#6 0x000000000074e129 in Curl_resolv () at hostip.c:461
#7 0x000000000075504b in CreateConnection () at url.c:3801
#8 0x0000000000753d25 in Curl_connect () at url.c:3978
#9 0x000000000075c058 in Curl_connect_host () at transfer.c:2164
#10 0x0000000000759625 in Curl_perform () at transfer.c:2255
#11 0x000000000074d071 in curl_easy_perform () at easy.c:479
#12 0x0000000000565f48 in NetworkClient::performGet (this=0xc366e0,
curlEasyHandle=0x5e5e5e5e5e5e5e5e, url=@0x5e5e5e5e5e5e5e5e)
    at networkclient.cpp:294
#13 0x0000000000565ade in NetworkClient::get (this=0xc366e0,
url=@0x5e5e5e5e5e5e5e5e, lastModifiedDate=6799976246779207262,
    networkObject=@0x2aaaaab016d0, updatedLastModifiedDate=@0x300,
maxFileAge=@0x5) at networkclient.cpp:239
#14 0x000000000055372a in try_end_0_1.0.38.171 () at
networkclientadapter.cpp:39

thanks
/JF

On Mon, 2006-20-11 at 17:12 -0500, Jean-Francois Bertrand wrote:
> I periodically get a core dump when running libcurl 7.16.0 from a
> multi-threaded test program. In this test program, there are 300
> threads doing http get at the same time.
>
> Have anyone seen this?
>
> (gdb) bt
> #0 0x00002aaaab9a4446 in fgets () from /lib/libc.so.6
> #1 0x00000000007ad39f in pr_next (this=0x1132643) at lcl_pr.c:209
> #2 0x00000000007ad5b0 in pr_byname (this=0x2aaaaaadf520, name=0x8fe59c
> "tcp") at lcl_pr.c:158
> #3 0x00000000007a4e34 in pr_byname (this=0x1132643, name=0x8fe59c
> "tcp") at gen_pr.c:140
> #4 0x000000000079161e in getprotobyname (name=0x8fe59c "tcp") at
> getprotoent.c:111
> #5 0x000000000075d59a in tcpnodelay () at connect.c:641
> #6 0x000000000075dd00 in Curl_connecthost () at connect.c:871
> #7 0x0000000000756515 in ConnectPlease () at url.c:2225
> #8 0x000000000075640b in SetupConnection () at url.c:3927
> #9 0x0000000000753d42 in Curl_connect () at url.c:3986
> #10 0x000000000075c058 in Curl_connect_host () at transfer.c:2164
> #11 0x0000000000759625 in Curl_perform () at transfer.c:2255
> #12 0x000000000074d071 in curl_easy_perform () at easy.c:479
> #13 0x0000000000565f48 in NetworkClient::performGet (this=0x1132643,
> curlEasyHandle=0x23fd, url=@0x0) at networkclient.cpp:294
> #14 0x0000000000565ade in NetworkClient::get (this=0x1132643,
> url=@0x23fd, lastModifiedDate=0, networkObject=@0x2aaa00706374,
> updatedLastModifiedDate=@0xfefefefefefefeff, maxFileAge=@0x23fd) at
> networkclient.cpp:239
> #15 0x000000000055372a in try_end_0_1.0.38.171 () at
> networkclientadapter.cpp:39
>
> thanks
> /JF
Received on 2006-11-20