Subject: DNS failures from within the MOO on NeXT

From: [email-masked] (Jonathan Bradshaw)
Date: Sun, 25 Apr 1993 23:50:40 -0700

I have a wierd problem (again, its a NeXT, what isn't wierd!) Many times
the MOO will stop using hostnames and switch to IP addresses. Hostnames
will not work on O_N_C() connects and @@who will show the IP address of
the user. WAIT! The machine that the MOO is on still works JUST FINE.
I can telnet using a hostname and connections in net-stat and 'w' show
proper hostname addresses. I could understand if the machine was unable
to convert but why does the NeXT work and the MOO running on it not? This
is not consistent. It will for most of the time, then it doesn't and when
I come back later, its working again. 

Is the MOO using different calls for matching? If I can't use ONC() to
connect to 'x.y.z' and yet 'telnet x.y.z' works fine where is this
coming from?

-- 
 Jonathan Bradshaw | [email-masked] | PGP Key Available On Request
  Packet: n9oxe@n0ary.#nocal.ca.usa.na | Prodigy: XMSN02B | (Os/2)(DOS)(Linux)
  WNDU-AM/FM/TV South Bend, IN | Disclaimer "My opinions are not my employers"
"If any girl rejects you, don't you doubt it's part of the .plan"-Deborah Gibson

---

From: Pavel Curtis <[email-masked]>
Date: Mon, 26 Apr 1993 08:48:33 -0700

> Date:	Sun, 25 Apr 1993 23:50:40 -0700
> From:	[email-masked] (Jonathan Bradshaw)
> 
> the user.

In order to protect itself from unbounded delays in converting numeric IP
addresses into DNS names, the server sets a five-second timeout on its calls to
gethostbyaddr().  If the timer goes off, the server longjmp()s out of the call
to gethostbyaddr() and falls back on simple numeric output.  Sometimes, this
leaves the implementation of gethostbyaddr() in an inconsistent state and it is
unable to perform translations any longer.  Occasionally, as you point out, it
actually recovers from this inconsistency and resumes normal operation.

There does not appear to be any way for me to work around this problem except
for taking out the timeout code.  I'm unwilling to do that because it leaves
the server open to catatonia if, for example, somebody's Yellow Pages server
goes away for a while.

Of course, the inconsistency in the state of gethostbyaddr() is limited to the
server's process, so it's no surprise that the rest of the processes on the
machine can still do translations properly.

	Pavel