You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2006/05/23 01:03:42 UTC

[Bug 4906] New: Uninitialized $score in PerMsgStatus::_handle_hit

http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4906

           Summary: Uninitialized $score in PerMsgStatus::_handle_hit
           Product: Spamassassin
           Version: 3.1.1
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P5
         Component: spamc/spamd
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: shiva@sewingwitch.com


I'm seeing several uninitialized value errors in maillog which seem to center on
$score not getting set for some rules. This happens when some messages are
passed through spamc/spamd, but no error is reported when the message is passed
through spamassassin. I don't see it on my own account with a non-empty
user_prefs but I do see it with other users with the default (comments-only)
user_prefs, and I see it on mine if I rename mine to user_prefs.disabled. I'll
attach a sample message that triggers it.

Here's the list of errors I see when this happens:

Use of uninitialized value in addition (+) at
/usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/PerMsgStatus.pm line 2708.
Use of uninitialized value in numeric ge (>=) at
/usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/PerMsgStatus.pm line 2713.
Use of uninitialized value in numeric le (<=) at
/usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/PerMsgStatus.pm line 2713.
Use of uninitialized value in sprintf at
/usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/PerMsgStatus.pm line 2717.
Use of uninitialized value in numeric eq (==) at
/usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/Plugin/AWL.pm line 341.
Use of uninitialized value in numeric eq (==) at
/usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/PerMsgStatus.pm line 432.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4906] Uninitialized $score in PerMsgStatus::_handle_hit

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4906





------- Additional Comments From shiva@sewingwitch.com  2006-05-23 18:40 -------
Ok, here's a clue. In /etc/mail/spamassassin/locals.cf I have "allow_user_rules
1". In my userprefs I have this rule:

header    __MIME_VERSION           exists:MIME-Version
header    __SARE_HEAD_MIME_VALID   Mime-Version =~ m'^\s*1.0\b'
meta      SARE_HEAD_MIME_INVALID   !__SARE_HEAD_MIME_VALID && __MIME_VERSION
describe  SARE_HEAD_MIME_INVALID   Invalid mime version
score     SARE_HEAD_MIME_INVALID   1.666

If I run spamc on a test message (not the one above, which isn't triggering
today), I get the error running as a different user (who has no custom rules)
but I don't get it running it from my account. The debug "printf" indicates this
rule as lacking the score.

if (!defined $score) { warn "HELP undef score for rule $rule"; }


Theory: Does spamd handle user rules inconsistently, loading "other" users'
personal rules but not scores? How are per-user rules handled by the daemon?



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4906] Uninitialized $score in PerMsgStatus::_handle_hit

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4906





------- Additional Comments From felicity@apache.org  2006-05-23 01:41 -------
(In reply to comment #3)
> No joy. I applied the patch to Timeout.pm and spamd and restarted the daemon and
> still get the same error messages.

hrm.  can you describe your SA setup a bit more?  are there any non-standard patches applied?  non-
standard plugins?

using the standard code, there's no way for a rule to get in without a score.  the copy_config issue can 
cause it because it corrupts the config.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4906] Uninitialized $score in PerMsgStatus::_handle_hit

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4906





------- Additional Comments From felicity@apache.org  2006-05-22 23:13 -------
This is one of those "can't ever happen" (without something crazy going on) issues.  But it looks like this is 
probably the same as bug 4699.  Can you try out the current test 3.1.2 or the patch as found in that 
ticket?



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4906] Uninitialized $score in PerMsgStatus::_handle_hit

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4906





------- Additional Comments From shiva@sewingwitch.com  2006-05-24 18:36 -------
My suspicion is that spamd is not clearing the config completely between users
when allow_user_rules is set, and the rules, but not the scores, are surviving
between users. (I use my own account as a testbed for rules before deploying
them system-wide for the handful of other users on the server.)

I'm finding it tough to find the code that dumps the old config after processing.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4906] Uninitialized $score in PerMsgStatus::_handle_hit

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4906





------- Additional Comments From shiva@sewingwitch.com  2006-05-23 13:29 -------
Stock RPM built from the tarball. No special plugins. A couple of custom system
rules for the float obfuscation spam but they have scores.

What's the Perl syntax for sending a line to syslog if $score is undefined?
Given that I can sprinkle some "printfs" through that path to trace where this
is coming from. My sample triggers the problem solidly on my setup.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4906] Uninitialized $score in PerMsgStatus::_handle_hit

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4906





------- Additional Comments From spamassassin@dostech.ca  2006-05-26 00:55 -------
I'm not completely clear about how often, or under what exact circumstances and
config, you're seeing this but you're probably seeing bug 4179.

The last time I tested bug 4179 out, though, two users had to be using the same
rule name(s) to see any wierd config issues. 



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4906] Uninitialized $score in PerMsgStatus::_handle_hit

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4906





------- Additional Comments From shiva@sewingwitch.com  2006-05-23 18:44 -------
Correction, the original test case works, just not when I test as root. Testing
as a mortal other than me elicits the bug.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4906] Uninitialized $score in PerMsgStatus::_handle_hit

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4906


jm@jmason.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From jm@jmason.org  2007-04-16 05:23 -------
assuming this is fixed; feel free to reopen if it still happens in 3.2.0 ;)



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4906] Uninitialized $score in PerMsgStatus::_handle_hit

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4906





------- Additional Comments From shiva@sewingwitch.com  2006-05-23 00:54 -------
No joy. I applied the patch to Timeout.pm and spamd and restarted the daemon and
still get the same error messages.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4906] Uninitialized $score in PerMsgStatus::_handle_hit

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4906





------- Additional Comments From jm@jmason.org  2006-07-12 15:26 -------
I think this may be fixed in svn trunk.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4906] Uninitialized $score in PerMsgStatus::_handle_hit

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4906





------- Additional Comments From shiva@sewingwitch.com  2006-05-22 23:06 -------
Created an attachment (id=3519)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=3519&action=view)
Sample spam for triggering the error message




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4906] Uninitialized $score in PerMsgStatus::_handle_hit

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4906





------- Additional Comments From jm@jmason.org  2006-05-23 14:20 -------
if (!defined $score) { warn "HELP undef score"; }

that's what you're after.  curious!



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.