You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2005/05/19 23:14:42 UTC
[Bug 4346] New: sa-learn: massive memory usage on large messages
http://bugzilla.spamassassin.org/show_bug.cgi?id=4346
Summary: sa-learn: massive memory usage on large messages
Product: Spamassassin
Version: SVN Trunk (Latest Devel Version)
Platform: Other
OS/Version: other
Status: NEW
Severity: major
Priority: P5
Component: Learner
AssignedTo: dev@spamassassin.apache.org
ReportedBy: jm@jmason.org
bug noted in the users list:
Ingo Reinhart wrote:
> Hello!
>
> If I commit a big mail (32 MB) to sa-learn it need long time. I must
> wait 50 sec. and the sa-learn process need 332 MB RAM.
>
> What can I do for faster proceed?
AFAICS, we don't skip super-large messages in sa-learn. (I thought we did, but
it seems we don't!) we should, given this issue.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4346] sa-learn: massive memory usage on large messages
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4346
jm@jmason.org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|dev@spamassassin.apache.org |jm@jmason.org
Status|NEW |ASSIGNED
------- Additional Comments From jm@jmason.org 2005-06-14 23:09 -------
Created an attachment (id=2936)
--> (http://bugzilla.spamassassin.org/attachment.cgi?id=2936&action=view)
trivial fix
so easy. opt_all was set to 1 in sa-learn.raw; setting it to 0 will skip
massive messages.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4346] sa-learn: massive memory usage on large messages
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4346
------- Additional Comments From cmt-spamassassin@someone.dhs.org 2005-06-01 21:18 -------
Also possibly related:
I started a script to learn about 20,000 messages spread out over about 10 maildir folders. I got an
OOM in my kernel log:
=-=-=-=-=-=-=
Jun 1 19:38:12 ns1 kernel: oom-killer: gfp_mask=0x1d2
Jun 1 19:38:14 ns1 kernel: DMA per-cpu:
Jun 1 19:38:14 ns1 kernel: cpu 0 hot: low 2, high 6, batch 1
Jun 1 19:38:14 ns1 kernel: cpu 0 cold: low 0, high 2, batch 1
Jun 1 19:38:14 ns1 kernel: Normal per-cpu:
Jun 1 19:38:14 ns1 kernel: cpu 0 hot: low 32, high 96, batch 16
Jun 1 19:38:14 ns1 kernel: cpu 0 cold: low 0, high 32, batch 16
Jun 1 19:38:14 ns1 kernel: HighMem per-cpu: empty
Jun 1 19:38:14 ns1 kernel:
Jun 1 19:38:14 ns1 kernel: Free pages: 2896kB (0kB HighMem)
Jun 1 19:38:14 ns1 kernel: Active:61907 inactive:61204 dirty:0 writeback:1 unstable:0 free:724 slab:
3226 mapped:123035 pagetables:629
Jun 1 19:38:14 ns1 kernel: DMA free:1440kB min:20kB low:40kB high:60kB active:6264kB inactive:
5556kB present:16384kB
Jun 1 19:38:14 ns1 kernel: protections[]: 10 360 360
Jun 1 19:38:14 ns1 kernel: Normal free:1456kB min:700kB low:1400kB high:2100kB active:241364kB
inactive:239260kB present:507904kB
Jun 1 19:38:14 ns1 kernel: protections[]: 0 350 350
Jun 1 19:38:14 ns1 kernel: HighMem free:0kB min:128kB low:256kB high:384kB active:0kB inactive:
0kB present:0kB
Jun 1 19:38:14 ns1 kernel: protections[]: 0 0 0
Jun 1 19:38:14 ns1 kernel: DMA: 0*4kB 0*8kB 0*16kB 1*32kB 2*64kB 0*128kB 1*256kB 0*512kB
1*1024kB 0*2048kB 0*4096kB = 1440kB
Jun 1 19:38:14 ns1 kernel: Normal: 0*4kB 2*8kB 0*16kB 3*32kB 3*64kB 1*128kB 0*256kB 0*512kB
1*1024kB 0*2048kB 0*4096kB = 1456kB
Jun 1 19:38:14 ns1 kernel: HighMem: empty
Jun 1 19:38:14 ns1 kernel: Swap cache: add 361742, delete 361734, find 3350756/3380150, race 0
+0
Jun 1 19:38:14 ns1 kernel: Out of Memory: Killed process 27989 (sa-learn).
I'm re-running the script (which should skip already-learned messages) and will report if the OOM
occurs again.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4346] sa-learn: massive memory usage on large messages
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4346
------- Additional Comments From felicity@kluge.net 2005-05-19 15:44 -------
Subject: Re: sa-learn: massive memory usage on large messages
On Thu, May 19, 2005 at 03:28:38PM -0700, bugzilla-daemon@bugzilla.spamassassin.org wrote:
> you can see that's pretty suboptimal, enough rope or no.
I'm a "enough rope" type of guy. Memory use will still be high anyway
since we'll have to read the message in before noticing that it's huge.
We'll just be able to skip the extra usage/cpu/etc during parsing, etc.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4346] [review] sa-learn: massive memory usage on large messages
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4346
spamassassin@dostech.ca changed:
What |Removed |Added
----------------------------------------------------------------------------
Status Whiteboard|2 votes needed |1 votes needed
------- Additional Comments From spamassassin@dostech.ca 2005-11-08 06:00 -------
+1
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
[Bug 4346] sa-learn: massive memory usage on large messages
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4346
------- Additional Comments From felicity@kluge.net 2005-05-19 15:15 -------
Subject: Re: New: sa-learn: massive memory usage on large messages
On Thu, May 19, 2005 at 02:14:42PM -0700, bugzilla-daemon@bugzilla.spamassassin.org wrote:
> AFAICS, we don't skip super-large messages in sa-learn. (I thought we did, but
> it seems we don't!) we should, given this issue.
We don't skip them in spamassassin either. IMO, if a user wants to do it, let
them do it. Part of the "enough rope to hang yourself" mantra. :)
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4346] [review] sa-learn: massive memory usage on large messages
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4346
sidney@sidney.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status Whiteboard|1 votes needed |
------- Additional Comments From sidney@sidney.com 2005-11-08 06:17 -------
+1
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
[Bug 4346] sa-learn: massive memory usage on large messages
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4346
------- Additional Comments From jm@jmason.org 2005-05-19 15:28 -------
'We don't skip them in spamassassin either. IMO, if a user wants to do it, let
them do it. Part of the "enough rope to hang yourself" mantra.'
spamassassin is explicitly designed to provide enough rope... but most people
use spamc for scanning, which has a check for this built-in. however, there's
no such alternative for sa-learn. hence IMO sa-learn should check.
also -- sure, they can do it if they're expressly doing one, very large, message
at a time. but if you tell sa-learn to learn an entire 1000-message folder as
ham, and one of those turns out to be a massive mail message, it's not really
your fault -- especially if the only way to aovid that scenario is:
- take a backup of /path/to/folder
- mutt -f /path/to/folder
- search for very large message
- delete message
- ...repeat...
- quit
- sa-learn --ham /path/to/folder
- restore backup of /path/to/folder
you can see that's pretty suboptimal, enough rope or no.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4346] [review] sa-learn: massive memory usage on large messages
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4346
sidney@sidney.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
------- Additional Comments From sidney@sidney.com 2005-11-08 06:20 -------
Committed revision 331684.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
[Bug 4346] [review] sa-learn: massive memory usage on large messages
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4346
jm@jmason.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dev@spamassassin.apache.org
------- Additional Comments From jm@jmason.org 2005-11-07 23:44 -------
re-adding dev cc
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
[Bug 4346] sa-learn: massive memory usage on large messages
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4346
------- Additional Comments From jm@jmason.org 2005-05-19 14:15 -------
should we try to do something about this in 3.1.x? comments?
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4346] sa-learn: massive memory usage on large messages
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4346
------- Additional Comments From Bob@Menschel.net 2005-05-22 00:56 -------
Possibly related: I started testing viable table obfuscation rules in mid April,
and with that was able to identify about 3k bounced spam that hadn't been
identified otherwise. I moved them to my spam corpus, and then made the mistake
of trying to feed 3k messages in one mbx file into sa-learn -- it brought the
server to its knees.
Give me enough rope and I'll learn to jump, err skip, err avoid such problems,
but it'd be nice to protect users against similar types of operational errors.
Would it be useful/helpful for sa-learn to obtain the size of its input file
first, before reading the file, and if the file is larger than a given threshold
(tbd), either avoid reading the file, or modify its processing somehow to avoid
resource problems?
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.