Bug#556600: getaddrinfo() fails with system error

2009-11-17 Thread Hagen Möbius
Hi there.

Sorry for the big EMail. Should I use attachments next time?

 This program works here, I guess your problem is related to your local
 configuration.

That makes sense. The error became apparent after some update, but I
honestly can't say what it was that I updated.

 First of all are you really running libc6 2.10.1-7 or a previous
 version? Do you know which was the latest working version?

===
moeb...@perrin:~$ dpkg-query -l libc6
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name   Version
   Description
+++-==-==
ii  libc6  2.10.1-7
   GNU C Library: Shared libraries
===

I don't remember which was the lastest working version. I had 2.10.1-5
before, which also didn't work and updated manually to version
2.10.1-7 by downloading the debs from debian.org and installing them
(and libc-bin) with dpkg.

Since apt-get and aptitude don't work anymore, the latest log entry
from my aptitude log may be an indicator. So, 2.9-25 may be the last
working version. Is there a place I can get the deb files from to
check it? They are not in my archive cache anymore.

===
Aptitude 0.4.11.11: log report
Tue, Nov 10 2009 19:29:53 +0100

IMPORTANT: this log only lists intended actions; actions which fail due to
dpkg problems may not be completed.

Will install 42 packages, and remove 1 packages.
1,212kB of disk space will be used
===
[REMOVE, NOT USED] libmalaga7
[UPGRADE] consolekit 0.3.1-1 - 0.3.1-2
[UPGRADE] eject 2.1.5+deb1+cvs20081104-6 - 2.1.5+deb1+cvs20081104-7
[UPGRADE] fakeroot 1.14 - 1.14.3
[UPGRADE] glibc-doc 2.9-25 - 2.10.1-5
[UPGRADE] guile-1.8 1.8.7+1-1 - 1.8.7+1-2
[UPGRADE] guile-1.8-libs 1.8.7+1-1 - 1.8.7+1-2
[UPGRADE] hostname 3.00 - 3.01
[UPGRADE] kate 4:4.3.1-1 - 4:4.3.2-1
[UPGRADE] kmix 4:4.3.1-1 - 4:4.3.2-1
[UPGRADE] kompare 4:4.3.1-1 - 4:4.3.2-1
[UPGRADE] kscd 4:4.3.1-1 - 4:4.3.2-1
[UPGRADE] libc-bin 2.9-25 - 2.10.1-5
[UPGRADE] libc-dev-bin 2.9-25 - 2.10.1-5
[UPGRADE] libc6 2.9-25 - 2.10.1-5
[UPGRADE] libc6-dev 2.9-25 - 2.10.1-5
[UPGRADE] libck-connector0 0.3.1-1 - 0.3.1-2
[UPGRADE] libdaemon0 0.13-3 - 0.14-1
[UPGRADE] libdirectfb-1.2-0 1.2.8-4 - 1.2.8-5
[UPGRADE] libdirectfb-dev 1.2.8-4 - 1.2.8-5
[UPGRADE] libdirectfb-extra 1.2.8-4 - 1.2.8-5
[UPGRADE] libexif12 0.6.17-1 - 0.6.18-1
[UPGRADE] libfaad2 2.7-2 - 2.7-4
[UPGRADE] libgle3 3.1.0-6 - 3.1.0-7
[UPGRADE] libgnutls26 2.8.4-1 - 2.8.4-2
[UPGRADE] libgpod-common 0.7.2-1.1 - 0.7.2-2
[UPGRADE] libgpod4 0.7.2-1.1 - 0.7.2-2
[UPGRADE] libhsqldb-java 1.8.0.10-5 - 1.8.0.10-6
[UPGRADE] libhtml-parser-perl 3.62-1 - 3.64-1
[UPGRADE] liblensfun-data 0.2.3-2 - 0.2.4-1
[UPGRADE] liblensfun0 0.2.3-2 - 0.2.4-1
[UPGRADE] libpam-ck-connector 0.3.1-1 - 0.3.1-2
[UPGRADE] libpulse-mainloop-glib0 0.9.19-1 - 0.9.19-2
[UPGRADE] libpulse0 0.9.19-1 - 0.9.19-2
[UPGRADE] libselinux1 2.0.87-3 - 2.0.88-1
[UPGRADE] libvoikko1 2.1-4 - 2.2.1-1
[UPGRADE] locales 2.9-25 - 2.10.1-5
[UPGRADE] sed 4.2.1-3 - 4.2.1-4
[UPGRADE] simutrans 102.0-1 - 102.2+svn2786-1
[UPGRADE] simutrans-data 102.0-1 - 102.2+svn2786-1
[UPGRADE] tzdata 2009n-1 - 2009q-2
[UPGRADE] wget 1.11.4-4 - 1.12-1.1
[UPGRADE] xml-core 0.12 - 0.13
===

Log complete.
===


 Could you please send me the contents of /etc/hosts, /etc/resolv.conf,
 /etc/nsswitch.conf and /etc/services on your system?

/etc/hosts/
===
127.0.0.1   localhost
127.0.1.1   perrin.wheelperrin
192.168.1.100   rand.wheel rand
192.168.1.103   elayne.wheel elayne

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
===

/etc/resolv.conf
===
nameserver 94.75.228.29
===

When I set the usepeerdns flag in /etc/ppp/providers/provider I get
other dns servers of course but that does not change the behavior.

/etc/nsswitch
===
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc Name Service Switch' for information about this file.

