bugs (and fixes) for Ultrix 4.1

Chris Metcalf metcalf at masala.lcs.mit.edu
Thu Mar 14 15:09:32 AEST 1991


I've found a couple of interesting Ultrix bugs since we brought up
our DECstations 3100s under Ultrix 4.1.  

This first is one I asked about here a month or so ago.  We were having
problems with our file systems becoming corrupted when large virtual-
memory jobs were run.  It turns out that if you are swapping on (e.g.)
two disks but there's a "missing" disk in the sequence of swap disks,
Ultrix swaps onto the partition *following* the swap on the first disk
instead of the swap partition on the second disk!  In our case, we had
rz0 and rz2 as the only disks on the system, and we were swapping onto
rz0b and rz2b.  In this configuration, running a large virtual-memory
task would result in swapping on rz0g (a user partition):  running
"strings" on the raw filesystem partition shows the test string I was
writing to memory in the large task.  Setting rz2 to rz1 and changing
the correct byte in /etc/fstab made the problem go away completely.
(Sigh.  Where are electronic SPRs when you need them?)

The other problem, which I encountered just recently, concerns the
behavior of gethostbyaddr().  If you have "hosts=local,bind" in your
/etc/svc.conf file, a call to gethostbyaddr() that doesn't find
the desired host in /etc/hosts, but does find it with DNS, returns
the correct name and address, but the aliases are those of the
last line in /etc/hosts!  

To demonstrate this lossage, compile the little program at the end
of this post and try the following.  First, make sure that your
/etc/svc.conf is set up to hosts=local,bind.

	% <edit your /etc/hosts to end with: "127.0.0.1 localhost">
	% hostaddr 18.72.2.1
	name    = "MIT.MIT.EDU"
	aliases =
	% <add an alias (e.g. "ultrix_lossage") after the "localhost">
	% hostaddr 18.72.2.1
	name    = "MIT.MIT.EDU"
	aliases = "ultrix_lossage"

The easiest fix to this problem is to end your /etc/hosts with
a line containing no aliases (like localhost).

/* hostaddr.c begins */
#include <netdb.h>
#define AF_INET 2

main(argc, argv)
	char **argv;
{
	char **alias;
	unsigned long addr = inet_addr(argv[1]);
	struct hostent *host = gethostbyaddr(&addr, sizeof(addr), AF_INET);
	printf("name\t= \"%s\"\naliases\t=", host->h_name);
	for (alias = host->h_aliases; *alias; ++alias)
		printf(" \"%s\"", *alias);
	putchar('\n');
}
/* hostaddr.c end */

We've also been having some problems with ntp in which the clock
stops absolutely dead after the last "select peer" syslog output.
I'm hoping this had to do with the gethostbyaddr() bug.

Good luck to all,
Chris
--
			Chris Metcalf --- MIT Laboratory for Computer Science
			email to metcalf at lcs.mit.edu, or phone (617) 253-7766



More information about the Comp.unix.ultrix mailing list