Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Apr 2004 16:08:39 -0700
From:      Cory Petkovsek <cory@adaptableit.com>
To:        freebsd-questions@freebsd.org
Subject:   sendmail/strace hanging
Message-ID:  <20040408230839.GH4101@adaptableit.com>

next in thread | raw e-mail | index | archive | help
I'm running the 5.2 branch, last updated about 3/23-28.  Last night I was
working on forwarding sendmail on my freebsd workstation to my solaris
mailhub.  I modified my rc.conf to change:
    sendmail_enable="YES"
to
    sendmail_enable="NO"
    sendmail_submit_enable="YES"

Then I worked on making a submit sendmail cf.  I ran `sh /etc/rc.sendmail` and
it restarted the daemons.  Things worked fine.  I could run mailq and sendmail
as normal (aside from mail level problems).

In the mean time I got side tracked with a solaris problem.  I left that root
window open and tackled solaris.  When I came back to that window, things were
not working quite right.  `mailq` delayed for about 1min 15 seconds before
displaying anything.  It took about as long to send a message `echo
test|sendmail cory`.  Prompt comes back, but the process sits there for some
time.

Stopping sendmail with `sh /etc/rc.sendmail stop` works quickly.  Starting it
takes about 3min.   Both sendmail-submit and sendmail-clientmqueue take a
while before moving.  Booting also has this delay.

I have since commented out both sendmail lines in the rc.conf.  I've also reset
the sendmail configuration in /etc/mail.  I did a cvsup with src-alll
tag=RELENG_5_2 and did a make build/installworld last night.  Still have the
delay.  Mergemaster replaced sendmail.cf, but saw no difference with
rc.sendmail.

Now for the fun part.  I installed strace to see what was going on.  Strace
exibited similar blocking!  ARRGGHH!  doing an `strace ls` on one window and an
`strace -p` in another shows it blocking at ioctl(3, PIOCWAIT
If I hit ctrl-z and then `fg` on the `strace ls` window it instantly runs.

If I `strace mailq`, again it blocks.  `strace -p` in another window
shows same thing.  Doing a ctrl-z/fg makes it go and I get a bunch of output
followed by this at the end: 
execve("/usr/libexec/sendmail/sendmail", [""], [/* 0 vars */]PIOCWSTOP:
Input/output error

If I `mailq` and strace -p while it blocks I see it waiting at:
kevent(0x3, 0xbfbfbcc0, 0x1, 0xbfbfbcc0, 0x1, 0xbfbfbca0
with a wchan of kqread.

What happend?

Cory

-- 
Cory Petkovsek                                       Adapting Information
Adaptable IT Consulting                                Technology to Your
(858) 705-1655                                                   Business
cory@AdaptableIT.com                                  www.AdaptableIT.com



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