Bug 556299 - aria2 does not handle (the lack of) IPv6 properly
Summary: aria2 does not handle (the lack of) IPv6 properly
Status: RESOLVED FIXED
: 552013 558877 569564 (view as bug list)
Alias: None
Product: openSUSE 11.2
Classification: openSUSE
Component: Maintenance (show other bugs)
Version: Final
Hardware: All openSUSE 11.2
: P2 - High : Major with 5 votes (vote)
Target Milestone: ---
Assignee: Pascal Bleser
QA Contact: E-mail List
URL:
Whiteboard: maint:released:11.2:30983
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-17 22:02 UTC by Erwin Lam
Modified: 2016-04-15 10:32 UTC (History)
11 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Test setup, aria2c logs and output from tcpdump. (16.46 KB, text/plain)
2009-11-17 22:02 UTC, Erwin Lam
Details
Patch to make aria2c use AI_ADDRCONFIG (5.77 KB, patch)
2009-12-18 07:09 UTC, Tatsuhiro Tsujikawa
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erwin Lam 2009-11-17 22:02:41 UTC
Created attachment 328028 [details]
Test setup, aria2c logs and output from tcpdump.

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4) Gecko/20091016 SUSE/3.5.4-1.1.2 Firefox/3.5.4

When IPv6 is disabled, aria2c still issues requests for AAAA-records. When these records go to a nameserver which does not support IPv6, aria2c quits with an error message saying that name resolution failed. As a result, dowloading packages through yast failed as well.

See attachment for testresults.


Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Comment 1 Michael Andres 2009-12-02 13:52:55 UTC
Tatsuhiro, this might be interesting for you.
Comment 2 Tatsuhiro Tsujikawa 2009-12-03 13:13:29 UTC
DNS lookup is done by getaddrinfo() system call which is provided by glibc.
It turns out that getaddrinfo() does AAAA lookup even if ipv6 is disabled by kernel.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=470289
Comment 3 Michael Andres 2009-12-04 08:37:50 UTC
Passing this to glibc maintainer.
Comment 4 Petr Baudis 2009-12-06 13:34:01 UTC
getaddrinfo() behaves exactly as specified - if you told it to look up IPv6 addresses even if IPv6 is disabled, it does exactly that. If you are unhappy with getaddrinfo() behaviour, you need to provide a testcase and show exactly what it does that you don't like.
Comment 5 Tatsuhiro Tsujikawa 2009-12-06 14:19:16 UTC
OK, my understanding is that if I call getaddrinfo() with ai_family = AF_UNSPEC, getaddrinfo() returns ipv4/ipv6 addresses and this behavior is correct because I told it to do so, right?

If we want to avoid AAAA record lookup, should we give ai_family = AF_INET to getaddrinfo() instead of disabling IPv6 in kernel?
Comment 6 Petr Baudis 2009-12-06 16:02:30 UTC
Of course, if you never want AAAA records returned. To return addresses usable on given system, use AI_ADDRCONFIG.
Comment 7 Tatsuhiro Tsujikawa 2009-12-07 15:09:33 UTC
Thank you for reply.
Since aria2 1.7.0, it has --disable-ipv6 option. If it is enabled, aria2 requests only IPv4 addresses to getaddrinfo(). With this option, you can avoid IPv6 address lookup.

I'll also consider AI_ADDRCONFIG in the future release.
Comment 8 Erwin Lam 2009-12-07 16:36:58 UTC
Is it possible to get an upgrade of the aria2 package in openSUSE 11.2 to at least version 1.7.0?
Comment 9 Michael Andres 2009-12-16 12:50:01 UTC
*** Bug 558877 has been marked as a duplicate of this bug. ***
Comment 10 Michael Andres 2009-12-16 16:42:08 UTC
I see aria2-1.7.2 being available in obs://network:utilities. (http://download.opensuse.org/repositories/network:/utilities/openSUSE_11.2/)

I don't know if a maintenance update for 11.2 is already pending.


@Tatsuhiro: 

Do you think it is worth releasing aria2-1.7.2 as an update, or will there be a release using AI_ADDRCONFIG available soon? 

I'm asking because my understanding is that --disable-ipv6 won't help yast/zypper. Libzypp needs to be fixed first, to set this option IFF IPv6 is disabled and at least aria2 1.7.0 is used. While an aria2 version using AI_ADDRCONFIG would not require such a workaround.
Comment 11 Tatsuhiro Tsujikawa 2009-12-18 07:09:17 UTC
Created attachment 333337 [details]
Patch to make aria2c use AI_ADDRCONFIG

I attached the patch to make aria2c use AI_ADDRCONFIG.
Please test it. If it fixes the problem, I'll include this change in the next 1.7.3 release in this month.
Comment 12 Michael Andres 2009-12-23 12:16:04 UTC
It works for me. A patched aria2-1.7.2 is now running on my machine without trouble. Depending on whether ipv6 is enabled or disabled at boot time, I can see the AAAA-records being requested, or not.

So this issue should be solved by shipping aria2-1.7.3(?) as soon as it's available.
Comment 13 Tatsuhiro Tsujikawa 2009-12-28 09:36:52 UTC
I released aria2-1.8.0 which includes the AI_ADDRCONFIG patch.
Comment 14 Erwin Lam 2009-12-28 11:55:15 UTC
Just tested aria2 v1.8.0 and it works fine now. Thanks.
Comment 15 Michael Andres 2010-01-07 16:23:47 UTC
@maintenance: 

