bugSpamAssassin Milter Plugin - Bugs: bug #1099, Crashes after some hours


bug #1099: Crashes after some hours

Submitter:  None
Submitted:  Thu 29 Aug 2002 07:32:35 AM UTC
Category:  None Severity:  1 - Wish
Item Group:  None Status:  Works For Me
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:
       No canned response available


( Jump to the original submission )

Sat 01 Aug 2020 06:53:10 PM UTC, comment #16: 

Please open a new bug with new data.  Probably this is fixed and there are multiple issues anyway.

Greg Troxel <gdt>
Project Member
Sun 01 Feb 2004 11:10:00 PM UTC, comment #15: 

I was looking for the answer to this maximum threads problem for a libmilter, and found that in order to get > 1022 threads you will need to make come changes to the kernel source and glibc source, this is discussed at many places including http://www.kegel.com/c10k.html#limits.threads .

What I had to really scrounge for was that I was only getting 256 threads and not this 1023 limit.  The reason was evident in the stack size, and on lowering the stack size with ulimit, I was able to use more threads.

# to view your current stack size in the current shell
ulimit -s

# to set the stack size for the current shell
# do this before you run your threaded program
# test with different stack sizes
ulimit -s 512

I am still yet to work out the optimum setting for this, but it seems to divide up a limited amount of space, the lower the number the more threads.  In order to get >1022 you need to recompile as stated above.

Good luck!  

Stuart Clark

Tue 07 Oct 2003 01:33:31 PM UTC, comment #14: 

Using RH8, sendmail-8.12.8-9.80, spamass-milter-0.2.0, dcc, pyzor-0.4.0, and razor-agents-2.36.

spamass-milter is dropping out on my site as well - unexpectedly.  I just placed the debug flags on the script which restarts the milter, so will hope for the best.

Was this an issue in the earlier version of spamass-milter?  We are using this to create an email gateway and it is crucial that the project succeed, so if there is any new information on this, please let me know.

Mon 07 Jul 2003 07:52:13 PM UTC, comment #13: 

Interesting.  That looks like it crashed trying to output the X-Envelope-From header, or trying to build the X-Envelope-To: header.  I can't tell which because I forgot to add debug logging to all ::output exit cases.  Neither one should cause a crash though.  Can you get a coredump, or if you're running Linux, can you run it under valgrind?

Dan Nelson <dnelson>
Project Administrator
Mon 07 Jul 2003 03:53:15 PM UTC, comment #12: 

Try 0.2.0 and see if you still have problems.  I could never cause my Debian machine to hang with 0.1.3a (sendmail 8.12.9).

Dan Nelson <dnelson>
Project Administrator
Tue 21 Jan 2003 06:22:06 AM UTC, comment #11: 

Same thing here

