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

 
 

bug #1099: Crashes after some hours

Submitted by:  None
Submitted on:  Thu 29 Aug 2002 07:32:35 AM UTC  
 
Category: NoneSeverity: 1 - Wish
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

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
8192

# 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

Anonymous
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.

Anonymous
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...)

Anonymous
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:

Hi,
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 */
}

-unavailable-

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

Hi,
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.

Anonymous
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

Anonymous
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
.2.142.156]
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.

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
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

Anonymous
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.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 14 Aug 2014 03:56:56 AM UTCkovertSeverity3 - Normal=>1 - Wish

    Back to the top


    Powered by Savane 3.1-cleanup