Your message dated Mon, 07 Sep 2020 23:03:28 +0000
with message-id <e1kfqaa-0000o4...@fasolo.debian.org>
and subject line Bug#964902: fixed in libio-socket-ip-perl 0.39-3
has caused the Debian Bug report #964902,
regarding libio-socket-ip-perl: AI_ADDRCONFIG breaks many test suites on
IPv6-only hosts
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
964902: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964902
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: libio-socket-ip-perl
Version: 0.39-2
Severity: serious
Tags: patch ipv6
This is a follow-up for #962047 "fails to build on IPv6-only buildds".
The background here is that a while ago new official build daemons were
added that only have IPv6 connectivity, and this exposed a new class
of build failures, mainly due to getaddrinfo(3) behaviour with the
AI_ADDRCONFIG flag.
Quoting Julien Cristau there:
> FWIW, it seems IO::Socket::IP passes AI_ADDRCONFIG to getaddrinfo, which
> then doesn't return ipv4 addresses because the host doesn't have
> non-local ones, even though the address we're trying to resolve is
> "127.0.0.1".
>
> Passing either GetAddrInfoFlags => AI_NUMERICHOST or GetAddrInfoFlags =>
> 0 to both IO::Socket::IP->new calls in the test file lets it pass, by
> turning off the smarts in getaddrinfo.
We fixed the test suite of libio-socket-ip-perl itself in 0.39-2 by
making it pass AI_NUMERICHOST in all the tests. However, it turns out
that the problem is much more widespread than this.
I've been testing systematically for these issues by test rebuilding
the whole archive, and found
1) 138 packages that failed to build on a host with an IPv6 address
on a "real" interface, and IPv4 + IPv6 on lo, but no internet
connection
2) 8 of those 138 also failed to build on a host with both an IPv6 address
and an IPv4 address on a "real interface", still without a real internet
connection (these are regular "needs internet" bugs, not IPv6 specific)
3) only 42 of the remaining 130 packages fail to build with the same setup
as 1), after applying the patch discussed below to IO::Socket::IP.
So it looks like the AI_ADDRCONFIG default of IO-Socket-IP is causing
88 potential build failures on the new IPv6-only buildds. Examples of
those can be seen on for instance
https://buildd.debian.org/status/logs.php?pkg=libmojolicious-perl
https://buildd.debian.org/status/logs.php?pkg=libtest-redisserver-perl
https://buildd.debian.org/status/logs.php?pkg=libwww-mechanize-perl
The attached patch changes IO-Socket-IP to pass AI_NUMERICHOST to
getaddrinfo(3) when the address looks like an IPv4 numeric address (rather
than a hostname), and special cases a PeerHost value of "localhost"
not to use AI_ADDRCONFIG.
I have tried quite a few variants, and this was the best I could do
without removing AI_ADDRCONFIG (which is a documented feature) altogether.
(TODO: The patch does not currently update the documentation about the
new behaviour.)
It would be good to get something like this upstream of course, and it
will also need to go in src:perl which has a copy of IO::Socket::IP.
I've tested that this makes libio-socket-perl pass its own test suite
without the modifications in 0.39-2, so this supersedes the current test
suite patch.
Build logs can currently (but not guaranteed indefinitely) be found at
http://perl.debian.net/rebuild-logs/sid-v6only/
http://perl.debian.net/rebuild-logs/experimental-v6only/
where the latter had a patched libio-socket-ip-perl package pre-installed
in the chroot.
Below is the list of packages detected as fixed by this. I'll bring up the
other IPv6-related build failures on the debian-devel list soonish. Bugs
have already been filed for the handful of "needs internet" issues.
alice_0.19-2
boxbackup_0.13~~git20200326.g8e8b63c-1
gdnsd_2.4.2-1
kgb-bot_1.56-1
libanyevent-connection-perl_0.06-5
libanyevent-connector-perl_0.03-2
libanyevent-memcached-perl_0.08-1
libanyevent-redis-perl_0.24-2
libapache2-authcookie-perl_3.30-1
libapache2-reload-perl_0.13-3
libapache-authenhook-perl_2.00-04+pristine-7
libapache-singleton-perl_0.17-1
libapache-ssllookup-perl_2.00-04-3
libapp-termcast-perl_0.13-3
libaudio-mpd-perl_2.004-2
libcgi-application-plugin-captcha-perl_0.04-2
libcgi-application-server-perl_0.063-2
libcorona-perl_0.1004-4
libcpan-mini-inject-perl_0.35-1
libcrypt-ssleay-perl_0.73.06-1
libdancer-perl_1.3513+dfsg-1
libdanga-socket-perl_1.62-1
libfcgi-engine-perl_0.22-1
libfurl-perl_3.13-2
libgearman-client-perl_2.004.015-1
libhtml-html5-parser-perl_0.301-2
libhttp-async-perl_0.33-1
libhttp-daemon-ssl-perl_1.05-01-2
libhttp-server-simple-mason-perl_0.14-2
libio-socket-ssl-perl_2.067-1
libio-socket-timeout-perl_0.32-1
libjson-validator-perl_3.25+dfsg-1
liblwp-protocol-https-perl_6.07-2
libmime-tools-perl_5.509-1
libmojolicious-perl_8.56+dfsg-1
libmojolicious-plugin-assetpack-perl_2.08-2
libmojolicious-plugin-authentication-perl_1.33-1
libmojolicious-plugin-authorization-perl_1.0302-2
libmojolicious-plugin-basicauth-perl_0.08-1
libmojolicious-plugin-bcrypt-perl_0.14-2
libmojolicious-plugin-cgi-perl_0.40-1
libmojolicious-plugin-i18n-perl_1.60-1
libmojolicious-plugin-mailexception-perl_0.20-1
libmojolicious-plugin-renderfile-perl_0.12-4
libmojo-sqlite-perl_3.003-1
libmonitoring-livestatus-perl_0.80-1
libnanomsg-raw-perl_0.10-1
libnet-facebook-oauth2-perl_0.12-1
libnet-http-perl_6.19-1
libnet-https-nb-perl_0.15-1
libnet-ldap-server-test-perl_0.22-1
libnet-server-mail-perl_0.28-1
libnet-server-perl_2.009-2
libnet-sip-perl_0.822-1
libperlio-via-timeout-perl_0.32-1
libplack-app-proxy-perl_0.29-1
libplack-handler-anyevent-fcgi-perl_0.01-1
libplack-handler-fcgi-ev-perl_0.01-1
libplack-middleware-deflater-perl_0.12-2
libplack-middleware-session-perl_0.33-1
libplack-perl_1.0047-2
libplack-test-agent-perl_1.4-2
libplack-test-externalserver-perl_0.02-1
libpod-webserver-perl_3.11-1
libproc-guard-perl_0.07-1
libprotocol-http2-perl_1.10-1
libredis-fast-perl_0.26+dfsg-2
libredis-perl_1.9950-1
librest-client-perl_273-1
librpc-xml-perl_0.80-2
librt-client-rest-perl_0.60-1
libtest-fake-httpd-perl_0.08-1
libtest-http-server-simple-stashwarnings-perl_0.04-2
libtest-redisserver-perl_0.21-2
libtest-tcp-perl_2.22-1
libtest-www-declare-perl_0.02-4
libtest-www-mechanize-mojo-perl_0.0.20-1
libtest-www-mechanize-perl_1.52-1
libweb-id-perl_1.927-2
libweb-machine-perl_0.17-1
libwiki-toolkit-plugin-ping-perl_0.03-2
mod-gnutls_0.9.0-1.1
perlbal_1.80-3
pinto_0.14000-1
request-tracker4_4.4.4-1
starlet_0.31-1
starman_0.4015-1
twiggy_0.1025+dfsg-1
--
Niko Tyni nt...@debian.org
>From fbed100b2501f9ba1537acd65f160353fc3acd73 Mon Sep 17 00:00:00 2001
From: Niko Tyni <nt...@debian.org>
Date: Sat, 4 Jul 2020 22:17:41 +0100
Subject: [PATCH] Disable getaddrinfo(3) AI_ADDRCONFIG for localhost and IPv4
numeric addresses
AI_ADDRCONFIG can be a bad default for systems with a dual protocol
loopback device but just IPv6 connectivity. In such a case,
getaddrinfo(3) on 127.0.0.1 or 0.0.0.0 will fail with EAI_ADDRFAMILY
even though the loopback device is able to handle them.
---
lib/IO/Socket/IP.pm | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/lib/IO/Socket/IP.pm b/lib/IO/Socket/IP.pm
index 5a5ee7d..2481c63 100755
--- a/lib/IO/Socket/IP.pm
+++ b/lib/IO/Socket/IP.pm
@@ -30,6 +30,7 @@ use Socket 1.97 qw(
);
my $AF_INET6 = eval { Socket::AF_INET6() }; # may not be defined
my $AI_ADDRCONFIG = eval { Socket::AI_ADDRCONFIG() } || 0;
+my $AI_NUMERICHOST = eval { Socket::AI_NUMERICHOST() } || 0;
use POSIX qw( dup2 );
use Errno qw( EINVAL EINPROGRESS EISCONN ENOTCONN ETIMEDOUT EWOULDBLOCK EOPNOTSUPP );
@@ -409,6 +410,8 @@ sub _io_socket_ip__configure
my ( $arg ) = @_;
my %hints;
+ my $localflags;
+ my $peerflags;
my @localinfos;
my @peerinfos;
@@ -420,9 +423,20 @@ sub _io_socket_ip__configure
if( defined $arg->{GetAddrInfoFlags} ) {
$hints{flags} = $arg->{GetAddrInfoFlags};
+ $localflags = $arg->{GetAddrInfoFlags};
+ $peerflags = $arg->{GetAddrInfoFlags};
}
else {
- $hints{flags} = $AI_ADDRCONFIG;
+ if (defined $arg->{LocalHost} and $arg->{LocalHost} =~ /^\d+\.\d+\.\d+\.\d+$/) {
+ $localflags = $AI_NUMERICHOST;
+ } else {
+ $localflags = $AI_ADDRCONFIG;
+ }
+ if (defined $arg->{PeerHost} and $arg->{PeerHost} =~ /^\d+\.\d+\.\d+\.\d+$/) {
+ $peerflags = $AI_NUMERICHOST;
+ } elsif (defined $arg->{PeerHost} and $arg->{PeerHost} ne 'localhost') {
+ $peerflags = $AI_ADDRCONFIG;
+ }
}
if( defined( my $family = $arg->{Family} ) ) {
@@ -479,6 +493,7 @@ sub _io_socket_ip__configure
my $fallback_port = $1;
my %localhints = %hints;
+ $localhints{flags} = $localflags;
$localhints{flags} |= AI_PASSIVE;
( my $err, @localinfos ) = getaddrinfo( $host, $service, \%localhints );
@@ -507,10 +522,12 @@ sub _io_socket_ip__configure
defined $service and $service =~ s/\((\d+)\)$// and
my $fallback_port = $1;
- ( my $err, @peerinfos ) = getaddrinfo( $host, $service, \%hints );
+ my %peerhints = %hints;
+ $peerhints{flags} = $peerflags;
+ ( my $err, @peerinfos ) = getaddrinfo( $host, $service, \%peerhints );
if( $err and defined $fallback_port ) {
- ( $err, @peerinfos ) = getaddrinfo( $host, $fallback_port, \%hints );
+ ( $err, @peerinfos ) = getaddrinfo( $host, $fallback_port, \%peerhints );
}
if( $err ) {
@@ -590,6 +607,7 @@ sub _io_socket_ip__configure
# If there wasn't, use getaddrinfo()'s AI_ADDRCONFIG side-effect to guess a
# suitable family first.
else {
+ $hints{flags} |= $AI_ADDRCONFIG;
( my $err, @infos ) = getaddrinfo( "", "0", \%hints );
if( $err ) {
$@ = "$err";
--
2.26.2
--- End Message ---
--- Begin Message ---
Source: libio-socket-ip-perl
Source-Version: 0.39-3
Done: Dominic Hargreaves <d...@earth.li>
We believe that the bug you reported is fixed in the latest version of
libio-socket-ip-perl, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 964...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Dominic Hargreaves <d...@earth.li> (supplier of updated libio-socket-ip-perl
package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Mon, 07 Sep 2020 23:45:37 +0100
Source: libio-socket-ip-perl
Architecture: source
Version: 0.39-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Perl Group <pkg-perl-maintain...@lists.alioth.debian.org>
Changed-By: Dominic Hargreaves <d...@earth.li>
Closes: 964902
Changes:
libio-socket-ip-perl (0.39-3) unstable; urgency=medium
.
* Replace nov4 test patch with one from Niko Tyni which works around
the underlying issue (Closes: #964902)
Checksums-Sha1:
6fcd346e176c59b54b0b27fe6b2ced2730208d14 2325 libio-socket-ip-perl_0.39-3.dsc
d3b9899bc2aae8a572f5f5d434bef8513b3a8be9 5272
libio-socket-ip-perl_0.39-3.debian.tar.xz
66e3e0bc72a9d72ce1b9b0bde4d3db9171474763 5662
libio-socket-ip-perl_0.39-3_source.buildinfo
Checksums-Sha256:
bff24362ab5fc414ca6e056a7ae771c6e02c64d70080afe0a3f84ae74d7520d0 2325
libio-socket-ip-perl_0.39-3.dsc
12c19681da815c83a9dabf6dc994f8271e4739846bdab533141ab859528223a9 5272
libio-socket-ip-perl_0.39-3.debian.tar.xz
dc30f65c19e14191957db45de44f66c1af475fb6ab9aff7f295d49ac8d654aa2 5662
libio-socket-ip-perl_0.39-3_source.buildinfo
Files:
3a54fb3009fb8bbca505719a773edbce 2325 perl optional
libio-socket-ip-perl_0.39-3.dsc
f65bc4f9de84ede20dde0c2684e389ea 5272 perl optional
libio-socket-ip-perl_0.39-3.debian.tar.xz
034aa027d2a62c126bd040731488ad26 5662 perl optional
libio-socket-ip-perl_0.39-3_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJBBAEBCAArFiEEy0llJ/kAnyscGnbawAV+cU1pT7IFAl9WuKQNHGRvbUBlYXJ0
aC5saQAKCRDABX5xTWlPsuaAD/9hst4mTvFjsgykTz3siYed3ZMiEf6Iha1xqtAC
Ni7rAsdshr2l1LiWnyOtqRCkNZ/MGiUiiCHCkhNU3xxANxTdQEpMnx6gx5KTVHO+
pU/8gbX4zK/sc1/pWWSMxA10arR5xMJKsDEk4tc260zFBIt8LxQV7j0rVnO6RGGv
VTh1fXZtYAhDFMvn5KyOOlx7w3i/h0dTmnl/56Q+OLfFs1BdLVlXnd4M3TztuT9v
DPmq4b3PoAtR+oUva+jdldu2atAony//hnCw9cuo9fZTvj0OzKxv+bfHcxZ9tlAp
OLERvJ76cElXLqZBAQ0hnRwBvnQXUw2UP06TQvnAxv0e2z5sQ3sfomUuAVyB0bO0
m+CUudhO+WPak0Fcz39F/It+CVpCtZkw9Bfh/33LJpM1YzzeFzorS3xHClgNbc5n
GaK1x9/ged5LGUl42TVLcBOScYV4YkIwKEJEgEH1qpnMJkX1M3J2/6baH3njl1O3
WIPIX6sOr70z+ODZN103R+nDi1Wfach0ilOne9AmWmGLx6zRaP6MpeRK2BExsl00
RypwNbhs61jqejZY1KpR42Q6PejE4ukFrQQMqPYLJxf+cAwaCklA0SMG9yrfi5EN
25xddEcE6r3PTw4kxloEb/potv6onttq/pprKBd1ODrbYPGImh+eObowaw2jEMZR
EsH5pQ==
=7Kvf
-----END PGP SIGNATURE-----
--- End Message ---