SpamAssassin/Perl eating enormous amounts of memory?

Andrew Moran sneepre at mac.com
Wed Mar 4 10:29:53 PST 2009


On Mar 3, 2009, at 12:31 PM, Mel wrote:

> On Tuesday 03 March 2009 07:26:02 Andrew Moran wrote:
>>>
>>>
>>
>> Ok sadly that didn't seem to do much:
>>
>> celebrian# cat /boot/loader.conf
>> kern.maxdsiz="8G"
>> kern.defdsiz="4G"
>> celebrian#
>
> Can you show limits -H -d?
>

[root at celebrian ~]# limits -H -d
Resource limits (current):
   datasize          8388608 kB
[root at celebrian ~]#

>> I rebooted, but still see my memory being chewed up.   Almost
>> immediately after booting, one of my spamassassin processes spun out
>> of control.  Here's the top with it eating 16 gigs of memory:
>>
>>   PID    UID    THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU
>> COMMAND
>>  1611   1030      1  68    0 15062M   818M CPU2   2   0:44 20.65%
>> perl5.8.9
>
> At this point, have your cd to a partition large enough to hold a  
> few 100
> megs, and type:
> ktrace -p 1611
>
> where 1611 is the PID of the perl process. You may want to be a bit  
> earlier
> then this point. After a few seconds, type ktrace -C. Then kdump| 
> less. There
> should be plenty of allocations there (*alloc* functions).


I'll try to do this if I can catch it in the act.         I've  
mitigated the problem by turning off swap completely, which means my  
system doesn't get bogged down but then it's less obvious when it's  
happening.  I do seem to be seeing a lot of other processes dying as  
well:

pid 53393 (perl5.8.9), uid 1030, was killed: out of swap space
pid 53415 (sendmail), uid 0, was killed: out of swap space
pid 53401 (imap-login), uid 143, was killed: out of swap space
pid 53400 (imap-login), uid 143, was killed: out of swap space
pid 53399 (imap-login), uid 143, was killed: out of swap space
pid 53417 (procmail), uid 1030, was killed: out of swap space
pid 47702 (sendmail), uid 0, was killed: out of swap space
pid 53418 (perl5.8.9), uid 1030, was killed: out of swap space
pid 53416 (procmail), uid 1030, was killed: out of swap space
pid 971 (dovecot), uid 0: exited on signal 11 (core dumped)

This morning i had to restart many of my services.  The mystery  
continues.

--Andy


More information about the freebsd-questions mailing list