cURL

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1315 curl-7.34.0: hangs after hitting IPv6 address with no IPv6 available

From: Daniel Stenberg <bagder_at_users.sf.net>
Date: Thu, 26 Dec 2013 19:27:56 +0000

Ack, I managed to repeat this just now - although it me several attempts. I get the "hang" and when attaching gdb to the process I get to see the loop. See below:

~~~~

0x0000000000429929 in trynextip (conn=0x1e32988, sockindex=0, tempindex=0)
at connect.c:564
564 while(ai && ai->ai_family != family)
(gdb) bt
#0 0x0000000000429929 in trynextip (conn=0x1e32988, sockindex=0, tempindex=0)
    at connect.c:564
#1 0x000000000042a8b1 in Curl_connecthost (conn=0x1e32988, remotehost=0x1e33a38)
    at connect.c:1112
#2 0x000000000044f904 in Curl_setup_conn (conn=0x1e32988, protocol_done=0x7fff0727b6c9)
    at url.c:5573
#3 0x00000000004305e5 in Curl_async_resolved (conn=0x1e32988,
    protocol_done=0x7fff0727b6c9) at hostasyn.c:133
#4 0x000000000042c89a in multi_runsingle (multi=0x1e16e28, now=..., data=0x1df9788)
    at multi.c:1084
#5 0x000000000042de32 in curl_multi_perform (multi_handle=0x1e16e28,
    running_handles=0x7fff0727b7cc) at multi.c:1734
#6 0x00000000004276d9 in easy_transfer (multi=0x1e16e28) at easy.c:705
#7 0x000000000042789d in easy_perform (data=0x1df9788, events=false) at easy.c:784
#8 0x00000000004278e7 in curl_easy_perform (easy=0x1df9788) at easy.c:803
#9 0x0000000000418dca in operate (config=0x7fff0727bdd0, argc=3, argv=0x7fff0727c298)
    at tool_operate.c:1493
#10 0x00000000004128c9 in main (argc=3, argv=0x7fff0727c298) at tool_main.c:103
(gdb) p ai
$1 = (Curl_addrinfo *) 0x1e33c98
(gdb) p family
$2 = 10
(gdb) n
565 ai = ai->ai_next;
(gdb) p *ai
$3 = {ai_flags = 0, ai_family = 2, ai_socktype = 1, ai_protocol = 0, ai_addrlen = 16,
  ai_canonname = 0x1e33ce8 "bad12.haxx.se", ai_addr = 0x1e33d18, ai_next = 0x0}
(gdb) n
564 while(ai && ai->ai_family != family)
(gdb)
567 if(ai) {
(gdb)
575 break;
(gdb)
579 if(fd_to_close != CURL_SOCKET_BAD)
(gdb)
582 return rc;
(gdb)
583 }
(gdb)
Curl_connecthost (conn=0x1e32988, remotehost=0x1e33a38) at connect.c:1108
1108 while(res != CURLE_OK &&
(gdb)
1109 conn->tempaddr[0] &&
(gdb)
1108 while(res != CURLE_OK &&
(gdb)
1110 conn->tempaddr[0]->ai_next &&
(gdb)
1109 conn->tempaddr[0] &&
(gdb)
1111 conn->tempsock[0] == CURL_SOCKET_BAD)
(gdb)
1110 conn->tempaddr[0]->ai_next &&
(gdb)
1112 res = trynextip(conn, FIRSTSOCKET, 0);
(gdb) s
trynextip (conn=0x1e32988, sockindex=0, tempindex=0) at connect.c:538
538 CURLcode rc = CURLE_COULDNT_CONNECT;
(gdb) n
544 curl_socket_t fd_to_close = conn->tempsock[tempindex];
(gdb)
545 conn->tempsock[tempindex] = CURL_SOCKET_BAD;
(gdb)
547 if(sockindex == FIRSTSOCKET) {
(gdb)
551 if(conn->tempaddr[tempindex]) {
(gdb)
553 family = conn->tempaddr[tempindex]->ai_family;
(gdb)
554 ai = conn->tempaddr[tempindex]->ai_next;
(gdb)
563 while(ai) {
(gdb)
564 while(ai && ai->ai_family != family)
(gdb)

---
** [bugs:#1315] curl-7.34.0: hangs after hitting IPv6 address with no IPv6 available**
**Status:** open
**Created:** Tue Dec 24, 2013 04:00 PM UTC by Anthony G. Basile
**Last Updated:** Thu Dec 26, 2013 09:11 AM UTC
**Owner:** Bjorn Stenberg
This was hit on a gentoo system and the downstream report can be seen at
   https://bugs.gentoo.org/show_bug.cgi?id=495170
In brief, if curl 7.34.0 tries an ipv6 address when one isn't available, it falls into a loop and eats 100% cpu.  This issue is not reproduceable on 7.33.0.
Here we used c-ares-1.9.1, libidn-1.28, openssl-1.0.1e and zlib-1.2.8.
---
Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
Received on 2013-12-26

These mail archives are generated by hypermail.

donate! Page updated December 19, 2013.
web site info

File upload with ASP.NET