[H-GEN] SpamAssassin problem

Jason Parker-Burlingham jasonp at panix.com
Mon Jul 21 15:05:08 EDT 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

Harry Phillips <harry at tux.com.au> writes:

> "Cannot open bayes_path /home/users/harry/.spamassassin/bayes R/W: File
> Exists"
> Does anyone know what this means? Should I be concerned about it?

This message pretty frequently pops up when dealing with Berkeley DB
files and is one of the more annoying error messages you might
encounter.

If my research is correct you can find out what it means by looking at
db(3):

   ERRORS 
      The dbopen routine may fail and set errno for any of the errors
      specified for the library routines open(2) and malloc(3) or the
      following:

and open(2):

   ERRORS
      EEXIST pathname already exists and O_CREAT and O_EXCL were used.

   [...]

   O_CREAT
      If the file does not exist it will be created.  The owner (user
      ID) of the file is set to the effective user ID of the
      process. The group ownership (group ID) is set either to the
      effective group ID of the process or to the group ID of the
      parent directory (depending on filesystem type and mount
      options, and the mode of the parent directory, see, e.g., the
      mount options bsdgroups and sysvgroups of the ext2 filesystem,
      as described in mount(8)).

   O_EXCL
      When used with O_CREAT, if the file already exists it is an
      error and the open will fail.  In this context, a symbolic link
      exists, regardless of where its points to.  O_EXCL is broken on
      NFS file systems, programs which rely on it for performing lock-
      ing tasks will contain a race condition.  The solution for
      performing atomic file locking using a lockfile is to create a
      unique file on the same fs (e.g., incorporating hostname and
      pid), use link(2) to make a link to the lockfile. If link()
      returns 0, the lock is successful.  Otherwise, use stat(2) on
      the unique file to check if its link count has increased to 2,
      in which case the lock is also successful.

I used to think this message meant that the database file was somehow
invalid but it looks like the software was not expecting the file to
exist, but it is.

I guess you could try removing the file---maybe you should just move
it to /tmp rather than deleting it---and see what happens.

If the file really doesn't exist then you have a real conundrum on
your hands!

> I am getting mail with a score of like -5.3 (yes that's a
> negative). Is the error the cause of the negative score?

Possibly.  Hard to say without seeing the code.
-- 
Stay up-to-date on what I'm doing lately:
                                 http://www.panix.com/~jasonp

--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list