SA Bugzilla – Bug 5425
check() function fails to return, no error generated
Last modified: 2013-01-20 17:33:43 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.
Created attachment 3910 [details] E-mail that causes the problem
Created attachment 3911 [details] Debug log from SpamAssassin
Failed to mention-- this is 3.2.0-pre2 (not the latest devel version)
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.
The plugin ixhash will not reliably work on Windows, as it uses alarm/signals for its timeouts.
(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?)
Created attachment 3912 [details] Debug log with just basic rules and 70_sare_obfu (the cause)
Its most likely a bad rule.
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.
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.
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.
Created attachment 3917 [details] The rules that cause the problem
this needs to be retested against trunk, now that bug 5717 is fixed; it may fix it.
considered long since resolved.