Your message dated Sat, 5 Mar 2011 10:44:03 -0800
with message-id <[email protected]>
and subject line 
has caused the Debian Bug report #588243,
regarding /etc/cron.daily/spamassassin may randomly terminate prematurely
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
588243: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588243
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: spamassassin
Version: 3.2.5-2+lenny2
Severity: normal
Tags: patch


The cron script for spamassassin (that may run sa-update) can randomly
exit before doing anything.

The problem is the combination of "set -e" at the top of the script and
a call to expr(1) further down:

     9  set -e

    ...

    26  number=`expr $number "%" $RANGE`

If $number just happens to be a multiple of $RANGE, then "expr" will print
out "0" (no problem), but it will _exit_ with status 1. Since the "-e" flag
was set earlier, the script will terminate at this point.

The man page for expr(1) actually mentions this behaviour:

  Exit status is 0 if EXPRESSION is neither null nor 0, 1  if  EXPRESSION
  is  null  or  0,  2 if EXPRESSION is syntactically invalid, and 3 if an
  error occurred.

To fix this, either remove the "set -e", or fix the expr(1) line:

    26  if number=`expr $number "%" $RANGE`
    27  then
    28      sleep $number
    29  fi

Or make sure you sleep at least one second:

    26  number=`expr $number "%" $RANGE + 1`

Personally, I'd just remove the "set -e":

Cheers,
Steven

-- System Information:
Debian Release: 5.0.5
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages spamassassin depends on:
ii  libdigest-sha1-perl      2.11-2+b1       NIST SHA-1 message digest algorith
ii  libhtml-parser-perl      3.56-1+lenny1   A collection of modules that parse
ii  libnet-dns-perl          0.63-2          Perform DNS queries from a Perl sc
ii  libsocket6-perl          0.20-1          Perl extensions for IPv6
ii  libsys-hostname-long-per 1.4-2           Figure out the long (fully-qualifi
ii  libwww-perl              5.813-1         WWW client/server library for Perl
ii  perl                     5.10.0-19lenny2 Larry Wall's Practical Extraction 
ii  perl-modules [libarchive 5.10.0-19lenny2 Core Perl modules

Versions of packages spamassassin recommends:
ii  gcc                       4:4.3.2-2      The GNU C compiler
ii  gnupg                     1.4.9-3+lenny1 GNU privacy guard - a free PGP rep
ii  libc6-dev                 2.7-18lenny4   GNU C Library: Development Librari
ii  libio-socket-inet6-perl   2.54-1         Object interface for AF_INET6 doma
ii  libmail-spf-perl          2.005-1        Perl implementation of Sender Poli
ii  libsys-syslog-perl        0.26-1         Perl interface to the UNIX syslog(
ii  make                      3.81-5         The GNU version of the "make" util
ii  re2c                      0.13.5-1       tool for generating fast C-based r
ii  spamc                     3.2.5-2+lenny2 Client for SpamAssassin spam filte

Versions of packages spamassassin suggests:
ii  libcompress-zlib-p 2.012-1               Perl module for creation and manip
ii  libdbi-perl        1.605-1               Perl5 database interface by Tim Bu
pn  libio-socket-ssl-p <none>                (no description available)
pn  libmail-dkim-perl  <none>                (no description available)
pn  libnet-ident-perl  <none>                (no description available)
ii  pyzor              1:0.4.0+cvs20030201-8 spam-catcher using a collaborative
ii  razor              1:2.85-1              spam-catcher using a collaborative

-- no debconf information
Personally, I'd just remove the "set -e" or add the 1 second, so you sleep
at least 1 second.

--- begin patch ---

--- spamassassin.orig   2010-07-06 14:14:12.000000000 +0200
+++ spamassassin    2010-07-06 14:17:03.000000000 +0200
@@ -6,8 +6,6 @@
 # Daily cronjob for SpamAssassin updates. This isn't pretty but it
 # should do the job.
 
-set -e
-
 CRON=1

 test -f /etc/default/spamassassin && . /etc/default/spamassassin

--- end patch ---

asdf

--- End Message ---
--- Begin Message ---
This problem is no longer present as of (I believe) 3.3.0-1



--- End Message ---

Reply via email to