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
|
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.
|
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?
|
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).
|
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...)
|
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.
|
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.
|
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.
|
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 */
}
-email is unavailable-
|
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.
|
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
|
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.
|
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.
|
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
|
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
|
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.
|