You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2005/10/13 13:00:45 UTC

[Bug 4632] New: Deadlock with SQL Bayes

http://bugzilla.spamassassin.org/show_bug.cgi?id=4632

           Summary: Deadlock with SQL Bayes
           Product: Spamassassin
           Version: 3.1.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: spamassassin
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: matthias.weigel@maweos.de


(sorry, the "bug writing guidelines" is a dead link...)

Platform: 
WBEL4(RHEL4 clone), Kernel 2.6.9-22 from Redhat.
MySQL 4.1.12-3 from Redhat.
SA is called from amavisd-new 2.3.3 (dual sendmail setup).

MySQL bidirectional replication between two similar boxes is active, rest of
setup per docs. I have imported Bayes and AWL from DB files during setup. Tables
have been converted to InnoDB. Incoming mail is distributed between the two
boxes via equal precedence MX records.

Every few hours the deadlock error shows up, mysql then stops replication (see
attachement). I then have to fix it manually via "start slave".



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4632] Deadlock with SQL Bayes

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4632





------- Additional Comments From parkerm@pobox.com  2005-10-13 07:17 -------
Subject: Re:  Deadlock with SQL Bayes

Also, can you please include the error message output from SA.

Michael




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4632] Deadlock with SQL Bayes

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4632





------- Additional Comments From parkerm@pobox.com  2005-10-13 08:58 -------
Subject: Re:  Deadlock with SQL Bayes


>unfortunately i have no errormessage directly from SA. SA is called via amavis
>which has not logged this:
>  
>

I should probably mention at this point that I'm not one to support
anything in amavis.  It's too difficult and generally not worth the
effort, so I find a zero tolerance policy good here.  If you can
recreate outside amavis or at the very least get a meaningful debug
message I'll be happy to look into it.  I'm not speaking for everyone,
so maybe someone else would be willing to give you a hand.

Michael






------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4632] Deadlock with SQL Bayes

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4632





------- Additional Comments From parkerm@pobox.com  2005-10-13 07:14 -------
Subject: Re:   New: Deadlock with SQL Bayes


>
>MySQL bidirectional replication between two similar boxes is active, rest of
>  
>
By bidirectional, do you mean multi-master?  That doesn't work with Bayes.

Michael




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4632] Deadlock with SQL Bayes

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4632





------- Additional Comments From parkerm@pobox.com  2005-10-13 08:39 -------
Subject: Re:  Deadlock with SQL Bayes


>
>can you give me more details on this? Why does it not work? 
>
>  
>

The primary reason is the fact that Bayes uses auto_increment fields.

It's may be possible that there is a deadlock situation though, so I'm
not closing the bug.

The deadlocks should be detected (which is why I wanted to see the
actual SA error msg) and we can do retrying to recover.  That doesn't
help you get to a master-master setup, it's not possible in 4.X of MySQL.

Michael






------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4632] Deadlock with SQL Bayes

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4632





------- Additional Comments From matthias.weigel@maweos.de  2005-10-13 08:51 -------
(In reply to comment #3)
> Subject: Re:  Deadlock with SQL Bayes
> 
> Also, can you please include the error message output from SA.
> 
> Michael
> 

Hi Michael, 

unfortunately i have no errormessage directly from SA. SA is called via amavis
which has not logged this:

amavis[22498]: (22498-01) SA TIMED OUT, backtrace: at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore/SQL.pm line
252\n\teval {...} called at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore/SQL.pm line
252\n\tMail::SpamAssassin::BayesStore::SQL::calculate_expire_delta('Mail::SpamAssassin::BayesStore::MySQL=HASH(0xb0306e0)',
1129129868, 43200, 512) called at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore.pm line
321\n\tMail::SpamAssassin::BayesStore::expire_old_tokens_trapped('Mail::SpamAssassin::BayesStore::MySQL=HASH(0xb0306e0)',
'undef') called at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore.pm line 214\n\teval
{...} called at /usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore.pm
line
211\n\tMail::SpamAssassin::BayesStore::expire_old_tokens('Mail::SpamAssassin::BayesStore::MySQL=HASH(0xb0306e0)',
'undef') called at /usr/lib/perl5/site_perl/5.8.5/Mail/SpamAss...

amavis[32107]: (32107-04) SA TIMED OUT, backtrace: at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore/MySQL.pm line
973\n\teval {...} called at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore/MySQL.pm line
973\n\tMail::SpamAssassin::BayesStore::MySQL::_put_tokens('Mail::SpamAssassin::BayesStore::MySQL=HASH(0xb01dd0c)',
'HASH(0xb0b9dd4)', 0, 1, 1129201336) called at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore/SQL.pm line
963\n\tMail::SpamAssassin::BayesStore::SQL::multi_tok_count_change('Mail::SpamAssassin::BayesStore::MySQL=HASH(0xb01dd0c)',
0, 1, 'HASH(0xb0b9dd4)', 1129201336) called at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/Bayes.pm line
806\n\tMail::SpamAssassin::Bayes::learn_trapped('Mail::SpamAssassin::Bayes=HASH(0xb05b574)',
0, 'Mail::SpamAssassin::Message=HASH(0xb760c58)', 'HASH(0xba9a6b4)', 'undef')
called at /usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/Bay...

amavis[32107]: (32107-04) SA TIMED OUT, backtrace: at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore/MySQL.pm line
973\n\teval {...} called at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore/MySQL.pm line
973\n\tMail::SpamAssassin::BayesStore::MySQL::_put_tokens('Mail::SpamAssassin::BayesStore::MySQL=HASH(0xb01dd0c)',
'HASH(0xb0b9dd4)', 0, 1, 1129201336) called at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore/SQL.pm line
963\n\tMail::SpamAssassin::BayesStore::SQL::multi_tok_count_change('Mail::SpamAssassin::BayesStore::MySQL=HASH(0xb01dd0c)',
0, 1, 'HASH(0xb0b9dd4)', 1129201336) called at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/Bayes.pm line
806\n\tMail::SpamAssassin::Bayes::learn_trapped('Mail::SpamAssassin::Bayes=HASH(0xb05b574)',
0, 'Mail::SpamAssassin::Message=HASH(0xb760c58)', 'HASH(0xba9a6b4)', 'undef')
called at /usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/Bay...


Matthias



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4632] Deadlock with SQL Bayes

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4632





------- Additional Comments From matthias.weigel@maweos.de  2005-10-13 04:05 -------
Created an attachment (id=3188)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=3188&action=view)
output of "show innodb status" (includes offending SQL stmt)




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4632] Deadlock with SQL Bayes

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4632





------- Additional Comments From matthias.weigel@maweos.de  2005-10-13 08:27 -------
(In reply to comment #2)

> By bidirectional, do you mean multi-master?  That doesn't work with Bayes.
> 
> Michael
> 

Hello Michael,

can you give me more details on this? Why does it not work? 

Matthias



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4632] Deadlock with SQL Bayes

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4632


parkerm@pobox.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX




------- Additional Comments From parkerm@pobox.com  2006-08-02 03:23 -------
Not really any usable debug data, if you can provide an example and debug logs
of this failing with spamassassin or spamd then feel free to reopen and attach
said logs.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.