Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

sync causing crash

2005-10-13 by Matthew S. Cramer

I am running milter-greylist on the following linux system:

Kernel: 2.4.4 SMP (2 processors)
GLIBC:  2.2.2
             total       used       free     shared    buffers     cached
Mem:       5922468    4568268    1354200          0     600288    3237844
-/+ buffers/cache:     730136    5192332
Swap:      2097136    2097136          0

# cat /proc/sys/fs/file-max 
32768
# cat /proc/sys/kernel/threads-max 
786432

Without the sync feature enabled, the milter runs very well.  But if I
enable syncing between my 3 MX servers, then they all crash within an
hour or two.  We receive about 80000 emails per day.

I've compiled the bind 8 libraries with threads, and linked
milter-greylist to those (even though I am not using SPF it was still
linking to libresolv, so I modified it to use libdns):

        libdns.so.11 => /usr/local/lib/libdns.so.11 (0x4001e000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x4010b000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x40122000)
        libc.so.6 => /lib/libc.so.6 (0x40138000)
        libisc.so.7 => /usr/local/lib/libisc.so.7 (0x40255000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

With syncing enabled, I get these error messages:

   Oct 13 11:32:50 XXX milter-greylist: greylist: thread_create()
   failed: 11, try again

which confuses me, because I can't find "thread_create" in the
milter-greylist source.  I assumed it was coming from libresolv but
I have linked libbind instead and the error still occurs.

Eventually I start seeing these errors:

   Oct 13 11:30:30 XXX milter-greylist: incoming connexion from
   XXX.XXX.XXX.XXX failed, In sync.c:692 pthread_create failed: Resource
   temporarily unavailable

The __LINE__ macro and __FILE__ macros were used to determine the
cause.  This is the ONLY line where I get the failure.  After a few
dozen of these milter-greylist completely dies.

Our resident C expert thinks I am hitting some kind of max threads per
user limit or max open files limit (I am running the milter under a
non-privileged user).  So I wrote a little shell script that counts
processes with 'ps -ef' and open files with 'lsof -i' and both never
get above 400 and 300, respectively.  [Unfortunately my distro's
version of ps does not support the -m flag for ps.]

Does anyone have any suggestions to resolv this, or has anyone
experienced similar problems when using sync?


Thanks,

Matt

-- 
Matthew S. Cramer <mscramer@...>          Office: 717-396-5032
Project Manager, Planning and Service Management    Fax:    717-396-5590
Armstrong World Industries, Inc.                    Cell:   717-917-7099

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.