You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Dan Barker <db...@visioncomm.net> on 2008/12/01 21:42:05 UTC

Auto-whitelist not closing file

This issue, apparently, has been a problem for me for several Spamassassin
releases, but I just now figured out what may be happening. I've been
closing spamd once per hour, just to make it read new local.cf, notice
sa-update changes, etc., but occasionally my system can't start new tasks
(usually error 0xC0000142, very occasionally 0xC0000005 - This is under
Windoze, W2K Server/SP4). Closing/Opening spamd also forces closed all the
file handles spamd appears to be abandoning un-closed.

I'm currently running SpamAssassin 3.2.5 under Activestate perl 5.8.8.822.

It appears that spamd fails to close the file handle to bayes_seen or
auto-whitelist when it's done with it.

spamd -x -D, filtered on "auto-whitelist" shows:

--- 9 line(2) not displayed ---
[1504] dbg: auto-whitelist: DB addr list: untie-ing and unlocking
[1504] dbg: auto-whitelist: DB addr list: file locked, breaking lock
[1504] dbg: locker: safe_unlock: unlink C:\Documents and
Settings\dbarker/.spamassassin/auto-whitelist.lock
--- 370 line(2) not displayed ---
[1504] dbg: auto-whitelist: DB addr list: untie-ing and unlocking
[1504] dbg: auto-whitelist: DB addr list: file locked, breaking lock
[1504] dbg: locker: safe_unlock: unlink C:\Documents and
Settings\dbarker/.spamassassin/auto-whitelist.lock 
--- 37 line(2) not displayed ---

Process Explorer (from SysInternals-Great tool!) shows the file handle to
C:\Documents and Settings\dbarker\.spamassassin\auto-whitelist remains open
even after spamd is finished and remains so until spamd is closed. This
occurs both for auto-whitelist and bayes_seen files.

How do I go about trapping this error in locker? (Specifically, how do I
figure out who Called locker, to find the code that's not closing the file
it opened?)

Has anyone else run into this sort of issue?

Dan Barker

Note: This is a re-post from 28 Nov 2008 10:14:40 -0500. Is there an
etiquette for thinking something got overlooked over the holidays, or am I
just being pushy?


Re: Auto-whitelist not closing file

Posted by Theo Van Dinter <fe...@apache.org>.
On Mon, Dec 01, 2008 at 03:42:05PM -0500, Dan Barker wrote:
> How do I go about trapping this error in locker? (Specifically, how do I
> figure out who Called locker, to find the code that's not closing the file
> it opened?)
> 
> Has anyone else run into this sort of issue?

The last time this sort of issue came up, it was traced back to a bug in
DB_File.  Specifically, the untie call would actually not let go of the DB.
SA doesn't actually open the database files itself, it lets tie/untie
(DB_File) deal with it.

-- 
Randomly Selected Tagline:
"It is our job to protect the magic smoke ..."      - Prof. Michaelson