OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Closing policy connections to smtp causes smtps in CLOSE_WAIT

From: Robert Felber (r.felberek-muc.de)
Date: Mon Apr 03 2006 - 02:25:01 CDT


On Sun, Apr 02, 2006 at 04:14:47PM -0400, Victor Duchovni wrote:
> > on linux 2.6 it seems to hang.
>
> Show a system call trace? Sounds like a Linux bug. Is a TCP policy
> service, or a unix-domain socket policy service?

I meant a policy server on tcp.

trace of syscalls:

I'm trying that right now. I was not able to trace that with
strace -f -p $MASTERPID > strace.out 2>&1.

After I've avoided some inheritance of some own sockets to a forked cache
(which did not have the inet socket anyway) it appears to work.
(leaving still CLOSE_WAIT smtpds, but it seems the smtpd reconnects upon
failure successfully now.)

Before my changes I had such messages in log:

Apr 2 17:47:27 maus postfix/smtpd[25448]: warning: premature end-of-input on 127.0.0.1:12525 while reading input attribute name
Apr 2 17:47:27 maus postfix/smtpd[25448]: warning: problem talking to server 127.0.0.1:12525: Success

(in that order, I'm not sure how far I trust this order, as this syslog has
sometimes mixed timestamps (past after present, specially on fast code and
load)).

I'm very sure it was a problem with a inherited socket, which seems to be solved
now.

--
    Robert Felber (PGP: 896CF30B)
    Munich, Germany