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 2004/07/19 23:04:23 UTC

[Bug 3620] New: SpamAssassin takes a *very* long time to process a particular message

http://bugzilla.spamassassin.org/show_bug.cgi?id=3620

           Summary: SpamAssassin takes a *very* long time to process a
                    particular message
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: major
          Priority: P5
         Component: spamassassin
        AssignedTo: spamassassin-dev@incubator.apache.org
        ReportedBy: tim@bishnet.net


I have a message which is taking way too long for spamassassin to process. On my
Solaris 9 sparc system it takes 5+ minutes to process this message, whilst it's
taking 3-5 seconds (with spamd) for every other message. It looks fairly clear
that this must be a bug, given the message seems fairly "normal" to me.

In the interests of testing I ran the message through spamassassin -t (so
cutting out spamd, and the rest of my mail system). It still took the same
length of time.

This was with 3.0.0-pre1-r21475 on perl 5.8.2.

As a useful comparison, with the same perl but spamassassin 2.63 it took a
normal length of time - a handful of seconds.

To rule out problems with the slightly old spamassassin, the slightly old perl,
and the solaris/sparc combination, I tried this:

SpamAssassin 3.0.0-pre2-r22977
Perl 5.8.4
FreeBSD 5.2.1

This time it took 40 seconds, but that was 40 seconds of maxed out 3.0Ghz
Pentium 4 power... so it equates to the same thing as the sparc, I guess.

Hopefully I've covered enough cases to help confirm the problem. Let me know if
there's anything else I can do.

Cheers,
Tim.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Re: [Bug 3620] New: SpamAssassin takes a *very* long time to process a particular message

Posted by Ryan Thompson <sp...@sasknow.com>.
First glance, it's the extremely long line of dots in the middle of the
message. I saw the same symptom using -pre2 on a beefy P4 machine
running FreeBSD (~50 seconds). Removing the long line of dots, the
message took ~3 seconds (with all network tests enabled).

Running with debug output, almost all of the delay was (not
surprisingly) within

debug: running body-text per-line regexp tests; score so far=0.246

One or more rules are taking a long time to run on that line, so I ran
with -D rulesrun=255, but that only reports on the rules that hit.
So I added some debug code to PerMsgStatus.pm for every body rule test,
and noted that DRUG_DOSAGE occupied about 95% of the total processing
time.

body DRUG_DOSAGE                m{\$? *(?:\d|\.)+ *\$? *(?:\\|/|per)
*d.?o.?s.?e}i
describe DRUG_DOSAGE            Talks about price per dose

OK, so one could see how that would be a little nasty on long lines. :-)

Workaround would be to temporarily disable this rule.

- Ryan

bugzilla-daemon@bugzilla.spamassassin.org wrote to spamassassin-dev@incubat...:

> http://bugzilla.spamassassin.org/show_bug.cgi?id=3620
> 
>           Summary: SpamAssassin takes a *very* long time to process a
>                    particular message
>           Product: Spamassassin
>           Version: SVN Trunk (Latest Devel Version)
>          Platform: Sun
>        OS/Version: Solaris
>            Status: NEW
>          Severity: major
>          Priority: P5
>         Component: spamassassin
>        AssignedTo: spamassassin-dev@incubator.apache.org
>        ReportedBy: tim@bishnet.net
> 
> 
> I have a message which is taking way too long for spamassassin to process. On
> my
> Solaris 9 sparc system it takes 5+ minutes to process this message, whilst
> it's
> taking 3-5 seconds (with spamd) for every other message. It looks fairly clear
> that this must be a bug, given the message seems fairly "normal" to me.
> 
> In the interests of testing I ran the message through spamassassin -t (so
> cutting out spamd, and the rest of my mail system). It still took the same
> length of time.
> 
> This was with 3.0.0-pre1-r21475 on perl 5.8.2.
> 
> As a useful comparison, with the same perl but spamassassin 2.63 it took a
> normal length of time - a handful of seconds.
> 
> To rule out problems with the slightly old spamassassin, the slightly old
> perl,
> and the solaris/sparc combination, I tried this:
> 
> SpamAssassin 3.0.0-pre2-r22977
> Perl 5.8.4
> FreeBSD 5.2.1
> 
> This time it took 40 seconds, but that was 40 seconds of maxed out 3.0Ghz
> Pentium 4 power... so it equates to the same thing as the sparc, I guess.
> 
> Hopefully I've covered enough cases to help confirm the problem. Let me know
> if
> there's anything else I can do.
> 
> Cheers,
> Tim.
> 
> 
> 
> ------- You are receiving this mail because: -------
> You are the assignee for the bug, or are watching the assignee.
> 



-- 
  Ryan Thompson <ry...@sasknow.com>

  SaskNow Technologies - http://www.sasknow.com
  901-1st Avenue North - Saskatoon, SK - S7K 1Y4

        Tel: 306-664-3600   Fax: 306-244-7037   Saskatoon
  Toll-Free: 877-727-5669     (877-SASKNOW)     North America