Bug 5425 - check() function fails to return, no error generated
Summary: check() function fails to return, no error generated
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Libraries (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: Other Windows XP
: P5 critical
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on: 5717
Blocks:
  Show dependency tree
 
Reported: 2007-04-18 10:33 UTC by Bret Miller
Modified: 2013-01-20 17:33 UTC (History)
1 user (show)



Attachment Type Modified Status Actions Submitter/CLA Status
E-mail that causes the problem message/rfc822 None Bret Miller [NoCLA]
Debug log from SpamAssassin text/plain None Bret Miller [NoCLA]
Debug log with just basic rules and 70_sare_obfu (the cause) text/plain None Bret Miller [NoCLA]
The rules that cause the problem text/plain None Bret Miller [NoCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Bret Miller 2007-04-18 10:33:12 UTC
CGPSA (3rd party integration piece) calls the SpamAssassin check() function, and
it fails to return (just exits the program). No error messages are generated.
Calling the spamassassin command line tool works on the same message on the same
computer. Will attach debug log and message that causes this to happen.
Comment 1 Bret Miller 2007-04-18 10:34:33 UTC
Created attachment 3910 [details]
E-mail that causes the problem
Comment 2 Bret Miller 2007-04-18 10:35:24 UTC
Created attachment 3911 [details]
Debug log from SpamAssassin
Comment 3 Bret Miller 2007-04-18 10:36:25 UTC
Failed to mention-- this is 3.2.0-pre2 (not the latest devel version)
Comment 4 Justin Mason 2007-04-18 10:41:19 UTC
odd. it doesn't even get to the priority 0 rules.

Could you try narrowing down the installed rulesets?  I bet one of them --
probably a complex plugin network rule -- is calling "exit" where it shouldn't.
Comment 5 Matthew Wilson 2007-04-18 11:05:53 UTC
The plugin ixhash will not reliably work on Windows, as it uses alarm/signals
for its timeouts.
Comment 6 Bret Miller 2007-04-18 12:43:20 UTC
(In reply to comment #4)

I narrowed down the rulesets, removing all and working back. With all optional
rules removed, and even a lot of the default plugins disabled, 70_sare_obfu
seems to be the rule set causing the issue. I can put everything else back and
it runs fine (at least with this test message). Still, I shouldn't think a rule
should be able to kill SA like this...

I will upload the debug log from the test with just the supplied set and
70_sare_obfu to see if that gives any more clues. (Less is more?)
Comment 7 Bret Miller 2007-04-18 12:44:29 UTC
Created attachment 3912 [details]
Debug log with just basic rules and 70_sare_obfu (the cause)
Comment 8 Michael Parker 2007-04-18 12:46:26 UTC
Its most likely a bad rule.
Comment 9 Loren Wilton 2007-04-18 22:03:21 UTC
I seem to recall that a recent masscheck on the obfu rules worked on a number 
of systems and spewed hundreds of errors on two systems.  It looked like it had 
something to do with regexes containing high bit characters like "\xAB" or 
similar.  Why it would fail on a few systems and work fine on many others 
wasn't clear to me.  I suspect something like the setting of the LANG 
environment variable.

A lint should certainly indicate if this is happening on the system in question.
Comment 10 Justin Mason 2007-04-19 02:18:46 UTC
The high-bit warnings cannot bring down an entire perl interpreter; that's not it.

can you reduce it down to a specific rule, or small number of rules? 
Identifying smallest unit that crashes, would be helpful.

I suspect it's a recursive rule containing lots of /(?:foo(?:bar)*)*/ groupings,
which recurses too deep for the perl interpreter stack on win32.  that can cause
out-of-memory errors iirc.  if you can figure out which rule it is, we can (a)
get the rule fixed (b) investigate if there's a way to trap that failure safely
in SA.
Comment 11 Bret Miller 2007-04-19 07:24:45 UTC
I don't get any errors or warnings that would indicate a problem with the 
rules. However, I was able to narrow it down to a specific set of 4 rawbody 
rules, so I'll attach those for your perusal.
Comment 12 Bret Miller 2007-04-19 07:25:38 UTC
Created attachment 3917 [details]
The rules that cause the problem
Comment 13 Justin Mason 2008-03-19 05:05:18 UTC
this needs to be retested against trunk, now that bug 5717 is fixed; it may fix it.
Comment 14 Kevin A. McGrail 2013-01-20 17:33:43 UTC
considered long since resolved.