nasty bug in SA.pm (I think NOT)
Jeff A. Earickson
jaearick at colby.edu
Sat Aug 12 01:58:57 IST 2006
Julian,
I need those brain cells back that I killed off in college drinking
games. Once I made myself a copy of SA.pm with no comments in it,
the curly brackets lined up like I would expect.
I will continue attempting to corner this bug via syslog info msgs
from the main bin/MailScanner code. Nevermind...
Jeff Earickson
Colby College
On Fri, 11 Aug 2006, Jeff A. Earickson wrote:
> Date: Fri, 11 Aug 2006 16:15:59 -0400 (EDT)
> From: Jeff A. Earickson <jaearick at colby.edu>
> Reply-To: MailScanner discussion <mailscanner at lists.mailscanner.info>
> To: MailScanner discussion <mailscanner at lists.mailscanner.info>
> Subject: Re: nasty bug in SA.pm (I think)
>
> Julian,
>
> More input (late on a Friday afternoon)...
>
> I can't find the closing bracket for "sub SAForkAndTest {" (line 722)
> either. I notice another commented-out if at line whose curly
> bracket marries up with the closing bracket for SAForkAndTest at line
> 955. Methinks that multiple commented-out if brackets hid this bug
> well....
>
> Jeff Earickson
> Colby College
>
> On Fri, 11 Aug 2006, Jeff A. Earickson wrote:
>
>> Date: Fri, 11 Aug 2006 16:00:53 -0400 (EDT)
>> From: Jeff A. Earickson <jaearick at colby.edu>
>> Reply-To: MailScanner discussion <mailscanner at lists.mailscanner.info>
>> To: mailscanner mailing list <mailscanner at lists.mailscanner.info>
>> Subject: nasty bug in SA.pm (I think)
>>
>> Julian,
>>
>> I've been intermittantly chasing this bug for several releases now,
>> and I think that I may have it cornered. The problem: if I start
>> MS with my /etc/init.d script, MS just loops and does nothing. If
>> I start it via /opt/MailScanner/bin/check_mailscanner from cron,
>> MailScanner works.
>>
>> The syslog output for a loop up looks like:
>>
>> MailScanner[25980]: MailScanner E-Mail Virus Scanner version 4.55.10
>> starting...
>> MailScanner[25980]: Read 748 hostnames from the phishing whitelist
>> MailScanner[25980]: Config: calling custom init function IPBlock
>> MailScanner[25980]: Initialising IP blocking
>> MailScanner[25980]: Read 128 IP blocking entries from
>> /etc/MailScanner/IPBlock.conf
>> MailScanner[25980]: Using SpamAssassin results cache
>> MailScanner[25980]: Connected to SpamAssassin cache database
>> (repeat ad nauseum)
>>
>> So I started putting in info syslog messages into lib/MailScanner/SA.pm
>> after the "cache database" message to trace what happened. Attached
>> is my modified version of SA.pm. I never get anything after the info
>> msg "got to here3".
>>
>> So I stared at SA.pm. You commented out line 287:
>>
>> #if (MailScanner::Config::Value('compilespamassassinonce')) {
>>
>> at some point, which commented out half of a curly-bracket block.
>> I can't find where the right curly-bracket for this line is, and I
>> think something is mis-aligned here.
>>
>> Using the power feature of vi whereby you put the cursor over a
>> bracket, paren, etc and then hit "%", I don't find the closing curly
>> bracket for line 72 ("sub initialise {"). This routine seems
>> mangled and I think this is the root cause of the loop-up bug.
>> But I can't figure out where the closing bracket for line 287 might be.
>> Have I found this loopup bug in the mangled bracketing of initialise???
>>
>> Jeff Earickson
>> Colby College
> --
> MailScanner mailing list
> mailscanner at lists.mailscanner.info
> http://lists.mailscanner.info/mailman/listinfo/mailscanner
>
> Before posting, read http://wiki.mailscanner.info/posting
>
> Support MailScanner development - buy the book off the website!
More information about the MailScanner
mailing list