You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by snowcrash+sa <sc...@gmail.com> on 2007/09/19 17:34:47 UTC

(old?) sa hang @ "bayes: can't use estimation method for expiry"

Hi,

I'm updating SA & exploring/cleaning Bayes DBs on a slighty 'dusty' box.

after update to latest SA 32x-branch, --lint is OK.

but, currently, i get:

sa-learn --force-expire -D
	...
	[19416] dbg: bayes: found bayes db version 3
	[19416] dbg: bayes: opportunistic call attempt skipped, found fresh
running expire magic token
	[19416] dbg: config: score set 3 chosen.
	[19416] dbg: learn: initializing learner
	[19416] dbg: bayes: bayes journal sync starting
	[19416] dbg: bayes: bayes journal sync completed
	[19416] dbg: bayes: expiry starting
	[19416] dbg: locker: safe_lock: created /etc/sa/local/.spamassassin/bayes.mutex
	[19416] dbg: locker: safe_lock: trying to get lock on
/etc/sa/local/.spamassassin/bayes with 300 timeout
	[19416] dbg: locker: safe_lock: link to
/etc/sa/local/.spamassassin/bayes.mutex: link ok
	[19416] dbg: bayes: tie-ing to DB file R/W
/etc/sa/local/.spamassassin/bayes_toks
	[19416] dbg: bayes: tie-ing to DB file R/W
/etc/sa/local/.spamassassin/bayes_seen
	[19416] dbg: bayes: found bayes db version 3
	[19416] dbg: locker: refresh_lock: refresh
/etc/sa/local/.spamassassin/bayes.mutex
	[19416] dbg: bayes: expiry check keep size, 0.75 * max: 112500
	[19416] dbg: bayes: token count: 218650, final goal reduction size: 106150
	[19416] dbg: bayes: first pass? current: 1190215099, Last:
1110223381, atime: 1261902, count: 28215, newdelta: 335417, ratio:
3.76218323586745, period: 43200
	[19416] dbg: bayes: can't use estimation method for expiry,
unexpected result, calculating optimal atime delta (first pass)
	[19416] dbg: bayes: expiry max exponent: 9

where it just 'sits' for awhile -- no errors in logs -- and,
eventually, 'releases' and completes without error.

this only seems to happen an unquantified "some of the time" ...
sometimes (as moments ago) repeating the process results in no such
hand/delay.

fyi,

 grep -i bayes local.cf
  use_bayes                  1
  use_bayes_rules            1
  bayes_auto_learn           1
  bayes_min_ham_num          200
  bayes_min_spam_num         200
  bayes_learn_during_report  1
  bayes_use_hapaxes          1
  bayes_journal_max_size     102400 # in bytes
  bayes_expiry_max_db_size   150000 # of tokens
  bayes_auto_expire          1
  bayes_learn_to_journal     1
  bayes_path                 /etc/sa/local/.spamassassin/bayes
  bayes_auto_learn_threshold_nonspam      1.0
  bayes_auto_learn_threshold_spam         6.0

and,

 cd /etc/sa/.spamassassin
 ls -al
  total 36024
  drwxrwxr-x 10 sa   sa      340 2007-09-19 08:22 .
  drwxrwxr-x 39 sa   sa     1326 2007-09-19 06:59 ..
  -rw-rw----  1 sa   sa    90112 2007-09-19 08:23 auto-whitelist
  -rw-rw----  1 sa   sa 10244096 2007-06-28 07:09 auto-whitelist-old
  -rw-rw----  1 sa   sa        6 2007-09-19 08:23 auto-whitelist.mutex
  -rw-rw----  1 sa   sa       30 2007-09-19 08:21 bayes.mutex
  -rw-------  1 root sa      816 2007-09-19 08:22 bayes_journal
  -rw-rw----  1 sa   sa 20570112 2007-09-19 07:30 bayes_seen
  -rw-rw----  1 sa   sa  5488640 2007-09-19 08:21 bayes_toks

i had NOT noticed this before on this box ... not clear if it's the
build or my local.cf's bayes-related settings.  or, perms, maybe?

i've found some old thread references to

  "[19416] dbg: bayes: can't use estimation method for expiry, unexpected
   result, calculating optimal atime delta (first pass)"

but not yet a resolution ... (still loooking!)

hints?

thanks.

Re: (old?) sa hang @ "bayes: can't use estimation method for expiry"

Posted by snowcrash+sa <sc...@gmail.com>.
> Yeah, that's the expiry first pass.  As it said, it couldn't find a
> good atime delta to use for expiry, so it didn't anything.

ok, so it's "expected".  read on ...

> "man sa-learn" has a large amount of information about how all of this works.

Arguably not in normal-human-english, but, yes.

The 'trigger' for my question is the presence of "unexpected result"
in the report.

