You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Linda Walsh <sa...@tlinx.org> on 2012/01/16 15:36:11 UTC

SA 3.0.2 buggie? -- message that DB file doesn't exist -- but systrace shows successful lock and open!

This is not permission problem --
Message I get:

bayes: cannot open bayes databases /home/lw_spam/.spamassassin/bayes_* R/O: tie 
failed:
bayes: cannot open bayes databases /home/lw_spam/.spamassassin/bayes_* R/W: tie 
failed: No such file or directory

---
Except I followed it through using strace.

Both are being opened and the 2nd is even successfully being LOCKED:

Jan 16 06:17:34.806 [20156] dbg: locker: safe_lock: trying to get lock on 
/home/lw_spam/.spamassassin/bayes with 0 retries
link("/home/lw_spam/.spamassassin/bayes.lock.Ishtar.sc.tlinx.org.20156", 
"/home/lw_spam/.spamassassin/bayes.lock") = 0
Jan 16 06:17:34.806 [20156] dbg: locker: safe_lock: link to 
/home/lw_spam/.spamassassin/bayes.lock: link ok


before it is opened... then
SA turns around and claims it can't find them...


So why is SA opening the files, but then writing out a completely BOGUS and
false messge that it couldn't open them or even find them?!?!...

Whatever the problem is -- a better error message that isn't LYING would be a good
thing at this point, since in searching on the web, I see alot of people getting 
this -- and
it's often blamed on their permissions... but now, everyone should know that 
permissions
are not it...the message is completely bogus... it can open them just fine -- 
something eles
may be wrong, but the message is very misleading....


More complete log follows... (deleted all the lines that had
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2819, ...}) = 0
in them -- they were 2/3rd the debug messages...

-l
---------------------


Jan 16 06:17:34.798 [20156] dbg: bayes: tie-ing to DB file R/O 
/home/lw_spam/.spamassassin/bayes_toks
stat("/home/lw_spam/.spamassassin/bayes_toks", {st_mode=S_IFREG|0777, 
st_size=5177344, ...}) = 0
open("/home/lw_spam/.spamassassin/bayes_toks", O_RDONLY) = 3
bayes: cannot open bayes databases /home/lw_spam/.spamassassin/bayes_* R/O: tie 
failed:
Jan 16 06:17:34.799 [20156] dbg: bayes: untie-ing DB file toks
Jan 16 06:17:34.799 [20156] dbg: config: score set 1 chosen.
Jan 16 06:17:34.800 [20156] dbg: sa-learn: spamtest initialized
Jan 16 06:17:34.800 [20156] dbg: learn: initializing learner
Jan 16 06:17:34.800 [20156] dbg: plugin: 
Mail::SpamAssassin::Plugin::Bayes=HASH(0x286d1f8) implements 'learner_sync', 
priority 0

