Killed by signal 11

Written in the mid-morning in English • Tags: ,

I’ve been getting segmentation violation deaths in the Postfix smtp client for quite some time. I don’t remember which upgrade introduced them — especially because the problem only exhibited itself on the busiest mail server I have, relay.gw.com. It handles between 50,000 and 100,000 transactions daily.

Yesterday I dug into the topic with the help of Google. Many of the threads discussing the “killed by signal 11” problem suggested removing TLS or SASL or both from Postfix, which was not an option for me. I also didn’t think they would be the problem, because both have been deployed before the errors started.

A typical log trail looks like this:

Dec 21 00:04:54 viima postfix/smtpd[24290]: E717710792: client=xxx
Dec 21 00:04:55 viima postfix/cleanup[10898]: E717710792: message-id=xxx
Dec 21 00:04:55 viima postfix/qmgr[12834]: E717710792: from=xxx
Dec 21 00:04:55 viima postfix/qmgr[12834]:
    warning: premature end-of-input on private/relay socket
    while reading input attribute name
Dec 21 00:04:55 viima postfix/master[26497]:
    warning: process /usr/pkg/libexec/postfix/smtp
    pid 9647 killed by signal 11
Dec 21 00:04:55 viima postfix/qmgr[12834]:
    warning: private/relay socket: malformed response
Dec 21 00:04:55 viima postfix/qmgr[12834]:
    warning: transport relay failure -- see a previous
    warning/fatal/panic logfile record for the problem description

Prior to the signal 11, the same smtp process usually had already successfully delivered messages. Later in the log you can see the next queue run pick up the same message (E717710792) for delivery, also logging the “to=” line.

I finally found a promising thread ending in this article from Wietse Venema. I applied the patch and there have not been any signal 11 deaths since.

The patch is now included in the postfix-2.1.5nb3 package.