Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 495170 - net-misc/curl-7.34.0: hangs after hitting IPv6 address with no IPv6
Summary: net-misc/curl-7.34.0: hangs after hitting IPv6 address with no IPv6
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL: https://sourceforge.net/p/curl/bugs/1...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-23 23:04 UTC by Michał Górny
Modified: 2013-12-30 16:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Most recent build log (net-misc:curl-7.34.0:20131223-220938.log,166.60 KB, text/x-log)
2013-12-23 23:04 UTC, Michał Górny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-12-23 23:04:37 UTC
Created attachment 366044 [details]
Most recent build log

Long story short:

$ LC_ALL=C curl -vvvv blogs.gentoo.org/mgorny/comments/feed
* Hostname was NOT found in DNS cache
* Adding handle: conn: 0x2195c30
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x2195c30) send_pipe: 1, recv_pipe: 0
*   Trying 2001:470:ea4a:1:225:90ff:fe02:1999...
* Immediate connect fail for 2001:470:ea4a:1:225:90ff:fe02:1999: Network is unreachable

At this point 100% CPU consumption and nothing else happens. The same issue occurs to other programs using libcurl (like claws-mail RSS plugin).

Using gdb, I can tell it's hitting some kind of dead loop around this part:

Curl_connecthost (conn=conn@entry=0x79ac30, remotehost=0x79bab0) at connect.c:1108
1106	  /* start connecting to first IP */
1107	  res = singleipconnect(conn, conn->tempaddr[0], &(conn->tempsock[0]));
1108	  while(res != CURLE_OK &&
1109	        conn->tempaddr[0] &&
1110	        conn->tempaddr[0]->ai_next &&
1111	        conn->tempsock[0] == CURL_SOCKET_BAD)
1112	    res = trynextip(conn, FIRSTSOCKET, 0);

Attaching the most recent build log.

--
Portage 2.2.7 (default/linux/amd64/13.0/desktop, gcc-4.8.2, glibc-2.17, 3.12.3-pf-mgorny-amd64+ x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.12.3-pf-mgorny-amd64+-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_3800+-with-gentoo-2.2
KiB Mem:     4048784 total,    100952 free
KiB Swap:    1502072 total,   1464528 free
Timestamp of tree: Mon, 23 Dec 2013 19:00:01 +0000
ld GNU gold (GNU Binutils 2.23.2) 1.11
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0::gentoo-cvs
dev-lang/python:          2.6.8-r3, 2.7.6, 3.2.5-r3, 3.3.3
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.1-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.14
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.8.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.12 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo okupy sunrise x11 science gentoo-cvs mgorny
Installed sets: @mg_depends, @mg_depends_identitygo, @mg_okupy, @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -frecord-gcc-switches"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=athlon64 -O2 -pipe -frecord-gcc-switches"
DISTDIR="/srv/nfs/common/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y --ask --keep-going --quiet-build=n"
FCFLAGS="-march=athlon64 -O2 -pipe -frecord-gcc-switches"
FEATURES="assume-digests binpkg-logs buildpkg cgroup collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=athlon64 -O2 -pipe -frecord-gcc-switches"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK=""
LANG="pl_PL.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j3"
PKGDIR="/srv/nfs/common/packages/athlon64"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --times --compress --force --whole-file --delete --stats --timeout=45 --exclude=/distfiles --exclude=/packages --exclude=/local --exclude=CVS --exclude=/metadata/cache --omit-dir-times"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/var/db/repos/gentoo"
PORTDIR_OVERLAY="/var/db/repos/okupy /var/db/repos/sunrise /var/db/repos/x11 /var/db/repos/science /usr/src/gx86 /home/mgorny/git/mgorny-repo"
USE="3dnow 3dnowext X a52 aac acl adns aio alsa amd64 bash-completion bluetooth branding btrfs bzip2 cairo caps cdda cdr cli crypt cups curl cxx dbus djvu dri dts dvb dvd dvdr egl emboss exif fftw firefox flac fontconfig fortran gd gif glamor gles2 gmp gnuplot gnutls gstreamer gtk iconv idn imagemagick ipv6 jpeg jpeg2k kate latex lcms libass libatomic liblockfile libnotify libproxy libsamplerate libsecret libtiger lzma lzo mad mmap mmx mmxext mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl ogg openal opencl opengl openmp openvg opus osmesa pam pango pch pcre pcre-jit pdf plotutils png postscript ppds qt3support readline sdl session slang smp sndfile speex spell sse sse2 ssl startup-notification svg systemd t1lib tcpd threads tiff truetype udev udisks unicode upower usb v4l2 vhosts vim-syntax vorbis wavpack wayland webp wmf wxwidgets x264 xattr xcb xft xml xpm xv xvid xvmc zlib" ABI_X86="32 64" ALSA_CARDS="hda-intel emu10k1 virmidi mpu401 pcsp" APACHE2_MODULES="actions alias deflate filter mime mime_magic negotiation rewrite socache_shmcb unixd" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="pl" LIRC_DEVICES="serial" NGINX_MODULES_HTTP="gzip limit_conn limit_req rewrite spdy uwsgi" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python2_6 python3_3 python3_2 python3_1 pypy1_9 pypy2_0 jython2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64 ppc ppc64 ppc64abi32 arm" QEMU_USER_TARGETS="ppc ppc64 arm" RUBY_TARGETS="ruby19 ruby18" SANE_BACKENDS="artec_eplus48u" USERLAND="GNU" VIDEO_CARDS="nouveau vesa radeon r600 s3" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 2.6 3.3 3.2 2.7-pypy-2.0"
Unset:  CPPFLAGS, CTARGET, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC

=================================================================
                        Package Settings
=================================================================

net-misc/curl-7.34.0 was built with the following:
USE="adns idn ipv6 ssl -kerberos -ldap -metalink -rtmp -ssh -static-libs -test -threads" CURL_SSL="openssl -axtls -cyassl -gnutls -nss -polarssl"
CFLAGS="-Og -ggdb -pipe"
CXXFLAGS="-Og -ggdb -pipe"
Comment 1 Anthony Basile gentoo-dev 2013-12-24 16:01:54 UTC
Okay reported upstream at https://sourceforge.net/p/curl/bugs/1315/
Comment 2 Anthony Basile gentoo-dev 2013-12-25 18:24:32 UTC
@mgorny  Upstream says they can't reproduce and would like a gdb backtrace.
Comment 3 Anthony Basile gentoo-dev 2013-12-27 16:50:50 UTC
The upstream patch is in with curl-7.34.0-r1.  Please test and close if this is fixed.  Thanks!