Jan 16 06:17:34.801 [20156] dbg: bayes: bayes journal sync starting
stat("/home/lw_spam/.spamassassin", {st_mode=S_IFDIR|S_ISGID|0777, st_size=4096, 
...}) = 0
stat("/home/lw_spam/.spamassassin", {st_mode=S_IFDIR|S_ISGID|0777, st_size=4096, 
...}) = 0
stat("/home/lw_spam/.spamassassin", {st_mode=S_IFDIR|S_ISGID|0777, st_size=4096, 
...}) = 0
stat("/home/lw_spam/.spamassassin/bayes_journal", 0xe3e138) = -1 ENOENT (No such 
file or directory)
Jan 16 06:17:34.801 [20156] dbg: bayes: bayes journal sync completed
Jan 16 06:17:34.802 [20156] dbg: plugin: 
Mail::SpamAssassin::Plugin::Bayes=HASH(0x286d1f8) implements 
'learner_expire_old_training', priority 0
Jan 16 06:17:34.802 [20156] dbg: bayes: expiry starting
stat("/home/lw_spam/.spamassassin/bayes_toks", {st_mode=S_IFREG|0777, 
st_size=5177344, ...}) = 0
stat("/home/lw_spam/.spamassassin", {st_mode=S_IFDIR|S_ISGID|0777, st_size=4096, 
...}) = 0
Jan 16 06:17:34.803 [20156] dbg: locker: mode is 384
stat("/etc/resolv.conf", {st_mode=S_IFREG|0644, st_size=834, ...}) = 0
open("/etc/resolv.conf", O_RDONLY)      = 3
open("/etc/host.conf", O_RDONLY)        = 3
open("/etc/hosts", O_RDONLY|O_CLOEXEC)  = 3
open("/home/lw_spam/.spamassassin/bayes.lock.Ishtar.sc.tlinx.org.20156", 
O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
Jan 16 06:17:34.805 [20156] dbg: locker: safe_lock: created 
/home/lw_spam/.spamassassin/bayes.lock.Ishtar.sc.tlinx.org.20156
Jan 16 06:17:34.806 [20156] dbg: locker: safe_lock: trying to get lock on 
/home/lw_spam/.spamassassin/bayes with 0 retries
link("/home/lw_spam/.spamassassin/bayes.lock.Ishtar.sc.tlinx.org.20156", 
"/home/lw_spam/.spamassassin/bayes.lock") = 0
Jan 16 06:17:34.806 [20156] dbg: locker: safe_lock: link to 
/home/lw_spam/.spamassassin/bayes.lock: link ok
unlink("/home/lw_spam/.spamassassin/bayes.lock.Ishtar.sc.tlinx.org.20156") = 0
lstat("/home/lw_spam/.spamassassin/bayes.lock", {st_mode=S_IFREG|0660, 
st_size=26, ...}) = 0
Jan 16 06:17:34.807 [20156] dbg: bayes: tie-ing to DB file R/W 
/home/lw_spam/.spamassassin/bayes_toks
open("/home/lw_spam/.spamassassin/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
stat("/home/lw_spam/.spamassassin/__db.bayes_toks", 0xe3e138) = -1 ENOENT (No 
such file or directory)
stat("/home/lw_spam/.spamassassin/bayes_toks", {st_mode=S_IFREG|0777, 
st_size=5177344, ...}) = 0
open("/home/lw_spam/.spamassassin/bayes_toks", O_RDWR) = 3
Jan 16 06:17:34.808 [20156] dbg: bayes: untie-ing DB file toks
open("/home/lw_spam/.spamassassin/bayes.lock.Ishtar.sc.tlinx.org.20156", 
O_WRONLY|O_CREAT|O_EXCL, 0700) = 3
unlink("/home/lw_spam/.spamassassin/bayes.lock.Ishtar.sc.tlinx.org.20156") = 0
lstat("/home/lw_spam/.spamassassin/bayes.lock", {st_mode=S_IFREG|0660, 
st_size=26, ...}) = 0
unlink("/home/lw_spam/.spamassassin/bayes.lock") = 0
Jan 16 06:17:34.809 [20156] dbg: locker: safe_unlock: unlink 
/home/lw_spam/.spamassassin/bayes.lock
bayes: cannot open bayes databases /home/lw_spam/.spamassassin/bayes_* R/W: tie 
failed: No such file or directory
Jan 16 06:17:34.809 [20156] dbg: bayes: expiry completed


Re: SA 3.3.2 buggie? -- message that DB file doesn't exist -- but systrace shows successful lock and open!

Posted by Linda Walsh <sa...@tlinx.org>.

Michael Scheidell wrote:
> On 1/16/12 9:36 AM, Linda Walsh wrote:
>> This is not permission problem --
>> Message I get:
> have you tried to upgrade to the released version? 3.3.2?
> 
> 3.0.2 was obsolete 6 years ago.
---
	Well, I could pretend like you wouldn't have guessed it was
a typo and tell you that you were right, and that after installing 3.3.2, I had
the exact same bug...

but, I'll just mention that it is 3.3.2...
  sa-learn --version
SpamAssassin version 3.3.2

That is 'still' having this problem (though I will note that most of the
references on this error message date back to the early 3.0 series...

So this bug has been out there for over 6 years (according to your timeline...)


That's a long time to ignore a widely found bug (by googling on it) -- the only 
offering
of a solution was to check permissions -- which I verified in the trace, -- as not
being the problem -- but that the message being issued by SA was bogus.


Re: SA 3.0.2 buggie? -- message that DB file doesn't exist -- but systrace shows successful lock and open!

Posted by Michael Scheidell <mi...@secnap.com>.
On 1/16/12 9:36 AM, Linda Walsh wrote:
> This is not permission problem --
> Message I get:
have you tried to upgrade to the released version? 3.3.2?

3.0.2 was obsolete 6 years ago.


-- 
Michael Scheidell, CTO
o: 561-999-5000
d: 561-948-2259
 >*| *SECNAP Network Security Corporation

    * Best Mobile Solutions Product of 2011
    * Best Intrusion Prevention Product
    * Hot Company Finalist 2011
    * Best Email Security Product
    * Certified SNORT Integrator

______________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(r). 
For Information please see http://www.spammertrap.com/
______________________________________________________________________