Subject: gethostbyname() bogon?
To: None <port-macppc@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-macppc
Date: 03/06/2001 02:21:45
I've got a subtle flakeout happening, apparently in gethostbyname and
apparently only on macppc - or at least, only on one machine and it's a
macppc machine.

When I use ssh to start up a window on the macppc displaying on my main
screen, and then from that window try to ssh anywhere, the relevant
sshd tries to connect to a totally bogus address (which varies from
experiment to experiment; one example is 0.14.251.201, another is
8.192.0.10).

I've added debugging code to the point where I am sure that the problem
is in gethostbyname().  Unfortunately, adding debugging code to
gethostbyname() makes it go away. :-(  Also, changing the command line
used to run the terminal window also makes it go away.

This makes it sound like an uninitialized variable somewhere in
gethostbyname or one of its calls.  But I haven't been able to find
one, and in general I'm not much good at debugging heisenbugs.  Adding
to my doubt is that adding debugging code to sshd *doesn't* make it go
away, but linking with -static does.

I looked at just using a new gethnamaddr.c, but diff didn't show
anything that looked like a fix for this, and while using it may make
the symptom go away, I can't believe it would actually cure the
problem.

Any ideas?  Thoughts?  Hints?  Similar experiences?

The machine is a PowerMac 4400, running basically 1.4T.  I hesitate to
install a new version of anything until I've figured out what's going
on here, for fear of losing my ability to reproduce it but not fixing it.

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B