Crashes about thrice a day, on RedHat 6.1 (so with all the updates applied it's almost everywhere 6.2 :-), spamassassin 2.43, sendmail 8.12.7, spamass-milter-0.1.3a.

No problems so far on another, similar machine with a lot less traffic (though it's only been running for a couple of days...)

Wed 08 Jan 2003 06:51:52 PM UTC, comment #10: 

Wow. vsz is huge.  That could mean problems, but a vsz of 263MB is pretty much impossible, unless you're trying to email 200mb files around.  More likely the number is screwed up because of the crash.

Dan Nelson <dnelson>
Project Administrator
Mon 06 Jan 2003 03:29:08 PM UTC, comment #9: 

Make sure you have coredumps enabled (run "ulimit -c unlimited" just before launching the milter in the startup script), and when it crashes it will create a file called "core".  You can determine where is will end up by starting up the milter, and running "lsof -c spamass-milter", and looking for a "cwd" line.  That's the processes current directory.

Dan Nelson <dnelson>
Project Administrator
Mon 06 Jan 2003 02:12:34 AM UTC, comment #8: 

A coredump from the crash on the 2nd would have been nice;  as for the hangs, what does "ps lww -C spamass-milter" print?  I'm most interested in the WCHAN and TIME columns.

Dan Nelson <dnelson>
Project Administrator
Wed 30 Oct 2002 02:19:16 PM UTC, comment #7: 

maybe this can do the trick !!!

signal(SIGCHLD, sigCHLD);

void sigCHLD() {
        int status;
        while(wait3(&status, WNOHANG, (struct rusage *) 0) >= 0);
        /* Sit around and twiddle our thumbs */

-email is unavailable-

Wed 30 Oct 2002 08:50:53 AM UTC, comment #6: 

i have the same trouble but not with unix socket's but with TCP connection to it "/usr/sbin/spamass-milter -p inet:2007"

I hardly think that this could be tracked down to an error in the "libmilter" from sendmail. The ground is simple. I wrote/extend an virus filter on milter basis in c "milter-virus" and he have the same bad thing. BUT it was not from the start. There i think it happend after some fixes in the cleaning of the private ctx structure. So it maybe is only an error how and when to clean the structur in the milter doku.

Would be great if it will be fixed because in the current stage it is not useable for important mail server.

Fri 18 Oct 2002 07:29:28 PM UTC, comment #5: 

 I too see problems from time to time. Not sure if it relates to this or not. On Solaris 8 spamass-milter seems to stablize at 59M on 1 and 32M on the other 2 boxes.

 Yesterday, I noticed a couple SPAM's sneak through so I took a look the headers. It was passed on with NO headers added. I checked the logs and sure enough, no messages about adding the headers. I was however receiving the "identified spam" and "clean message", which are being written to seperate log files via syslog-ng.

 Any info would be great. spamass-milter was still running. And nothing about it crashing.

 - Mike

Wed 09 Oct 2002 03:27:35 PM UTC, comment #4: 

Check your maxprocs resource limit.  Error 11 is EAGAIN, and the pthread_create manpage says:

EAGAIN - not enough system resources to create a process for the new thread.

That means that it tried to fork a new thread but the kernel said there were too many processes running already.

Dan Nelson <dnelson>
Project Administrator
Wed 09 Oct 2002 12:15:33 PM UTC, comment #3: 

Crashes on me too very frequently: Excerpt from maillog
Oct  9 05:08:49 nameserver2 spamass-milter[5981]: SpamAssassin: thread_create() failed: 11, abort
Oct  9 05:08:49 nameserver2 sendmail[22297]: g9998Hmo022297: Milter (spamassassin): read returned -1: Connection reset by [218
Will try some of the stuff here. I am willing to troubleshoot if anyone knowledgeable suggests something.

Currently I have a modified rc.script with an addtional parameter startifstopped running every 10 minutes.

Joe Maimon <jmaimon>
Tue 08 Oct 2002 02:44:02 PM UTC, comment #2: 

fty: try running spamass-milter this way:

LD_PRELOAD=watchmalloc.so.1 MALLOC_DEUBG=WATCH spamass-milter <etc etc>

That will load a debugging malloc library that might be able to track down the memory leak.  Or one of the Linux people with problems, try running under valgrind --leak-check=yes.

I can't reproduce the crashing problem on my Debian machine.  My milter has been runing for almost a month, and has stabilized at 16MB of memory.

root      2063  0.0  0.3 18280  392 ?        S    Sep11   0:41 /usr/local/sbin/spamass-milter -p /var/run/sendmail/spamass.sock

Dan Nelson <dnelson>
Project Administrator
Sat 28 Sep 2002 02:12:05 PM UTC, comment #1: 

I too have seen this problem on a medium volume site. I woke up this morning and found 15 messages in my inbox that shouldn't have been there :)

 Seems to work fine while it's running. We are looking to roll this onto a heavy loaded server, but this makes me a little leary.

 Any help would be great.

BTW : I see the same info in the log files

Thu 29 Aug 2002 07:32:35 AM UTC, original submission:  

spamass-milter crashes after some hours of running in a medium-volume setup. Symptoms are as follows:
- There ist just a single totally unresponsive spamass-milter process hanging around. (ltrace or strace
of that process does not do anything)
- In the log, the following appears:
  Aug 29 03:37:22 jenner sm-mta[22274]: g7T1MMHI022274: Milter (spamassassin): error connecting to filter: Connection timed out with /var/run/sendmail/spamass.sock

There are no signs of anything going wrong before.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by gdt (Updated the item)
  • -email is unavailable- added by kovert (Updated the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.





    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-08-01 gdt StatusNone Works For Me
    2020-08-01 gdt Open/ClosedOpen Closed
    2014-08-14 kovert Severity3 - Normal 1 - Wish

    Back to the top

    Powered by Savane 3.9