passwd: nis compat
group:  nis compat
shadow: nis compat

hosts:  nis files mdns4_minimal [NOTFOUND=return] dns mdns4
networks:   files

protocols:  db files
services:   db files
ethers: db files
rpc:db files

netgroup:   nis
===

Hm, I don't have a NIS configuration here ... only thinking alound.

/etc/services
===
# Network services, Internet style
#
# Note that it is presently the policy of IANA to assign a single well-known
# port number for both TCP and UDP; 

Bug#556600: getaddrinfo() fails with system error

2009-11-17 Thread Aurelien Jarno
On Tue, Nov 17, 2009 at 10:03:31AM +0100, Hagen Möbius wrote:
 Hi there.
Hi,

 Sorry for the big EMail. Should I use attachments next time?

That's not a problem.

 /etc/nsswitch
 ===
 # /etc/nsswitch.conf
 #
 # Example configuration of GNU Name Service Switch functionality.
 # If you have the `glibc-doc-reference' and `info' packages installed, try:
 # `info libc Name Service Switch' for information about this file.
 
 passwd: nis compat
 group:  nis compat
 shadow: nis compat
 
 hosts:  nis files mdns4_minimal [NOTFOUND=return] dns mdns4
 networks:   files
 
 protocols:  db files
 services:   db files
 ethers: db files
 rpc:db files
 
 netgroup:   nis
 ===
 
 Hm, I don't have a NIS configuration here ... only thinking alound.

The strace shows that the System error comes from the nis NSS library.
This is the first one called to resolv hosts type records. Removing nis
here would probably solve your problem.

-- 
Aurelien Jarno  GPG: 1024D/F1BCDB73
aurel...@aurel32.net http://www.aurel32.net



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#556600: getaddrinfo() fails with system error

2009-11-17 Thread Hagen Möbius
Hi back.

That did it. Thanks a bunch!

Now the problem is certainly resolved but why is the error reporting
so wrong (EAI_SYSTEM points to errno which does not contain any error
information) and why is the fallback not working? Is that related to
the [NOTFOUND=return] directive?

Anyway, thanks for your input,

Hagen.

 /etc/nsswitch
 ===
 # /etc/nsswitch.conf
 #
 # Example configuration of GNU Name Service Switch functionality.
 # If you have the `glibc-doc-reference' and `info' packages installed, try:
 # `info libc Name Service Switch' for information about this file.

 passwd:         nis compat
 group:          nis compat
 shadow:         nis compat

 hosts:          nis files mdns4_minimal [NOTFOUND=return] dns mdns4
 networks:       files

 protocols:      db files
 services:       db files
 ethers:         db files
 rpc:            db files

 netgroup:       nis
 ===

 Hm, I don't have a NIS configuration here ... only thinking alound.

 The strace shows that the System error comes from the nis NSS library.
 This is the first one called to resolv hosts type records. Removing nis
 here would probably solve your problem.

-- 
Hagen Möbius
Lychener Str. 81, 10437 Berlin, Germany
Home: +49 30 4450091
Cell: +49 179 5853897
Mail: hagen.moeb...@googlemail.com



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#556600: getaddrinfo() fails with system error

2009-11-16 Thread Hagen Möbius
Package: libc6
Version: 2.10.1-7

Programs which use getaddrinfo() to resolve addresses fail most of the
time. I tried to get to the bottom of the error and came up with the
following little program, that exhibits the error.

test.c
===
#include errno.h
#include stdio.h
#include netdb.h
#include string.h

int main(void)
{
struct addrinfo * result;
int error;

error = getaddrinfo(ftp.de.debian.org, http, NULL, result);
if(error != 0)
{
fprintf(stderr, error in getaddrinfo: %d / %s\n, error,
gai_strerror(error));
if(error == EAI_SYSTEM)
{
fprintf(stderr, system error: %d / %s\n, errno, 
strerror(errno));
}

return 1;
}
freeaddrinfo(result);

return 0;
}
===

The output is as follows, which seems wrong in itself to me.
===
error in getaddrinfo: -11 / System error
system error: 0 / Success
===

Now the thing is, when I replace the service string http with NULL,
it works perfectly. But ftp.de.debian.org:http for instance is what
aptitude wants to query and it fails which makes my system
un-upgradable at the moment.

Thanks for your time,

Hagen.

-- 
Hagen Möbius
Lychener Str. 81, 10437 Berlin, Germany
Home: +49 30 4450091
Cell: +49 179 5853897
Mail: hagen.moeb...@googlemail.com



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#556600: getaddrinfo() fails with system error

2009-11-16 Thread Aurelien Jarno
On Tue, Nov 17, 2009 at 03:52:27AM +0100, Hagen Möbius wrote:
 Package: libc6
 Version: 2.10.1-7
 
 Programs which use getaddrinfo() to resolve addresses fail most of the
 time. I tried to get to the bottom of the error and came up with the
 following little program, that exhibits the error.

This program works here, I guess your problem is related to your local
configuration.

First of all are you really running libc6 2.10.1-7 or a previous
version? Do you know which was the latest working version?

Could you please send me the contents of /etc/hosts, /etc/resolv.conf,
/etc/nsswitch.conf and /etc/services on your system?

Finally could you send us the output of strace on your test program?

-- 
Aurelien Jarno  GPG: 1024D/F1BCDB73
aurel...@aurel32.net http://www.aurel32.net



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org