OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: stmp process killed on sig 11, transport failure results

From: Wietse Venema (wietseporcupine.org)
Date: Tue Aug 17 2004 - 11:03:28 CDT


Vivek Khera:
>
> On Aug 16, 2004, at 1:29 PM, Victor Duchovni wrote:
>
> > Do you have two systems with similar workloads, one patched and one
> > unpatched?
> >
> > Did you observe the problem on multiple systems, or one system only?
> >
>
> I have a pair of twin systems, one serial number apart made by Dell.
> The software on them is identical bit for bit, except the configs that
> involve hostnames and IP numbers. Their workload is statistically
> identical. They send mail to an extremely wide variety of domains all
> over the world.

The problem is complicated, but the fix is very easy.

A one-line change is all it takes. The complete fix also disables
the forced output flush from the SMTP client, because that code is
no longer needed now that Postfix does no per-recipient DNS lookups.

        Wietse

*** ../postfix-2.2-20040801/src/util/vstream.c Thu Jul 1 21:15:12 2004
--- src/util/vstream.c Mon Aug 16 19:46:01 2004
***************
*** 926,931 ****
--- 926,935 ----
       * policies. Either this, or the vstream*open() routines would have to
       * have a really ugly interface with lots of mostly-unused arguments (can
       * you say VMS?).
+ *
+ * Initialize the I/O time (as documented) so that a time sensitive, "write
+ * before read" application does not force flush the first data written
+ * to a stream, potentially triggering NAGLE delays or other trouble.
       */
      stream = (VSTREAM *) mymalloc(sizeof(*stream));
      stream->fd = fd;
***************
*** 939,945 ****
      stream->timeout = 0;
      stream->context = 0;
      stream->jbuf = 0;
! stream->iotime = 0;
      return (stream);
  }
  
--- 943,949 ----
      stream->timeout = 0;
      stream->context = 0;
      stream->jbuf = 0;
! stream->iotime = time((time_t *) 0); /* as documented */
      return (stream);
  }