Bug 558877

Summary: yast2 sw_single / aria2c takes a very long time to download anything. An ipv6 problem?
Product: [openSUSE] openSUSE 11.2 Reporter: Guillaume van Baalen <postdoc38>
Component: libzyppAssignee: E-mail List <zypp-maintainers>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P2 - High CC: ma, tatsuhiro.t
Version: Final   
Target Milestone: ---   
Hardware: i586   
OS: openSUSE 11.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: yast2 logs

Description Guillaume van Baalen 2009-11-27 14:07:20 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4) Gecko/20091017 SUSE/2.0.0-1.1.3 SeaMonkey/2.0

yast2 sw_single takes a long time (1-2 minutes) to download the repositories xml files. Then even ridiculously small packages take 30 seconds or so to download. There is actually no downloading (like a timeout) for a long time, then a burst of packets being received.

The culprit seems to be aria2c, as the same happens if aria2c is invoked directly. 

Removing aria2c altogether makes everything work fast and smooth.

I had the same slow downloads with FF/seamonkey, and could only solve it by disabling ipv6 in the browser AND adding ipv6.disable=1 in the boot options. I don't see an option to disable ipv6 in aria2c, but there is clearly need for one...

Reproducible: Always
Comment 1 Michael Andres 2009-12-02 13:55:48 UTC
Please attach the yast logfiles (see http://en.opensuse.org/Bugs/YaST).
Comment 2 Guillaume van Baalen 2009-12-02 19:36:05 UTC
Created attachment 330579 [details]
yast2 logs
Comment 3 Tatsuhiro Tsujikawa 2009-12-03 13:32:38 UTC
aria2c doesn't have an option to disable ipv6.
Even if ipv6 is disabled by kernel, getaddrinfo() in glibc issues AAAA request, and this takes lots of time here.

aria2c supports asynchronous DNS using c-ares library and only supports ipv4.
But it seems aria2 build in opensuse are not compiled with c-ares.
Comment 4 Guillaume van Baalen 2009-12-03 14:03:50 UTC
Indeed, installing libcares2 (and libcares-devel) seems to solve the problem.
Comment 5 Michael Andres 2009-12-03 15:42:28 UTC
No need to rebuild aria2c? Is it just a runtime recommendation?
Comment 6 Guillaume van Baalen 2009-12-03 20:05:58 UTC
My mistake, I had (compiled and) installed aria2c version 1.6.3 in the mean time.
Removing version 1.6.3 and using stock aria2c still gives long timeout.

So yes, installation of libcares2 and libcares-devel and then rebuild of aria2c is necessary, at least on my side.
Comment 7 Tatsuhiro Tsujikawa 2009-12-04 07:16:17 UTC
aria2c has to be rebuilt with libcares and libcares-devel to enable IPV4 only async DNS. It has --async-dns=false option, when specified, it falls back to glibc getaddrinfo().
Comment 8 Michael Andres 2009-12-04 08:59:47 UTC
@Coolo: Wait for getaddrinfo fix in glibc (#556299), or update aria to introduce libcares, or both?
Comment 9 Michael Andres 2009-12-16 12:50:00 UTC
Updating to aria2 1.7.0 and using the newly intrduced --disable-ipv6 should solve this.

*** This bug has been marked as a duplicate of bug 556299 ***