cURL / Mailing Lists / curl-library / Single Mail

curl-library

Download program hangs occasionally

From: Rune Kleveland <runekl_at_opoint.com>
Date: Mon, 28 Aug 2006 23:34:53 +0200

I have been using a program based on Curl to monitor changes on web
sites. The program works very well, downloading around 5-700Kb/s
continously using the multi interface since november 2004.

But sometimes the program seems to hang for 2-30 seconds. I would
like to avoid that, since it slows down the monitoring process.

The backtrace when it hangs looks like (modulo variations in url)

(gdb) bt
#0 0x00000031da6c117f in poll () from /lib64/libc.so.6
#1 0x00000031dcf08dcb in __libc_res_nsend () from /lib64/libresolv.so.2
#2 0x00000031dcf07fe5 in __libc_res_nquery () from /lib64/libresolv.so.2
#3 0x00000031dcf08298 in __libc_res_nquerydomain () from /lib64/libresolv.so.2
#4 0x00000031dcf08680 in __libc_res_nsearch () from /lib64/libresolv.so.2
#5 0x00002aaaae241712 in _nss_dns_gethostbyname3_r ()
   from /lib64/libnss_dns.so.2
#6 0x00002aaaae2419a4 in _nss_dns_gethostbyname2_r ()
   from /lib64/libnss_dns.so.2
#7 0x00000031da6b4909 in gaih_inet () from /lib64/libc.so.6
#8 0x00000031da6b4e43 in getaddrinfo () from /lib64/libc.so.6
#9 0x00002aaaaac0d713 in Curl_getaddrinfo (conn=0x7fffffece020,
    hostname=0x2140e810 "www.malaysiakini.com", port=80, waitp=Variable "waitp" is not available.
)
    at hostip6.c:294
#10 0x00002aaaaabeacf6 in Curl_resolv (conn=0x21b558a0,
    hostname=0x2140e810 "www.malaysiakini.com", port=80, entry=0x7fffffece750)
    at hostip.c:459
#11 0x00002aaaaabfcb25 in Curl_connect (data=0x224bbb10,
    in_connect=0x22463608, asyncp=0x7fffffece7c6 "",
    protocol_done=0x7fffffece7c5 "") at url.c:3817
#12 0x00002aaaaac09bc5 in multi_runsingle (multi=0x62ee40, easy=0x224635f0)
    at multi.c:598
#13 0x00002aaaaac0a062 in curl_multi_perform (multi_handle=0x62ee40,
    running_handles=0x7fffffeceab8) at multi.c:953
#14 0x00000000004087d1 in main (argc=Variable "argc" is not available.
) at getlink.cpp:1058
(gdb) q

Is there some way to avoid this?

Any help would be greatly appreciated.

-- 
Regards,
Rune Kleveland
Received on 2006-08-28