Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Jan 1997 14:59:14 -0500 (EST)
From:      Bill Paul <wpaul@skynet.ctr.columbia.edu>
To:        mark@grondar.za (Mark Murray)
Cc:        current@freebsd.org
Subject:   Re: My sendmail/NIS keeps on dying.
Message-ID:  <199701111959.OAA02372@skynet.ctr.columbia.edu>
In-Reply-To: <199701111722.TAA20776@grackle.grondar.za> from "Mark Murray" at Jan 11, 97 07:22:14 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Of all the gin joints in all the towns in all the world, Mark Murray had 
to walk into mine and say:

[chop]
 
> The machine is 3.0-CURRENT, and the vintage is approx 22-Dec-1996.

That's not all that current. In fact I think that was before I added
the async DNS support to ypserv.

> The ypbind complaints have been happening for a while (some months)
> with (apparently) no ill effects, just logging turds. I suspect
> (now that you mention it) that it may have started when I added
> another loopback device (lo1).

Another loopback device? Err.. okay. Who am I to argue.
 
> The machine is sorta multihomed. I have 2 loopback devices - lo0
> and lo1, and i intend to attach my httpd and cached to separate
> IPs on lo1. So far only httpd (apache) is attached to lo1. BTW -
> lo1 has 3 IPs - it is natively 127.0.0.2, and as aliases it has
> two IPs of my class C.

So you are doing non-standard wackiness. Shoulda guessed. (It's times
like this I wish virtual interfaces and IP aliasing had never been
invented.)

> Apache has been attached for about 12 days
> now. I also have an ethernet card on ed0, and a tun0 device (currently
> unused but it or ppp0 will soon be my "outside" connection).
> 
> The mail problem only started in the last 24 hours. Baffling....

It seems that in some cases, sendmail may roll over to using NIS if
attempts to do a DNS lookup for a particular site fail, usually due
to the remote nameserver being unreachable and the request timing out.
This has the unfortunate effect of causing ypserv to fork() off many
child processes that do DNS lookups and can cause the parent ypserv
to block. This problem doesn't occur with the new async resolver in
ypserv since it no longer needs to fork().

I'm a little confused about the origin of the 'select: Bad address'
errors from ypbind (and to some extent sendmail). I have seen this
error in the past, but only on rare occasions. I always assumed it
had something to do with the new pipe code in the 2.2 branch, as it
never happens on my 2.1.0 system (and ypbind does use pipes for
parent/child communications). This is not to say that there's a bug
in the new pipe code: most likely I inadvertently created a dependency
on some behavior of the old socket-based implementation and now it's
come back to haunt me.

Unfortunately I don't know how to reliably reproduce the condition that 
causes the error message, so I haven't been able to track down the bug.
(And no, having ypbind ignore the condition is not the answer.)

> What else is needed?

If you are lucky enough to catch sendmail in the act, try to run ps -auxw
a couple times and see how many ypserv processes are running. If you see
a lot, then this could be caused by ypserv blocking and you should update
to a more current -current to pick up the new ypserv. If you don't want
to do that, try turning off DNS lookups in ypserv:

# cd /var/yp
# vi /var/yp/Makefile (comment out B=-b)
# touch /etc/hosts
# make

Also make sure not to run ypserv with the -n flag.

-Bill

-- 
=============================================================================
-Bill Paul            (212) 854-6020 | System Manager, Master of Unix-Fu
Work:         wpaul@ctr.columbia.edu | Center for Telecommunications Research
Home:  wpaul@skynet.ctr.columbia.edu | Columbia University, New York City
=============================================================================
 "It is not I who am crazy; it is I who am mad!" - Ren Hoek, "Space Madness"
=============================================================================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701111959.OAA02372>