Bayes journal problem

2006-01-25 Thread Enrico Morelli
Dear all,

I'm using spamassassin 3.1.0 without problems.
Starting from today I see the following messages in the log files of my
mail server:
Jan 24 16:35:13 alpha spamd[8295]: partial write to Bayes
journal /etc/mail/spamassassin/BAYES/bayes_journal (4040 of 118632),
recovering. Jan 24 16:35:14 alpha spamd[8293]: partial write to Bayes
journal /etc/mail/spamassassin/BAYES/bayes_journal (4040 of 111984),
recovering. Jan 24 16:35:14 alpha spamd[8294]: partial write to Bayes
journal /etc/mail/spamassassin/BAYES/bayes_journal (4040 of 117408),
recovering. Jan 24 16:35:14 alpha spamd[8294]: cannot write to Bayes
journal /etc/mail/spamassassin/BAYES/bayes_journal, aborting! Jan 24
16:35:14 alpha spamd[8294]: Exiting subroutine via last
at /usr/lib/perl5/vendor_perl/5.8.6/Mail/SpamAssassin/BayesStore/DBM.pm
line 1073. Jan 24 16:35:14 alpha last message repeated 2 times Jan 24
16:35:14 alpha spamd[8294]: Exiting eval via last
at /usr/lib/perl5/vendor_perl/5.8.6/Mail/SpamAssassin/BayesStore/DBM.pm
line 1073. Jan 24 16:35:14 alpha spamd[8295]: partial write to Bayes
journal /etc/mail/spamassassin/BAYES/bayes_journal (4040 of 118632),
recovering. 

What's happen?


