[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

"who" is guilty - "named" is not!!!



Hello all,

following the "who" vs. "named" controversy, I have found something that
leads me to think that the problem of "who" slowness is because of a
bug in "who" and not in "named" or because of incorrect DNS setup:

It happens that when "who" is run, "who" tries to do a name lookup
but it uses the wrong host name so even when the host is local,
it goes out to the Internet until somewhere, someone says that they
name does not exist. Take a look at this debug output from named that
was generated after I ran "who":

---

Debug turned ON, Level 1

datagram from [127.0.0.1].1052, fd 21, len 34; now Tue Aug 12 18:00:40 1997
req: nlookup(slip1.ven.ra.roc) id 58540 type=1 class=1
req: found 'slip1.ven.ra.roc' as 'slip1.ven.ra.roc' (cname=0)
ns_req: answer -> [127.0.0.1].1052 fd=21 id=58540 size=107 Local

datagram from [127.0.0.1].1053, fd 21, len 54; now Tue Aug 12 18:00:40 1997
req: nlookup(slip1.ven.ra.roc.ven.ra.rockwell.com) id 58541 type=1 class=1
req: found 'slip1.ven.ra.roc.ven.ra.rockwell.com' as 'ven.ra.rockwell.com' (cnam
e=0)
ns_req: answer -> [127.0.0.1].1053 fd=21 id=58541 size=125 Local

---

Do you see how "who" tries to find what's the IP address of slip1.ven.ra.roc?
named returns cname=0 that means that it didn't find anything. Then
the resolver gethostbyname() function tries appending the local
domain so it queries the name server with slip1.ven.ra.roc.ven.ra.rockwell.com
which is also invalid (another cname=0 is returned.)

The first time I type "who" it is very slow because it has to go out
to the Net to know that the host does not exist. After the first time
"who" is faster because the information (about the invalid host names)
is cached.

This behavior is not present in shellutils 1.12 (Debian 1.2). In shellutils
1.16 (Debian 1.3), this is the behavior.

I think this problem comes from the fact that /var/run/utmp can store only the
first 16 characters of the host name:

zeus:~$ who
eparis   ttyS16   Aug 12 21:40 (callback -S)
eparis   ttyp0    Aug 12 21:40 (slip1.ven.ra.roc)
eparis   ttyp1    Aug 12 21:56 (slip1.ven.ra.roc)
                                ^^^^^^^^^^^^^^^^

so the DNS lookup will be of slip1.ven.ra.roc instead of the correct
name slip1.ven.ra.rockwell.com, that is the correct FQDN of my host.

This is definitely a bug in shellutil but I don't know how to report
it. Does anyone know how to report this to the upstream maintainers?

Finally, I would suspect that other shellutils programs suffer from the
same problem since the share the same common libraries and source code
but I haven't noticed anything in other programs.

Comments?

E.-

P.S. The above "named" debug output is for a cached query. The first time
"who" is run the situation is even worse because the name server
has to query other name servers and go out to the Net.

-- 

Eloy A. Paris
Information Technology Department
Rockwell Automation de Venezuela
Telephone: +58-2-9432311 Fax: +58-2-9430323


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: