You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Eric Krona <ek...@itomat.se> on 2012/12/17 16:07:58 UTC
sa-update generates errors
From time to time when sa-update is running, I get errors in the output.
Like today I got:
Illegal octal digit '8' ignored at
/usr/share/perl5/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm line
1083, <$fh> line 1097.
re2c: error: line 170, column 2: unterminated string constant (missing ")
command 're2c -i -b -o scanner2.c scanner2.re' failed: exit 1
What is the reason for it, are some rules poorly written, or do I miss
some library or what could be the problem?
/eric
Re: sa-update generates errors
Posted by Mark Martinec <Ma...@ijs.si>.
On Mon, 17 Dec 2012, Mark Martinec wrote:
>>>> Illegal octal digit '8' ignored at
>>>> /usr/share/perl5/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm
>>>> line 1083
>
> This is more likely a bug 6336:
> https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6336
>
> fixed in 3.3.2.
Oops, sorry, apparently the fix never made it entirely
into the 3.3, but is in the trunk.
The following patch to SA 3.3.2 is still needed as a fix to Bug 6336:
--- BodyRuleBaseExtractor.pm.orig 2011-06-07 01:59:17.000000000 +0200
+++ BodyRuleBaseExtractor.pm 2012-12-17 20:54:09.142190372 +0100
@@ -1072,5 +1072,5 @@
}
elsif ($tok eq '\\') {
- $re =~ /\G(x\{[^\}]+\}|\d{1,3}|.)/gc or die "\\ at end of string!";
+ $re =~ /\G(x\{[^\}]+\}|[0-7]{1,3}|.)/gcs or die "\\ at end of string!";
my $esc = $1;
if ($esc eq '"') {
@@ -1078,7 +1078,7 @@
} elsif ($esc eq '\\') {
$output .= '"**BACKSLASH**"'; # avoid hairy escape-parsing
- } elsif ($esc =~ /^x\{(\S+)\}$/) {
+ } elsif ($esc =~ /^x\{(\S+)\}\z/) {
$output .= '"'.chr(hex($1)).'"';
- } elsif ($esc =~ /^\d+/) {
+ } elsif ($esc =~ /^[0-7]{1,3}\z/) {
$output .= '"'.chr(oct($esc)).'"';
} else {
Btw, the above doesn't address the Bug 6649, which is still broken.
Mark
Re: sa-update generates errors
Posted by John Hardin <jh...@impsec.org>.
On Mon, 17 Dec 2012, Mark Martinec wrote:
>>>> Illegal octal digit '8' ignored at
>>>> /usr/share/perl5/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm
>>>> line 1083
>
> This is more likely a bug 6336:
> https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6336
> fixed in 3.3.2.
Ah, I withdraw my comment that upgrading probably wouldn't fix it, then.
:)
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhardin@impsec.org FALaholic #11174 pgpk -a jhardin@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
"Bother," said Pooh as he struggled with /etc/sendmail.cf, "it never
does quite what I want. I wish Christopher Robin was here."
-- Peter da Silva in a.s.r
-----------------------------------------------------------------------
8 days until Christmas
Re: sa-update generates errors
Posted by Mark Martinec <Ma...@ijs.si>.
> >> Illegal octal digit '8' ignored at
> >> /usr/share/perl5/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm
> >> line 1083
This is more likely a bug 6336:
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6336
fixed in 3.3.2.
Mark
Re: sa-update generates errors
Posted by "Kevin A. McGrail" <KM...@PCCC.com>.
On 12/17/2012 1:24 PM, darxus@chaosreigns.com wrote:
> Can this error at least be improved to state which input file the error is
> associated with?
I'm sure it can but my opinion is that compiling rules is an efficiency
step. Most people can survive without it. I would ask you to add the
comment to the bug but it's not high on my list. I'm not saying it
isn't valid, though, and would love someone to step up and dig into it!
>
> On 12/17, Eric Krona wrote:
>> From time to time when sa-update is running, I get errors in the output.
>>
>> Like today I got:
>> Illegal octal digit '8' ignored at
>> /usr/share/perl5/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm
>> line 1083, <$fh> line 1097.
>> re2c: error: line 170, column 2: unterminated string constant (missing ")
>> command 're2c -i -b -o scanner2.c scanner2.re' failed: exit 1
>>
>> What is the reason for it, are some rules poorly written, or do I
>> miss some library or what could be the problem?
>>
>> /eric
>>
--
*Kevin A. McGrail*
President
Peregrine Computer Consultants Corporation
3927 Old Lee Highway, Suite 102-C
Fairfax, VA 22030-2422
http://www.pccc.com/
703-359-9700 x50 / 800-823-8402 (Toll-Free)
703-359-8451 (fax)
KMcGrail@PCCC.com <ma...@pccc.com>
Re: sa-update generates errors
Posted by da...@chaosreigns.com.
Can this error at least be improved to state which input file the error is
associated with?
On 12/17, Eric Krona wrote:
> From time to time when sa-update is running, I get errors in the output.
>
> Like today I got:
> Illegal octal digit '8' ignored at
> /usr/share/perl5/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm
> line 1083, <$fh> line 1097.
> re2c: error: line 170, column 2: unterminated string constant (missing ")
> command 're2c -i -b -o scanner2.c scanner2.re' failed: exit 1
>
> What is the reason for it, are some rules poorly written, or do I
> miss some library or what could be the problem?
>
> /eric
>
--
"Hermes will help you get your wagon unstuck, but only if you push on it."
- Greek Alphabet Oracle
http://www.ChaosReigns.com
Re: sa-update generates errors
Posted by "Kevin A. McGrail" <KM...@PCCC.com>.
On 12/17/2012 10:33 AM, darxus@chaosreigns.com wrote:
> Probably this known problem, bug open for over a year:
> https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6649#c19
>
> The initial comments make it sound like a simple problem of not correctly
> escaping rules containing binary data. While it is actually a much more
> complicated problem related to the same thing.
And the issue generally has crept up when handling the SOUGHT rules
which are not an official ruleset of the project. It would be nice to
fix all the bugs but this one is lower priority to me at least.
Regards,
KAm
Re: sa-update generates errors
Posted by da...@chaosreigns.com.
Probably this known problem, bug open for over a year:
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6649#c19
The initial comments make it sound like a simple problem of not correctly
escaping rules containing binary data. While it is actually a much more
complicated problem related to the same thing.
On 12/17, Eric Krona wrote:
> From time to time when sa-update is running, I get errors in the output.
>
> Like today I got:
> Illegal octal digit '8' ignored at
> /usr/share/perl5/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm
> line 1083, <$fh> line 1097.
> re2c: error: line 170, column 2: unterminated string constant (missing ")
> command 're2c -i -b -o scanner2.c scanner2.re' failed: exit 1
>
> What is the reason for it, are some rules poorly written, or do I
> miss some library or what could be the problem?
>
> /eric
>
--
"You shall know the truth, and it shall make you odd."
-- Flannery O'Connor
http://www.ChaosReigns.com
Re: sa-update generates errors
Posted by John Hardin <jh...@impsec.org>.
On Mon, 17 Dec 2012, Eric Krona wrote:
> Eric Krona skrev 2012-12-17 18:08:
>> Kevin A. McGrail skrev 2012-12-17 16:15:
>> > On 12/17/2012 10:07 AM, Eric Krona wrote:
>> > > From time to time when sa-update is running, I get errors in the
>> > > output.
>> > >
>> > > Like today I got:
>> > > Illegal octal digit '8' ignored at
>> > > /usr/share/perl5/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm
>> > > line 1083, <$fh> line 1097.
>> > > re2c: error: line 170, column 2: unterminated string constant
>> > > (missing ")
>> > > command 're2c -i -b -o scanner2.c scanner2.re' failed: exit 1
>> > >
>> > > What is the reason for it, are some rules poorly written, or do I miss
>> > > some library or what could be the problem?
>> > >
>> > > /eric
>> > Sounds like there is an error pre-compiling the rules with re2c. Are you
>> > using only the stock SA rules or do you have other channels updating?
>> >
>> > Regards,
>> > KAM
>>
>> I see, I'm using sought.rules.yerp.org and updates.spamassassin.org .
>> Perhaps theres other which are good as well?
>
> Noticed I was running 3.3.1, will try to upgrade and see if it goes away.
It's most likely a transient problem in the Sought rules. Upgrading won't
make it go away. It will either go away on its own as the Sought rules get
regenerated, or the Sought rule generator will be fixed so that it doesn't
generate the problematic REs in the first place. IIRC this has happened
before, so it's possible not all situations that generate the problematic
REs were addressed the last time.
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhardin@impsec.org FALaholic #11174 pgpk -a jhardin@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
"Bother," said Pooh as he struggled with /etc/sendmail.cf, "it never
does quite what I want. I wish Christopher Robin was here."
-- Peter da Silva in a.s.r
-----------------------------------------------------------------------
8 days until Christmas
Re: sa-update generates errors
Posted by Eric Krona <ek...@itomat.se>.
Eric Krona skrev 2012-12-17 18:08:
> Kevin A. McGrail skrev 2012-12-17 16:15:
>> On 12/17/2012 10:07 AM, Eric Krona wrote:
>>> From time to time when sa-update is running, I get errors in the output.
>>>
>>> Like today I got:
>>> Illegal octal digit '8' ignored at
>>> /usr/share/perl5/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm
>>> line 1083, <$fh> line 1097.
>>> re2c: error: line 170, column 2: unterminated string constant
>>> (missing ")
>>> command 're2c -i -b -o scanner2.c scanner2.re' failed: exit 1
>>>
>>> What is the reason for it, are some rules poorly written, or do I miss
>>> some library or what could be the problem?
>>>
>>> /eric
>> Sounds like there is an error pre-compiling the rules with re2c. Are you
>> using only the stock SA rules or do you have other channels updating?
>>
>> Regards,
>> KAM
>
> I see, I'm using sought.rules.yerp.org and updates.spamassassin.org .
> Perhaps theres other which are good as well?
>
> /eric
>
Noticed I was running 3.3.1, will try to upgrade and see if it goes away.
/eric
Re: sa-update generates errors
Posted by Eric Krona <ek...@itomat.se>.
Kevin A. McGrail skrev 2012-12-17 16:15:
> On 12/17/2012 10:07 AM, Eric Krona wrote:
>> From time to time when sa-update is running, I get errors in the output.
>>
>> Like today I got:
>> Illegal octal digit '8' ignored at
>> /usr/share/perl5/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm
>> line 1083, <$fh> line 1097.
>> re2c: error: line 170, column 2: unterminated string constant (missing ")
>> command 're2c -i -b -o scanner2.c scanner2.re' failed: exit 1
>>
>> What is the reason for it, are some rules poorly written, or do I miss
>> some library or what could be the problem?
>>
>> /eric
> Sounds like there is an error pre-compiling the rules with re2c. Are you
> using only the stock SA rules or do you have other channels updating?
>
> Regards,
> KAM
I see, I'm using sought.rules.yerp.org and updates.spamassassin.org .
Perhaps theres other which are good as well?
/eric
Re: sa-update generates errors
Posted by "Kevin A. McGrail" <KM...@PCCC.com>.
On 12/17/2012 10:07 AM, Eric Krona wrote:
> From time to time when sa-update is running, I get errors in the output.
>
> Like today I got:
> Illegal octal digit '8' ignored at
> /usr/share/perl5/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm
> line 1083, <$fh> line 1097.
> re2c: error: line 170, column 2: unterminated string constant (missing ")
> command 're2c -i -b -o scanner2.c scanner2.re' failed: exit 1
>
> What is the reason for it, are some rules poorly written, or do I miss
> some library or what could be the problem?
>
> /eric
Sounds like there is an error pre-compiling the rules with re2c. Are you
using only the stock SA rules or do you have other channels updating?
Regards,
KAM
Re: sa-update generates errors
Posted by John Hardin <jh...@impsec.org>.
On Mon, 17 Dec 2012, Eric Krona wrote:
> From time to time when sa-update is running, I get errors in the output.
>
> Like today I got:
> Illegal octal digit '8' ignored at
> /usr/share/perl5/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm line 1083,
> <$fh> line 1097.
> re2c: error: line 170, column 2: unterminated string constant (missing ")
> command 're2c -i -b -o scanner2.c scanner2.re' failed: exit 1
>
> What is the reason for it, are some rules poorly written, or do I miss some
> library or what could be the problem?
Historically this has generally happened primarily with
automatically-generated rulesets like the Sought rulesets. It tends to
correct itself as those rulesets get regenerated.
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhardin@impsec.org FALaholic #11174 pgpk -a jhardin@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
"Bother," said Pooh as he struggled with /etc/sendmail.cf, "it never
does quite what I want. I wish Christopher Robin was here."
-- Peter da Silva in a.s.r
-----------------------------------------------------------------------
8 days until Christmas