You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Mark Martinec <Ma...@ijs.si> on 2009/04/10 13:56:21 UTC
Re: Segfault on message
Giampaolo,
> 3.2.4 here.
> This message:
> http://www.spamcop.net/sc?id=z2777168254z0fdfee4493414fc9bde77b85d4d93f01z
> ;action=display
>
> yields this:
> kernel: amavisd[nnn]: segfault at bf5eae7c ip 081162a5 sp bf5eae80
> error 6 in perl5.8.8[8048000+110000]
> A segfault also happens when directly running the message through SA\
> with -D
> In -D mode, the output lines right before the segfault are:
>
> [9632] dbg: check: running tests for priority: 500
[...]
> [9632] dbg: rules: running rawbody tests; score so far=2.451
> [9632] dbg: rules: compiled rawbody tests
> --- segfault here ---
Seems it crashes during exacution of compiled rawbody tests at priority 500.
> Any clue why?
>
> Please note that the line endings you see in the message are the way they
> are in the original one. Maybe this is the reason of the fault?
> I got a couple of these messages in my MX queue and I had to delete them.
My suspect is a runaway regexp on long and nested HTML lables
with no paragraph breaks. See:
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5486
A workaround is in 3.3:
r629888 | mmartinec | 2008-02-21 18:43:43 +0100 (Thu, 21 Feb 2008) | 1 line
New sub Message::split_into_array_of_short_lines to nicely split a text into
array of paragraph chunks of sizes between 1 kB and 2 kB; bugs: 5717, 5644,
5795, 5486, 5801, 5041
The easiest is to install 3.3 from CVS:
perl Makefile.PL; make; make test; make install
sa-update
amavisd reload
or for a patch to 3.2.5 see:
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5717
comment #11
Mark
Re: Segfault on message
Posted by Mark Martinec <Ma...@ijs.si>.
> Perl just doesn't segfault normally, even when a regex is
> (too) complex.
Wishful thinking. s/normally/usually/
The rules that come with SpamAssassin are resonably safe from
exploding - unlike some third party or home-grown rules.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=4570
http://www.nntp.perl.org/group/perl.perl5.porters/2008/01/msg133347.html
http://www.mail-archive.com/perl5-porters@perl.org/msg87479.html
http://marc.info/?l=perl5-porters&m=116253514327063&w=2
http://www.perlmonks.org/?node_id=540307
Mark
RE: Segfault on message
Posted by Giampaolo Tomassoni <Gi...@Tomassoni.biz>.
> -----Original Message-----
> From: Mark [mailto:admin@asarian-host.net]
> Sent: Friday, April 10, 2009 3:02 PM
> To: users@spamassassin.apache.org
> Subject: RE: Segfault on message
>
> -----Original Message-----
> From: Giampaolo Tomassoni [mailto:g.tomassoni@libero.it]
> Sent: vrijdag 10 april 2009 14:46
> To: users@spamassassin.apache.org
> Subject: RE: Segfault on message
>
> > No, I actually I'm not comfortable installing SA 3.3 on a production
> > server.
> >
> > I'll try to pick and silence the rule regexp causing this.
>
> That doesn't seem like a good solution. On my SA 3.2.5, as stated,
> there's
> no segfault of any kind with that message. Honestly, just fix your Perl
> already .:) Perl just doesn't segfault normally, even when a regex is
> (too) complex.
No, not Perl itself, but it may because of a .so module which causes this.
I have to get closer to the fault cause in order to detect the problem.
I'm going to.
Thanks,
Giampaolo
> - Mark
RE: Segfault on message
Posted by Mark <ad...@asarian-host.net>.
-----Original Message-----
From: Giampaolo Tomassoni [mailto:g.tomassoni@libero.it]
Sent: vrijdag 10 april 2009 14:46
To: users@spamassassin.apache.org
Subject: RE: Segfault on message
> No, I actually I'm not comfortable installing SA 3.3 on a production
> server.
>
> I'll try to pick and silence the rule regexp causing this.
That doesn't seem like a good solution. On my SA 3.2.5, as stated, there's
no segfault of any kind with that message. Honestly, just fix your Perl
already .:) Perl just doesn't segfault normally, even when a regex is
(too) complex.
- Mark
RE: Segfault on message
Posted by Giampaolo Tomassoni <g....@libero.it>.
> -----Original Message-----
> From: Mark Martinec [mailto:Mark.Martinec+sa@ijs.si]
> Sent: Friday, April 10, 2009 1:56 PM
>
> ...omissis...
>
>
> > Any clue why?
> >
> > Please note that the line endings you see in the message are the way
> they
> > are in the original one. Maybe this is the reason of the fault?
> > I got a couple of these messages in my MX queue and I had to delete
> them.
>
> My suspect is a runaway regexp on long and nested HTML lables
> with no paragraph breaks. See:
> https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5486
Mmm, maybe the rule we spoke about some days ago (the one about "colored-in
table attack") could be the cause: it is ages I don't see a segfault from
SA.
> A workaround is in 3.3:
>
> r629888 | mmartinec | 2008-02-21 18:43:43 +0100 (Thu, 21 Feb 2008) |
> 1 line
> New sub Message::split_into_array_of_short_lines to nicely split a
> text into
> array of paragraph chunks of sizes between 1 kB and 2 kB; bugs: 5717,
> 5644,
> 5795, 5486, 5801, 5041
>
> The easiest is to install 3.3 from CVS:
> perl Makefile.PL; make; make test; make install
> sa-update
> amavisd reload
>
> or for a patch to 3.2.5 see:
> https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5717
> comment #11
No, I actually I'm not comfortable installing SA 3.3 on a production server.
I'll try to pick and silence the rule regexp causing this.
Thank you Mark for your hints.
Giampaolo
>
>
> Mark