aria2-1.8.0 is available at obs://network:utilities. Please consider asking the maintainer to release this as an online update for 11.2.
Comment 16 Jan Kupec 2010-01-13 15:22:58 UTC
*** Bug 569564 has been marked as a duplicate of this bug. ***
Comment 18 Michael Andres 2010-02-02 11:53:41 UTC
Coolo/Pascal: Could someone please take this bug and drive an aria2 online update for 11.2?
Comment 19 Christian Dengler 2010-02-02 13:36:03 UTC
Set correct NEEDINFO for openSUSE update request (>= 11.2)

Version upgrade is against policy. I don't know if we should make a exception here. It contains a lot of bugfixes but also some feature.
But +1

Do we also need an update for libzypp (see comment #10)?
Comment 20 Marcus Meissner 2010-02-02 14:13:17 UTC
as aria2 is integrated into the update stack I am reluctant to fix this with a version update... :/
Comment 21 Stephan Kulow 2010-02-04 10:43:04 UTC
I can't fix aria2 bugs
Comment 22 Michael Andres 2010-02-04 12:38:50 UTC
(In reply to comment #19)
> 
> Do we also need an update for libzypp (see comment #10)?

No. Tatsuhiros aria2-1.8 fixes the problem completely. This would not require any additional libzypp update.

The new version is already available at http://download.opensuse.org/repositories/network:/utilities/openSUSE_11.2/.

If we don't want to ship this as an official update, we can close this bug and encourage people to get the fix from /network:/utilities/openSUSE_11.2.
Comment 23 Marcus Meissner 2010-02-04 12:51:10 UTC
how far is aria2c integration? does zypp just call aria? (I think it does?)
and if the public commandline interface did not change it might not be that risky.
Comment 24 Michael Andres 2010-02-08 15:42:19 UTC
Yes, we just call aria.
Comment 25 Marcus Meissner 2010-02-09 10:28:59 UTC
i would say we can try it. pascal also called for testers now.    +1
Comment 26 Swamp Workflow Management 2010-02-09 11:12:29 UTC
The SWAMPID for this issue is 30953.
Please submit the patch and patchinfo file using this ID.
(https://swamp.suse.de/webswamp/wf/30953)
Comment 27 Christian Dengler 2010-02-09 11:13:57 UTC
ok, we will test it ;-)

Be so kind and submit a patchinfo.

I hope we find tester for it ;-)
Comment 28 Klaas Freitag 2010-02-09 12:01:42 UTC
Pascal, could you jump in here as you know best about aria? The details are described at http://en.opensuse.org/Maintenance - thanks a lot!
Comment 29 Tejas Guruswamy 2010-02-09 12:57:30 UTC
In stock 11.2, I was bitten by this problem ... unable to use zypp because IPv6 does not work very well on our network.

Upgrading to aria2-1.8.2-8.1 from network:utilities and booting with ipv6.disable=1 works for me. Yast2 and zypper work fine, no other problems seen.

So positive feedback from me.
Comment 30 Pascal Bleser 2010-02-09 20:17:09 UTC
I already did the branch+update in home:pbleser:branches:openSUSE:11.2/aria2, as well as submitted SR 31955

Patchinfo:

SUMMARY: Upgrade to aria2 1.8.2 to properly avoid IPv6 when disabled
DESCRIPTION: The older version or aria2 that shipped with openSUSE 11.2 did not properly perform DNS lookups, which caused it to make IPv6 lookups even when IPv6 support was disabled. This is fixed in version 1.8.2.
PACKAGE: aria2

We should wait for some more positive feedback though.
Comment 31 Justin Brown 2010-02-10 04:22:35 UTC
> Patchinfo:
> 
> SUMMARY: Upgrade to aria2 1.8.2 to properly avoid IPv6 when disabled
> DESCRIPTION: The older version or aria2 that shipped with openSUSE 11.2 did not
> properly perform DNS lookups, which caused it to make IPv6 lookups even when
> IPv6 support was disabled. This is fixed in version 1.8.2.
> PACKAGE: aria2
> 
> We should wait for some more positive feedback though.

I have installed aria 1.8.2 across 22 machines and it has fixed the annoying bug, for me at least. I have no issues to report.
Comment 32 Marcus Meissner 2010-02-10 07:52:15 UTC
(i submitted the patchinfo)
Comment 33 Michael Andres 2010-02-12 13:40:47 UTC
*** Bug 552013 has been marked as a duplicate of this bug. ***
Comment 34 Daniele Tombolini 2010-02-12 19:40:44 UTC
Just installed 1.8.2 and it's working fine!
Ipv6 disabled in Yast and by adding:
net.ipv6.conf.all.disable_ipv6 = 1
in sysctl.conf
Bye.
Comment 35 Pascal Bleser 2010-02-13 23:41:16 UTC
Also received positive feedback by email and on IRC. Looks stable enough for pushing an online updated.
Comment 36 Marcus Meissner 2010-02-14 09:40:33 UTC
rule of thumb is to wait 7 days after checkin.

so probably release around 17th
Comment 37 Swamp Workflow Management 2010-02-17 11:25:34 UTC
Update released for: aria2, aria2-debuginfo, aria2-debugsource
Products:
openSUSE 11.2 (debug, i586, x86_64)
Comment 38 Christian Dengler 2010-02-17 11:28:08 UTC
Released after positive feedback.

Thanks for testing.
Comment 39 Pascal Bleser 2010-03-12 17:46:51 UTC
Closing as FIXED, as we've had only positive feedback and as the upgrade has been released in the update channel.
Comment 40 Pascal Bleser 2010-03-12 17:50:02 UTC
Sorry, meant _resolved_ as FIXED :)
Comment 41 Bernhard Wiedemann 2016-04-15 10:32:40 UTC
This is an autogenerated message for OBS integration:
This bug (556299) was mentioned in
https://build.opensuse.org/request/show/31955 11.2:Test / aria2