-- 
---
   (o_
(o_//\  Coltivate Linux che tanto Windows si pianta da solo.
(/)_   V_/_
+--+
| ENRICO MORELLI |  email: [EMAIL PROTECTED]   |
| * *   *   *|  phone: +39 055 4574269 |
|  University of Florence|  fax  : +39 055 4574253 |
|  CERM - via Sacconi, 6 -  50019 Sesto Fiorentino (FI) - ITALY|
+--+



Re: Bayes journal problem

2006-01-25 Thread Loren Wilton
Perhaps you have per-user Bayes and the user has gone over-quota on disk
space?

Loren



Re: Bayes journal problem

2006-01-25 Thread Enrico Morelli
On Wed, 25 Jan 2006 03:14:30 -0800
Loren Wilton [EMAIL PROTECTED] wrote:

 Perhaps you have per-user Bayes and the user has gone over-quota on
 disk space?
 
 Loren
 

I checked and yes I have per-user Bayes and some users was out of quota.
This is the problem?

Thanks a lot.

-- 
---
   (o_
(o_//\  Coltivate Linux che tanto Windows si pianta da solo.
(/)_   V_/_
+--+
| ENRICO MORELLI |  email: [EMAIL PROTECTED]   |
| * *   *   *|  phone: +39 055 4574269 |
|  University of Florence|  fax  : +39 055 4574253 |
|  CERM - via Sacconi, 6 -  50019 Sesto Fiorentino (FI) - ITALY|
+--+


Re: Bayes journal problem

2006-01-25 Thread Enrico Morelli
On Wed, 25 Jan 2006 12:31:02 +0100
Enrico Morelli [EMAIL PROTECTED] wrote:

 On Wed, 25 Jan 2006 03:14:30 -0800
 Loren Wilton [EMAIL PROTECTED] wrote:
 
  Perhaps you have per-user Bayes and the user has gone over-quota on
  disk space?
  
  Loren
  
 
 I checked and yes I have per-user Bayes and some users was out of
 quota. This is the problem?
 
 Thanks a lot.
 

I add some disk quota to the users that was out of quota, but the
problem seems unresolved.

Jan 25 12:31:13 alpha spamd[2021]: bayes: write failed to Bayes
journal /etc/mail/spamassassin/BAYES/bayes_journal (0 of 263856)! Jan
25 12:31:13 alpha spamd[2021]: Exiting subroutine via last
at /usr/lib/perl5/vendor_perl/5.8.6/Mail/SpamAssassin/BayesStore/DBM.pm
line 1126. Jan 25 12:31:13 alpha last message repeated 2 times Jan 25
12:31:13 alpha spamd[2021]: Exiting eval via last
at /usr/lib/perl5/vendor_perl/5.8.6/Mail/SpamAssassin/BayesStore/DBM.pm
line 1126. 


-- 
---
   (o_
(o_//\  Coltivate Linux che tanto Windows si pianta da solo.
(/)_   V_/_
+--+
| ENRICO MORELLI |  email: [EMAIL PROTECTED]   |
| * *   *   *|  phone: +39 055 4574269 |
|  University of Florence|  fax  : +39 055 4574253 |
|  CERM - via Sacconi, 6 -  50019 Sesto Fiorentino (FI) - ITALY|
+--+


Re: Bayes journal problem

2006-01-25 Thread Loren Wilton
 I add some disk quota to the users that was out of quota, but the
 problem seems unresolved.

 Jan 25 12:31:13 alpha spamd[2021]: bayes: write failed to Bayes
 journal /etc/mail/spamassassin/BAYES/bayes_journal (0 of 263856)! Jan
 25 12:31:13 alpha spamd[2021]: Exiting subroutine via last

This still looks like a quota or permissions problem, or maybe a missing
home directory for some user.  I think this is saying that Bayes could not
write to a file in etc/mail/spamassassin/BAYES.  I'm guessing this is a
common file rather than a per-user file.  So perhaps the user does not have
permission to write to this directory?

Loren



Re: Bayes journal problem

2006-01-25 Thread Theo Van Dinter
On Wed, Jan 25, 2006 at 04:04:28AM -0800, Loren Wilton wrote:
  Jan 25 12:31:13 alpha spamd[2021]: bayes: write failed to Bayes
  journal /etc/mail/spamassassin/BAYES/bayes_journal (0 of 263856)! Jan
  25 12:31:13 alpha spamd[2021]: Exiting subroutine via last
 This still looks like a quota or permissions problem, or maybe a missing
 home directory for some user.

FWIW, the error occurs when the journal has been opened for writing (so in
theory the permissions and such should be ok), but any attempt to actually put
data into the journal fails, specifically that syswrite() (therefore the
system's write() function) returns an error.

I've attached a patch which you could use against M::SA::BayesStore::DBM
which makes that error message include the system's error string which
should hopefully be useful.

-- 
Randomly Generated Tagline:
A nod's as good as a wink to a blind bat!
Index: lib/Mail/SpamAssassin/BayesStore/DBM.pm
===
--- lib/Mail/SpamAssassin/BayesStore/DBM.pm (revision 366688)
+++ lib/Mail/SpamAssassin/BayesStore/DBM.pm (working copy)
@@ -1122,8 +1122,12 @@
 
 # argh, write failure, give up
 if (!defined $len || $len  0) {
-  $len = 0 unless (defined $len);
-  warn bayes: write failed to Bayes journal $path ($len of $nbytes)!\n;
+  my $err = '';
+  if (!defined $len) {
+   $len = 0;
+   $err =   ($!);
+  }
+  warn bayes: write failed to Bayes journal $path ($len of 
$nbytes)!$err\n;
   last;
 }
 


pgpFzhC4hzYAx.pgp
Description: PGP signature


Re: Bayes journal problem

2006-01-25 Thread Enrico Morelli
On Wed, 25 Jan 2006 04:04:28 -0800
Loren Wilton [EMAIL PROTECTED] wrote:

  I add some disk quota to the users that was out of quota, but the
  problem seems unresolved.
 
  Jan 25 12:31:13 alpha spamd[2021]: bayes: write failed to Bayes
  journal /etc/mail/spamassassin/BAYES/bayes_journal (0 of 263856)!
  Jan 25 12:31:13 alpha spamd[2021]: Exiting subroutine via last
 
 This still looks like a quota or permissions problem, or maybe a
 missing home directory for some user.  I think this is saying that
 Bayes could not write to a file in etc/mail/spamassassin/BAYES.  I'm
 guessing this is a common file rather than a per-user file.  So
 perhaps the user does not have permission to write to this directory?
 
 Loren
 

The BAYES is a directory containing the DBs used by spamassassin and
the files are for general purpose, not per-user files.

# ls -la /etc/mail/spamassassin
drwx--  2 spamc spamc  4096 Jan 25 10:38 BAYES
# ls -la /etc/mail/spamassassin/BAYES
drwx--  2 spamc spamc 4096 Jan 25 10:38 .
drwxr-xr-x  3 root  root  4096 Jan 24 16:45 ..
-rw---  1 spamc spamc 5154 Jan 25 10:38 bayes.mutex
-rw-rw-rw-  1 spamc spamc0 Jan 25 13:17 bayes_journal
-rw---  1 spamc spamc  154 May 27  2004 bayes_journal.orig
-rw---  1 spamc spamc 41598976 Jan 25 07:58 bayes_seen
-rw-rw-rw-  1 spamc spamc  5414912 Jan 25 07:58 bayes_toks


-- 
---
   (o_
(o_//\  Coltivate Linux che tanto Windows si pianta da solo.
(/)_   V_/_
+--+
| ENRICO MORELLI |  email: [EMAIL PROTECTED]   |
| * *   *   *|  phone: +39 055 4574269 |
|  University of Florence|  fax  : +39 055 4574253 |
|  CERM - via Sacconi, 6 -  50019 Sesto Fiorentino (FI) - ITALY|
+--+


Re: Bayes journal problem

2006-01-25 Thread Matt Kettler
Enrico Morelli wrote:
 Dear all,

 I'm using spamassassin 3.1.0 without problems.
 Starting from today I see the following messages in the log files of my
 mail server:
 Jan 24 16:35:13 alpha spamd[8295]: partial write to Bayes
 journal /etc/mail/spamassassin/BAYES/bayes_journal (4040 of 118632),
 recovering. Jan 24 16:35:14 alpha spamd[8293]: partial write to Bayes
 journal /etc/mail/spamassassin/BAYES/bayes_journal (4040 of 111984),
 recovering. Jan 24 16:35:14 alpha spamd[8294]: partial write to Bayes
 journal /etc/mail/spamassassin/BAYES/bayes_journal (4040 of 117408),
 recovering. Jan 24 16:35:14 alpha spamd[8294]: cannot write to Bayes
 journal /etc/mail/spamassassin/BAYES/bayes_journal, aborting! Jan 24
 16:35:14 alpha spamd[8294]: Exiting subroutine via last
 at /usr/lib/perl5/vendor_perl/5.8.6/Mail/SpamAssassin/BayesStore/DBM.pm
 line 1073. Jan 24 16:35:14 alpha last message repeated 2 times Jan 24
 16:35:14 alpha spamd[8294]: Exiting eval via last
 at /usr/lib/perl5/vendor_perl/5.8.6/Mail/SpamAssassin/BayesStore/DBM.pm
 line 1073. Jan 24 16:35:14 alpha spamd[8295]: partial write to Bayes
 journal /etc/mail/spamassassin/BAYES/bayes_journal (4040 of 118632),
 recovering. 

 What's happen?

   
SA tried to write a large block of data to disk and the OS only allowed
it to write 4040 bytes.

Possible causes:

99% chance of disk full or user quota exceeded.
1% chance of hard disk failure.

Check your system logs and df




Re: Bayes journal problem

2006-01-25 Thread Enrico Morelli
On Wed, 25 Jan 2006 10:06:13 -0500
Matt Kettler [EMAIL PROTECTED] wrote:

 Enrico Morelli wrote:
  Dear all,
 

 SA tried to write a large block of data to disk and the OS only
 allowed it to write 4040 bytes.
 
 Possible causes:
 
 99% chance of disk full or user quota exceeded.
 1% chance of hard disk failure.
 
 Check your system logs and df
 
 
Yeah!!! Solved. Thanks.
In effect the / filesystem was 100% full.

-- 
---
   (o_
(o_//\  Coltivate Linux che tanto Windows si pianta da solo.
(/)_   V_/_
+--+
| ENRICO MORELLI |  email: [EMAIL PROTECTED]   |
| * *   *   *|  phone: +39 055 4574269 |
|  University of Florence|  fax  : +39 055 4574253 |
|  CERM - via Sacconi, 6 -  50019 Sesto Fiorentino (FI) - ITALY|
+--+