SA Bugzilla – Bug 820
uncancelled alarm kills spamd
Last modified: 2002-09-04 20:45:42 UTC
From Brad <lists@anomie.yi.org> in Debian bug 154055: Mail/SpamAssassin/Reporter.pm, at line 108, starts an alarm just after setting a SIG_ALRM handler inside an eval. At the end of this eval (line 121), it calls alarm(0) to deactivate the alarm if it hadn't fired yet. Only one problem, at line 111 it can call die. This exits the eval, and resets the default SIG_ALRM handler, but doesn't turn off the pending alarm. So, a few seconds later, spamd exits with an error "Alarm clock". I've taken his patch and extended to cover other cases of the bug, and included razor2 support.
Created attachment 297 [details] Patch
I'd commit, but I'd like someone to review this to make sure this makes sense. I'm a little tired right now :-)
looks good to me, applied.
Subject: Re: [SAdev] uncancelled alarm kills spamd On Tue, Sep 03, 2002 at 09:03:07PM -0700, bugzilla-daemon@hughes-family.org wrote: > I'd commit, but I'd like someone to review this to make sure this makes sense. > I'm a little tired right now :-) Maybe I missed something, but didn't I fix this in July? http://www.hughes-family.org/bugzilla/show_bug.cgi?id=446 There's already an extra "alarm 0" after the eval statement in case a die was received during the eval and the alarm was missed.
Subject: Re: uncancelled alarm kills spamd Perhaps; I wasn't around in July! Hmm... damn, you're right :-) Anyways, could someone slightly better than me at CVS please back out that patch. The only fix that is necessary (IMO) is an "alarm 0;" at 214 in Reporter.pm
Subject: Re: [SAdev] uncancelled alarm kills spamd On Wed, Sep 04, 2002 at 11:44:39AM -0700, bugzilla-daemon@hughes-family.org wrote: > Anyways, could someone slightly better than me at CVS please back out > that patch. The only fix that is necessary (IMO) is an "alarm 0;" at > 214 in Reporter.pm Yeah, it looks like some chunks of my Razor2 patches either didn't make it into CVS or got chopped out when splitting Razor1 and Razor2 checks, that's why this alarm issue and the debugging issue I submitted a patch for yesterday were necessary. :(
BTW, I like the approach anyway, so I'll leave it in for paranoia. it shouldn't make any difference either way, but this way's a little more paranoid.