This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Failing to resolve irm.ipreo.com since glibc-2.12-1.107.el6, looking for help testing more recent versions.


Hello and thank you for libc.

I am investigating the inability of RHEL6 and RHEL7 to resolve
irm.ipreo.com since glibc-2.12-1.107.el6.

glibc-2.12-1.80.el6, glibc-2.12-1.47.el6 and glibc-2.5-118 on RHEL5
are able to resolve it, I am testing with:

/usr/bin/ltrace -f -s 96 -n 2 -S -tt -T /usr/bin/getent ahosts irm.ipreo.com

glibc-2.12-1.107.el6, glibc-2.12-1.132.el6 and glibc-2.17-55.el7 all
fail to resolve.

I wanted to test on upstream libc versions and non RH distros to see
if it works, I have yet to create a bugzilla.redhat.com bug.

It works on the 3.11.0-20 Ubuntu shell I can get from using a
runnable.com bash shell/stack which is using Ubuntu EGLIBC
2.17-0ubuntu5.

Can anyone help test on more recent versions of glibc?  Or does anyone
recognise the behaviour and know of a related bug that may have been
fixed upstream?

I suspect https://bugzilla.redhat.com/show_bug.cgi?id=841787 which is
this patch:

diff -rup a/resolv/res_init.c b/resolv/res_init.c
--- a/resolv/res_init.c 2012-07-26 15:10:45.655638776 -0600
+++ b/resolv/res_init.c 2012-07-26 15:11:27.731423002 -0600
@@ -314,9 +314,9 @@ __res_vinit(res_state statp, int preinit
                        cp++;
                    if ((*cp != '\0') && (*cp != '\n')
                        && __inet_aton(cp, &a)) {
-                       statp->nsaddr_list[nservall].sin_addr = a;
-                       statp->nsaddr_list[nservall].sin_family = AF_INET;
-                       statp->nsaddr_list[nservall].sin_port =
+                       statp->nsaddr_list[nserv].sin_addr = a;
+                       statp->nsaddr_list[nserv].sin_family = AF_INET;
+                       statp->nsaddr_list[nserv].sin_port =
                                htons(NAMESERVER_PORT);
                        nserv++;
 #ifdef _LIBC
diff -rup a/resolv/res_send.c b/resolv/res_send.c
--- a/resolv/res_send.c 2010-05-04 05:27:23.000000000 -0600
+++ b/resolv/res_send.c 2012-07-26 15:34:58.398261659 -0600
@@ -421,10 +421,10 @@ __libc_res_nsend(res_state statp, const
                                EXT(statp).nsmap[n] = MAXNS;
                        }
                }
-               n = statp->nscount;
-               if (statp->nscount > EXT(statp).nscount)
+               n = statp->nscount - EXT(statp).nscount6;
+               if (n > EXT(statp).nscount)
                        for (n = EXT(statp).nscount, ns = 0;
-                            n < statp->nscount; n++) {
+                            n < statp->nscount - EXT(statp).nscount6; n++) {
                                while (ns < MAXNS
                                       && EXT(statp).nsmap[ns] != MAXNS)
                                        ns++;
@@ -441,7 +441,7 @@ __libc_res_nsend(res_state statp, const
                                    malloc(sizeof (struct sockaddr_in6));
                        if (EXT(statp).nsaddrs[n] != NULL) {
                                memset (mempcpy(EXT(statp).nsaddrs[n],
-                                               &statp->nsaddr_list[n],
+                                               &statp->nsaddr_list[ns],
                                                sizeof (struct sockaddr_in)),
                                        '\0',
                                        sizeof (struct sockaddr_in6)

These are the commands I used on the runnable.com bash stack:

ldd /usr/bin/getent

/lib/x86_64-linux-gnu/libc.so.6

cat /etc/resolv.conf

/usr/bin/ltrace -f -s 96 -n 2 -S -tt -T /usr/bin/getent ahosts irm.ipreo.com

Cheers,
Peter (Stig) Edwards

This is the resolv.conf file in use on all the RH hosts:

cat /etc/resolv.conf
domain example.com
search example.com prod.example.com pc.example.com
options attempts:2 timeout:4
nameserver 1.2.3.4
nameserver 1.2.3.5
nameserver 1.2.3.6


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]