No, it doesn't SAY "error" -- but neither does the manpage literallly
address "unexpected".  It implies something outside of the norm.  I'd
suggest something  a bit clearer, especially given the existing 'old'
list-references to this *AS* an error, with nothing newer available
...

My $0.02. Thx.

Re: (old?) sa hang @ "bayes: can't use estimation method for expiry"

Posted by Theo Van Dinter <fe...@apache.org>.
On Wed, Sep 19, 2007 at 04:41:46PM -0700, snowcrash+sa wrote:
> > > where it just 'sits' for awhile -- no errors in logs -- and,
> > > eventually, 'releases' and completes without error.
> >
> > What are the messages when that happens?  It shouldn't just exit.
> 
>   [19725] dbg: bayes: can't use estimation method for expiry,
> unexpected result, calculating optimal atime delta (first pass)
> (waits here ~ 2 minutes ...)
>   [19725] dbg: bayes: expiry max exponent: 9
>   [19725] dbg: bayes: atime token reduction
>   [19725] dbg: bayes: ======== ===============
>   [19725] dbg: bayes: 43200 221166
[...]
>   [19725] dbg: bayes: 22118400 203758
>   [19725] dbg: bayes: couldn't find a good delta atime, need more
> token difference, skipping expire
>   [19725] dbg: bayes: expiry completed
>   [19725] dbg: bayes: untie-ing
>   [19725] dbg: bayes: files locked, now unlocking lock
>   [19725] dbg: locker: safe_unlock: unlocked
> tc/sa/local/.spamassassin/bayes.mutex

Yeah, that's the expiry first pass.  As it said, it couldn't find a
good atime delta to use for expiry, so it didn't anything.

"man sa-learn" has a large amount of information about how all of this works.

-- 
Randomly Selected Tagline:
"Clear with no chance of showers. Temperatures will hold steady at 68�F with
 a humidity level of 45%. There is a slight chance of short periods of
 darkness followed by frantic scurrying of labstaff personnel. Winds will be
 very calm with slight gusts from the SP2 and the Midship Wall."
         - http://www.cs.wisc.edu/csl/weather/

Re: (old?) sa hang @ "bayes: can't use estimation method for expiry"

Posted by snowcrash+sa <sc...@gmail.com>.
> > where it just 'sits' for awhile -- no errors in logs -- and,
> > eventually, 'releases' and completes without error.
>
> What are the messages when that happens?  It shouldn't just exit.

Here's a recent example,

> sa-learn --force-expire -D
  ...
  [19725] dbg: bayes: can't use estimation method for expiry,
unexpected result, calculating optimal atime delta (first pass)
(waits here ~ 2 minutes ...)
  [19725] dbg: bayes: expiry max exponent: 9
  [19725] dbg: bayes: atime token reduction
  [19725] dbg: bayes: ======== ===============
  [19725] dbg: bayes: 43200 221166
  [19725] dbg: bayes: 86400 221038
  [19725] dbg: bayes: 172800 220701
  [19725] dbg: bayes: 345600 220382
  [19725] dbg: bayes: 691200 219516
  [19725] dbg: bayes: 1382400 217516
  [19725] dbg: bayes: 2764800 215351
  [19725] dbg: bayes: 5529600 212250
  [19725] dbg: bayes: 11059200 210410
  [19725] dbg: bayes: 22118400 203758
  [19725] dbg: bayes: couldn't find a good delta atime, need more
token difference, skipping expire
  [19725] dbg: bayes: expiry completed
  [19725] dbg: bayes: untie-ing
  [19725] dbg: bayes: files locked, now unlocking lock
  [19725] dbg: locker: safe_unlock: unlocked
tc/sa/local/.spamassassin/bayes.mutex
>

Re: (old?) sa hang @ "bayes: can't use estimation method for expiry"

Posted by Theo Van Dinter <fe...@apache.org>.
On Wed, Sep 19, 2007 at 08:34:47AM -0700, snowcrash+sa wrote:
> 	[19416] dbg: bayes: expiry check keep size, 0.75 * max: 112500
> 	[19416] dbg: bayes: token count: 218650, final goal reduction size: 106150
> 	[19416] dbg: bayes: first pass? current: 1190215099, Last:
> 1110223381, atime: 1261902, count: 28215, newdelta: 335417, ratio:
> 3.76218323586745, period: 43200
> 	[19416] dbg: bayes: can't use estimation method for expiry,
> unexpected result, calculating optimal atime delta (first pass)
> 	[19416] dbg: bayes: expiry max exponent: 9
> 
> where it just 'sits' for awhile -- no errors in logs -- and,
> eventually, 'releases' and completes without error.

What are the messages when that happens?  It shouldn't just exit.

> this only seems to happen an unquantified "some of the time" ...
> sometimes (as moments ago) repeating the process results in no such
> hand/delay.

It's running the first pass.  See "man sa-learn".

-- 
Randomly Selected Tagline:
If at first you don't succeed, cry.