[comp.mail.sendmail] Sendmail 5.64 not being started from rc.local under SunOS 4.0.3

ehrlich@cs.psu.edu (Dan &) (07/19/90)

On our main mail machine (a Sun 4/380S running SunOS 4.0.3 PSR A) I have
noticed that sendmail 5.64 does get started from rc.local at boot.  Here are
the lines from rc.local that claim to invoke sendmail:

	if [ -f /usr/lib/sendmail -a -f /etc/sendmail.cf ]; then
        	(cd /var/spool/mqueue; rm -f nf* lf*)
        	/usr/lib/sendmail -bd -q15m; (echo -n ' sendmail')
	fi

' sendmail' is echoed on the console so the contents of the if are being
executed.  I have looked everywhere I could think of (/ /var/spool/mqueue
/var/spool /var/tmp) for core files but can not find any.  There are no
messages in system logs.

If anyone has any suggestions I would appreciate hearing them.

Thanks in advance.
--
Dan Ehrlich <ehrlich@cs.psu.edu>/Voice: +1 814 863 1142/FAX: +1 814 865 3176

brian@ucsd.Edu (Brian Kantor) (07/28/90)

In article <F7e7so01@cs.psu.edu> ehrlich@cs.psu.edu (Dan &) writes:
>On our main mail machine (a Sun 4/380S running SunOS 4.0.3 PSR A) I have
>noticed that sendmail 5.64 doesn't get started from rc.local at boot....
>' sendmail' is echoed on the console so the contents of the if are being
>executed.  I have looked everywhere I could think of (/ /var/spool/mqueue
>/var/spool /var/tmp) for core files but can not find any.  There are no
>messages in system logs.

I had the same problem and just now solved it.  I forgot that the dynamic
loader library tables haven't been created at this point in the boot
sequence - they're done as one of the last things in /etc/rc.

That means that ANYTHING started before then has to be statically
linked, and sendmail wasn't.

Change the Makefile to use -Bstatic on the link line.  You'll probably
also have to add -ldbm and -lresolv
		- Brian

ehrlich@cs.psu.edu (Dan &) (07/28/90)

In article <16308@ucsd.Edu> brian@ucsd.Edu (Brian Kantor) writes:

Brian> In article <F7e7so01@cs.psu.edu> ehrlich@cs.psu.edu (Dan &) writes:
>On our main mail machine (a Sun 4/380S running SunOS 4.0.3 PSR A) I have
>noticed that sendmail 5.64 doesn't get started from rc.local at boot....
>' sendmail' is echoed on the console so the contents of the if are being
>executed.  I have looked everywhere I could think of (/ /var/spool/mqueue
>/var/spool /var/tmp) for core files but can not find any.  There are no
>messages in system logs.

Brian> I had the same problem and just now solved it.  I forgot that the dynamic
Brian> loader library tables haven't been created at this point in the boot
Brian> sequence - they're done as one of the last things in /etc/rc.

Brian> That means that ANYTHING started before then has to be statically
Brian> linked, and sendmail wasn't.

Brian> Change the Makefile to use -Bstatic on the link line.  You'll probably
Brian> also have to add -ldbm and -lresolv
Brian> 		- Brian

Don't think this is it.  There are a number of dynamically linked programs
that get started before the ld.so.cache file gets built.  in.named for
example, which starts up just fine.  We noticed that sendmail 5.64 appears
to provoke the bug in fork (under SunOS 4.0.3) if the enviroment is just the
right size.  A number of users had complained that the could not send mail
anymore.  The same code works just fine under SunOS 4.1.

Tried the following experiment:

	1) Log in as one of the afflicted users.
	2) Enter the following to the shell:

		% trace /usr/lib/sendmail5.64 -d0-21.25 joe

	   get a segmetation fault.
	3) Enter the following:

		% trace /usr/lib/sendmail5.61 -d0-21.25 joe

	   works like a champ.

Easiest solution appears to be to upgrade to SunOS 4.1.  This should be
happening real soon now.  Still,  I would like to know why this happens.

-- Dan Ehrlich
--
Dan Ehrlich <ehrlich@cs.psu.edu>/Voice: +1 814 863 1142/FAX: +1 814 865 3176

woods@ncar.ucar.edu (Greg Woods) (07/28/90)

In article <Flnz+=71@cs.psu.edu> ehrlich@cs.psu.edu (Dan &) writes:
>to provoke the bug in fork (under SunOS 4.0.3) if the enviroment is just the
>right size.  A number of users had complained that the could not send mail
>anymore.  The same code works just fine under SunOS 4.1.

  We are running 4.1 (PSR_A) on a 4/490, and we see the same problem.
If i start sendmail right after reboot everything is fine but it will
not start out of rc.local. Also I couldn't get named to start out of
rc.single. I'll bet Brian is right, I'll try the static linking.

--Greg

cudcv@warwick.ac.uk (Rob McMahon) (07/30/90)

I had problems with sendmail 5.61 & 5.64 dying soon after being started under
SunOS 4.0.3.  The symptoms were that connections would hang, mostly in `HELO'
or `DATA' state as shown by ps.

My empirical solution (I haven't gone through the code to check out why, so I
don't know whether it's just a fluke) is to move the invocation of sendmail
out of rc.local and into /etc/rc, after the clearing of /tmp.  It was a guess
and I haven't tried to explain it, but I've seen no problems since then.

Might be worth a try ...

Rob
--
UUCP:   ...!mcsun!ukc!warwick!cudcv	PHONE:  +44 203 523037
JANET:  cudcv@uk.ac.warwick             INET:   cudcv@warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England