GNU bug report logs -
#13958
Failing net-db.test on armv5tel glibc 2.17
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13958 in the body.
You can then email your comments to 13958 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#13958
; Package
guile
.
(Thu, 14 Mar 2013 15:52:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Lluís Batlle i Rossell <viric <at> viric.name>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Thu, 14 Mar 2013 15:52:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello,
running the test below, I see on glibc-2.17 armv5tel-linux:
----
Running net-db.test
;;; (err -11)
unexpected error code: -11 "System error"
FAIL: net-db.test: getaddrinfo: no name
----
I mention glibc 2.17 because I think it didn't fail with glibc 2.13.
Regards,
Lluís.
On Thu, Mar 14, 2013 at 02:47:21PM +0100, Ludovic Courtès wrote:
> Lluís Batlle i Rossell <viric <at> viric.name> skribis:
>
> > Running net-db.test
> > unexpected error code: -11 "System error"
> > FAIL: net-db.test: getaddrinfo: no name
>
> La provo estas:
>
> (catch 'getaddrinfo-error
> (lambda ()
> (pk "getaddrinfo for \"does-not-exist\" succeeded!"
> (getaddrinfo "does-not-exist"))
> (throw 'unresolved))
> (lambda (key errcode)
> ;; In some cases (e.g., in a chroot without
> ;; /etc/{hosts,resolv.conf}), this can result in
> ;; `EAI_EAGAIN' (glibc 2.11), or `EAI_NODATA' (glibc 2.12).
> (and (or (= errcode EAI_NONAME)
> (and (defined? 'EAI_NODATA) ; GNU extension
> (= errcode EAI_NODATA))
> (= errcode EAI_AGAIN)
> (begin
> (format #t "unexpected error code: ~a ~s~%"
> errcode (gai-strerror errcode))
> #f))
> (string? (gai-strerror errcode)))))
>
> Ĉu vi povas ŝanĝi (= errcode EAI_NONAME) per (= (pk 'err errcode) EAI_NONAME)
> kaj sendi la detalojn al bug-guile <at> gnu.org?
>
> Dankon!
>
> Ludo'.
Information forwarded
to
bug-guile <at> gnu.org
:
bug#13958
; Package
guile
.
(Fri, 15 Mar 2013 11:16:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 13958 <at> debbugs.gnu.org (full text, mbox):
Hi Lluís!
Lluís Batlle i Rossell <viric <at> viric.name> skribis:
> running the test below, I see on glibc-2.17 armv5tel-linux:
> ----
> Running net-db.test
>
> ;;; (err -11)
> unexpected error code: -11 "System error"
> FAIL: net-db.test: getaddrinfo: no name
> ----
Does it happen in a chroot without /etc/resolv.conf & co.?
Is it a dynamically-linked binary?
Could you run “strace -o log -f ./check-guile net-db.test” and post
the log?
(Note that I build it with Guix on x86_64-linux-gnu without any
problems; glibc 2.17 as well, and in a chroot.)
Now, we have a problem with the ‘getaddrinfo-error’ API: EAI_SYSTEM
means “check what errno says”, and we don’t provide the errno value.
This could be fixed by passing the errno as an additional parameter to
‘throw’. However, that would lead to wrong-num-args for existing
handlers upon EAI_SYSTEM, and would essentially force programmers to use
‘case-lambda’ for their handlers.
OTOH, there are only two occurrences of EAI_SYSTEM in inet/getaddrinfo.c
in glibc: one is for NETDB_INTERNAL, and the other is for
IDNA_DLOPEN_ERROR. When that happens, the extra bit of information
provided by errno is probably not very helpful.
Thoughts?
Ludo’.
Information forwarded
to
bug-guile <at> gnu.org
:
bug#13958
; Package
guile
.
(Fri, 15 Mar 2013 11:36:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 13958 <at> debbugs.gnu.org (full text, mbox):
On Fri, Mar 15, 2013 at 12:14:21PM +0100, Ludovic Courtès wrote:
> Hi Lluís!
>
> Lluís Batlle i Rossell <viric <at> viric.name> skribis:
>
> > running the test below, I see on glibc-2.17 armv5tel-linux:
> > ----
> > Running net-db.test
> >
> > ;;; (err -11)
> > unexpected error code: -11 "System error"
> > FAIL: net-db.test: getaddrinfo: no name
> > ----
>
> Does it happen in a chroot without /etc/resolv.conf & co.?
>
> Is it a dynamically-linked binary?
>
> Could you run “strace -o log -f ./check-guile net-db.test” and post
> the log?
>
> (Note that I build it with Guix on x86_64-linux-gnu without any
> problems; glibc 2.17 as well, and in a chroot.)
>
>
> Now, we have a problem with the ‘getaddrinfo-error’ API: EAI_SYSTEM
> means “check what errno says”, and we don’t provide the errno value.
>
> This could be fixed by passing the errno as an additional parameter to
> ‘throw’. However, that would lead to wrong-num-args for existing
> handlers upon EAI_SYSTEM, and would essentially force programmers to use
> ‘case-lambda’ for their handlers.
>
> OTOH, there are only two occurrences of EAI_SYSTEM in inet/getaddrinfo.c
> in glibc: one is for NETDB_INTERNAL, and the other is for
> IDNA_DLOPEN_ERROR. When that happens, the extra bit of information
> provided by errno is probably not very helpful.
I think this log should be enough. I have a dns server at 127.0.0.1,
and I have in nix.conf:
build-use-chroot = false
Excerpt of the strace log:
16993 connect(7, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
16993 gettimeofday({1363270208, 638948}, NULL) = 0
16993 poll([{fd=7, events=POLLOUT}], 1, 0) = 1 ([{fd=7, revents=POLLOUT}])
16993 sendmmsg(7, {{{msg_name(0)=NULL, msg_iov(1)=[{"\25>\1\0\0\1\0\0\0\0\0\0\16does-not-exist\10ho
me"..., 45}], msg_controllen=0, msg_flags=MSG_WAITALL|MSG_TRUNC|MSG_DONTWAIT|MSG_RST|MSG_NOSIGNAL|M
SG_MORE|0xbed40000}, 45}, {{msg_name(0)=NULL, msg_iov(1)=[{"\303:\1\0\0\1\0\0\0\0\0\0\16does-not-ex
ist\10home"..., 45}], msg_controllen=0, msg_flags=0}, 45}}, 2, MSG_NOSIGNAL) = 2
16993 poll([{fd=7, events=POLLIN}], 1, 5000) = 1 ([{fd=7, revents=POLLIN}])
16993 ioctl(7, FIONREAD, [106]) = 0
16993 recvfrom(7, "\25>\201\203\0\1\0\0\0\1\0\0\16does-not-exist\10home"..., 2048, 0, {sa_family=AF
_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.1")}, [16]) = 106
16993 gettimeofday({1363270208, 645244}, NULL) = 0
16993 poll([{fd=7, events=POLLIN}], 1, 4993) = 1 ([{fd=7, revents=POLLIN}])
16993 ioctl(7, FIONREAD, [106]) = 0
16993 recvfrom(7, "\303:\201\203\0\1\0\0\0\1\0\0\16does-not-exist\10home"..., 1940, 0, {sa_family=A
F_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.1")}, [16]) = 106
16993 close(7) = 0
16993 gettimeofday({1363270208, 646679}, NULL) = 0
16993 gettimeofday({1363270208, 646897}, NULL) = 0
16993 socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 7
16993 connect(7, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
16993 gettimeofday({1363270208, 647559}, NULL) = 0
16993 poll([{fd=7, events=POLLOUT}], 1, 0) = 1 ([{fd=7, revents=POLLOUT}])
16993 sendmmsg(7, {{{msg_name(0)=NULL, msg_iov(1)=[{"\332\330\1\0\0\1\0\0\0\0\0\0\16does-not-exist\
0\0\1\0\1", 32}], msg_controllen=0, msg_flags=MSG_WAITALL|MSG_TRUNC|MSG_DONTWAIT|MSG_RST|MSG_NOSIGN
AL|MSG_MORE|0xbed40000}, 32}, {{msg_name(0)=NULL, msg_iov(1)=[{"\313w\1\0\0\1\0\0\0\0\0\0\16does-no
t-exist\0\0\34\0\1", 32}], msg_controllen=0, msg_flags=0}, 32}}, 2, MSG_NOSIGNAL) = 2
16993 poll([{fd=7, events=POLLIN}], 1, 5000) = 1 ([{fd=7, revents=POLLIN}])
16993 ioctl(7, FIONREAD, [107]) = 0
16993 recvfrom(7, "\332\330\201\203\0\1\0\0\0\1\0\0\16does-not-exist\0\0\1\0\1"..., 2048, 0, {sa_fa
mily=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.1")}, [16]) = 107
16993 gettimeofday({1363270208, 651397}, NULL) = 0
16993 poll([{fd=7, events=POLLIN}], 1, 4996) = 1 ([{fd=7, revents=POLLIN}])
16993 ioctl(7, FIONREAD, [107]) = 0
16993 recvfrom(7, "\313w\201\203\0\1\0\0\0\1\0\0\16does-not-exist\0\0\34\0\1"..., 1940, 0, {sa_fami
ly=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.1")}, [16]) = 107
16993 close(7) = 0
16993 open("/nix/store/83fff5psdwad2vcy44lv5gwyzfmj4433-glibc-2.17/lib/libnss_myhostname.so.2", O_R
DONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
16993 write(1, "\n", 1) = 1
16993 write(1, ";;; ", 4) = 4
16993 write(1, "(", 1) = 1
16993 write(1, "err", 3) = 3
16993 write(1, " ", 1) = 1
16993 write(1, "-11", 3) = 3
16993 write(1, ")", 1) = 1
16993 write(1, "\n", 1) = 1
16993 write(1, "unexpected error code: ", 23) = 23
Regards,
Lluís.
Information forwarded
to
bug-guile <at> gnu.org
:
bug#13958
; Package
guile
.
(Fri, 15 Mar 2013 13:39:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 13958 <at> debbugs.gnu.org (full text, mbox):
Lluís Batlle i Rossell <viric <at> viric.name> skribis:
> I think this log should be enough. I have a dns server at 127.0.0.1,
> and I have in nix.conf:
> build-use-chroot = false
>
>
> Excerpt of the strace log:
> 16993 connect(7, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
So you disabled nscd? (The request goes directly to the DNS server.)
> 16993 open("/nix/store/83fff5psdwad2vcy44lv5gwyzfmj4433-glibc-2.17/lib/libnss_myhostname.so.2", O_R
> DONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
This is most likely the culprit. Presumably you forgot to add
libnss_myhostname to $LD_LIBRARY_PATH, no?
Also, what does /etc/nsswitch.conf look like?
Ludo’.
Information forwarded
to
bug-guile <at> gnu.org
:
bug#13958
; Package
guile
.
(Fri, 15 Mar 2013 13:43:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 13958 <at> debbugs.gnu.org (full text, mbox):
On Fri, Mar 15, 2013 at 02:36:40PM +0100, Ludovic Courtès wrote:
> Lluís Batlle i Rossell <viric <at> viric.name> skribis:
>
> > I think this log should be enough. I have a dns server at 127.0.0.1,
> > and I have in nix.conf:
> > build-use-chroot = false
> >
> >
> > Excerpt of the strace log:
> > 16993 connect(7, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
>
> So you disabled nscd? (The request goes directly to the DNS server.)
Right.
> > 16993 open("/nix/store/83fff5psdwad2vcy44lv5gwyzfmj4433-glibc-2.17/lib/libnss_myhostname.so.2", O_R
> > DONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
>
> This is most likely the culprit. Presumably you forgot to add
> libnss_myhostname to $LD_LIBRARY_PATH, no?
>
> Also, what does /etc/nsswitch.conf look like?
The hosts line:
hosts: files dns myhostname
Ok, so the source of that bad-handled message is a NSS problem in nix builds
without chroot.
What should be the proper user program reaction to that EAI_AGAIN + errno?
Regards,
Lluís.
Information forwarded
to
bug-guile <at> gnu.org
:
bug#13958
; Package
guile
.
(Fri, 15 Mar 2013 13:50:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 13958 <at> debbugs.gnu.org (full text, mbox):
Lluís Batlle i Rossell <viric <at> viric.name> skribis:
> On Fri, Mar 15, 2013 at 02:36:40PM +0100, Ludovic Courtès wrote:
>> Lluís Batlle i Rossell <viric <at> viric.name> skribis:
[...]
>> > 16993 open("/nix/store/83fff5psdwad2vcy44lv5gwyzfmj4433-glibc-2.17/lib/libnss_myhostname.so.2", O_R
>> > DONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
>>
>> This is most likely the culprit. Presumably you forgot to add
>> libnss_myhostname to $LD_LIBRARY_PATH, no?
>>
>> Also, what does /etc/nsswitch.conf look like?
>
> The hosts line:
> hosts: files dns myhostname
OK. I wonder if adding a [NOTFOUND=...] clause could help.
> Ok, so the source of that bad-handled message is a NSS problem in nix builds
> without chroot.
Yes, it’s reading an NSS configuration that cannot be used.
> What should be the proper user program reaction to that EAI_AGAIN + errno?
Ideally Guile would propagate the errno value. But in your case it’s
ENOENT, so the error message would be like:
failed to resolve host name: No such file or directory
This is not really more helpful than:
failed to resolve host name: System error
(That’s part of the reason why exceptions were invented. :-))
To me, that example is an argument in favor of the status quo in
Guile—i.e., keeping EAI_SYSTEM handling as it is.
Thoughts?
Ludo’.
Reply sent
to
ludo <at> gnu.org (Ludovic Courtès)
:
You have taken responsibility.
(Mon, 25 Mar 2013 21:50:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Lluís Batlle i Rossell <viric <at> viric.name>
:
bug acknowledged by developer.
(Mon, 25 Mar 2013 21:50:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 13958-done <at> debbugs.gnu.org (full text, mbox):
ludo <at> gnu.org (Ludovic Courtès) skribis:
> Ideally Guile would propagate the errno value. But in your case it’s
> ENOENT, so the error message would be like:
>
> failed to resolve host name: No such file or directory
>
> This is not really more helpful than:
>
> failed to resolve host name: System error
>
> (That’s part of the reason why exceptions were invented. :-))
>
> To me, that example is an argument in favor of the status quo in
> Guile—i.e., keeping EAI_SYSTEM handling as it is.
I went ahead and documented the missing errno value for EAI_SYSTEM.
Thanks,
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 23 Apr 2013 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 342 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.