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/04/02 16:52:12 UTC

[Bug 4239] New: AWL with MySQL cause spamd startup failure

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

           Summary: AWL with MySQL cause spamd startup failure
           Product: Spamassassin
           Version: 3.0.2
          Platform: PC
        OS/Version: OpenBSD
            Status: NEW
          Severity: normal
          Priority: P4
         Component: spamc/spamd
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: peo@bsd-guide.net


Using auto whitelist stored in a MySQL db/table makes spamd to fail its startup
sequence (start new threads). The only way to have a message scanned is to use
cat 'mailfile' | spamc. Other (same-domain deliveries, deliveries to other
domains and scanning of outgoing messages fails)

OpenBSD 3.6 (stable)
MySQL 4.1.10a
SpamAssassin 3.0.2
qmail-scanner 1.25st



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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From peo@bsd-guide.net  2005-04-02 06:55 -------
Created an attachment (id=2754)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2754&action=view)
spamd.log during spamd startup AWL in MySQL




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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From peo@bsd-guide.net  2005-04-02 10:58 -------
(In reply to comment #3)
> This is very odd, to the point I'm not really sure where to start asking for
> debug information.  Are you sure that qmail-scanner 1.25st works properly with
> SA 3.0?
> 
yep, that is tested, and in the attached log with the initial report (which is
the full log from the start of spamd up to the end of the three "bad protocol"
errors), you can see that qs is working well with SA 3.0 (with AWL in a file)

> Please attach the following:
>   a copy of you local.cf file, with the passwords blanked out
>   a copy of spamassassin -D --lint
coming up in a few minutes..

>   the output from perl -V
>   Which DBI and DBD::mysql version are you using
DBI v1.46, DBD::mysql v2.9004

>   start up spamd in debug mode, and run 2-3 msgs through (with AWL turned on)
> and include the entire logfile, not just the parts you believe to be relevant
also comes soon..

>   use the mysql command line tool and run show create table awl (or whatever you
> called your table) along with any other tables you are using for spamassassin,
> and attach the output..
> 
> If I had to make an off the cuff guess, I'd say your machine is overloaded and
> you are pushing it over the edge when AWL is turned on and it's not something
> AWL specific.

there was no problem in running 50 child processes with AWL in a file, I just
cut this to 5 to make it easier to track the problem.




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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From peo@bsd-guide.net  2005-04-06 01:58 -------
Created an attachment (id=2770)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2770&action=view)
'make test' in Mail-Spamassassin-3.0.2




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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From peo@bsd-guide.net  2005-04-04 14:23 -------
(In reply to comment #17)
> I'm at a complete loss.  Best I can come up with is something with OpenBSD is
> bombing out when the mysql stuff starts up.
> 
> I don't suppose you've attempted turning off AWL and trying BayesSQL to see if
> it gives you the same error?

I have not (yet) tried BayesSQL, but I will tomorrow (different time zone, so
it's almost midnight here now). User prefs in SQL does work just fine, so I see
no reason for Bayes or AWL not working.




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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From parkerm@pobox.com  2005-04-06 09:34 -------
Subject: Re:  AWL with MySQL cause spamd startup failure

> t/sql_based_whitelist.......ok
> ...

Hmmm...I was thinking this started up spamd, but it doesn't.  Maybe we
should add this to the test.....

Michael




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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From peo@bsd-guide.net  2005-04-03 00:25 -------
Created an attachment (id=2762)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2762&action=view)
spamd.log during startup and sending a few mails (AWL in a file)




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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From peo@bsd-guide.net  2005-04-02 11:16 -------
(From update of attachment 2760)
using the local.cf with AWL in MySQL




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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From peo@bsd-guide.net  2005-04-03 07:35 -------
(In reply to comment #12)

> If you run everything using a UNIX domain socket (ie -U) instead does
> it behave the same way?
> 
exact the same failure using a socket..

> Do you have some sort of security enabled that monitors TCP ports? or
> some sort of load balancer in place?
.. and no difference in turning the packet filter off

/PeO




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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From peo@bsd-guide.net  2005-04-02 11:32 -------
Created an attachment (id=2761)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2761&action=view)
spamd.log during startup and sending a few mails (AWL in MySQL)

# /usr/bin/spamd -q -x -m 5 -u _clamd -D -d -s /tmp/spamd.log
--pidfile=/var/run/spamd.pid

Starting SpamAssassin Mail Filter Daemon: logging enabled:
	facility: file
	socket:   file
	output:   /tmp/spamd.log
creating INET socket:
	Listen: 128
	LocalAddr: 127.0.0.1
	LocalPort: 783
	Proto: 6
	ReuseAddr: 1
	Type: 1
debug: SpamAssassin version 3.0.2
debug: Score set 0 chosen.
debug: Storable module v2.13 found
spamd.


# ps -aux |grep spam
_clamd	   564	0.0 10.7 21636 21052 ??  Is	9:19PM	  0:04.95 /usr/bin/perl
-T -w /usr/bin/spamd -q -x -m 5 -u _clamd
_clamd	 17977	0.0  1.1 21636	2136 ??  I	9:19PM	  0:00.08 perl: spamd
child (perl)
root	 13766	0.0  0.0   420	   4 p0  R+	9:21PM	  0:00.00 grep spam
(sh)

# ps -ax |grep spam
  564 ??  Is	  0:04.95 /usr/bin/perl -T -w /usr/bin/spamd -q -x -m 5 -u
_clamd -D -d -s /tmp/spamd.log --pidfile=/var/r
17977 ??  I	  0:00.08 perl: spamd child (perl)
   13 p0  R+	  0:00.00 grep spam (sh)

from qmail-scanner, for each mail received, spamc is run as
/usr/bin/spamc	-R  -u "peo@bsd-guide.net" <
/var/spool/qmailscan/working/new/www.bsd-guide.net111246983471422672




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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From peo@bsd-guide.net  2005-04-02 11:05 -------
Created an attachment (id=2759)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2759&action=view)
MySQL tables used by spamassassin

SQL user prefs as described in http://wiki.apache.org/spamassassin/UsingSQL
(except for that I have chosen to go with the default user prefs settings
table)



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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From parkerm@pobox.com  2005-04-04 14:17 -------
I'm at a complete loss.  Best I can come up with is something with OpenBSD is
bombing out when the mysql stuff starts up.

I don't suppose you've attempted turning off AWL and trying BayesSQL to see if
it gives you the same error?



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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From peo@bsd-guide.net  2005-04-02 11:01 -------
Created an attachment (id=2758)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2758&action=view)
perl -V

This is the Perl version included with OpenBSD 3.6 stable



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

[Bug 4239] AWL with MySQL cause spamd startup failure

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


peo@bsd-guide.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #2754 is|0                           |1
           obsolete|                            |




------- Additional Comments From peo@bsd-guide.net  2005-04-02 07:02 -------
Created an attachment (id=2755)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2755&action=view)
spamd.log during testing of AWL in MySQL




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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From peo@bsd-guide.net  2005-04-06 01:57 -------
(In reply to comment #20)
> Subject: Re:  AWL with MySQL cause spamd startup failure
> 
> Did the AWL and Bayes tests from make test pass without errors?
> 
> Michael
> 

# make test
...
t/bayessql..................skipped
        all skipped: no reason given
...
t/sql_based_whitelist.......ok
...
#



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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From parkerm@pobox.com  2005-04-05 15:25 -------
Subject: Re:  AWL with MySQL cause spamd startup failure

Did the AWL and Bayes tests from make test pass without errors?

Michael




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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From peo@bsd-guide.net  2005-04-05 11:42 -------
(In reply to comment #18)
> (In reply to comment #17)
> > I'm at a complete loss.  Best I can come up with is something with OpenBSD is
> > bombing out when the mysql stuff starts up.
> > 
> > I don't suppose you've attempted turning off AWL and trying BayesSQL to see if
> > it gives you the same error?
> 
> I have not (yet) tried BayesSQL, but I will tomorrow (different time zone, so
> it's almost midnight here now). User prefs in SQL does work just fine, so I see
> no reason for Bayes or AWL not working.
> 
I have just tried BayesSQL, and got the same "accept failed: Resource
temporarily unavailable" lines in the log, so the only thing that works for me
is sql userprefs.

/PeO




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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From parkerm@pobox.com  2005-04-02 07:41 -------
This is very odd, to the point I'm not really sure where to start asking for
debug information.  Are you sure that qmail-scanner 1.25st works properly with
SA 3.0?

Please attach the following:
  a copy of you local.cf file, with the passwords blanked out
  a copy of spamassassin -D --lint
  the output from perl -V
  Which DBI and DBD::mysql version are you using
  start up spamd in debug mode, and run 2-3 msgs through (with AWL turned on)
and include the entire logfile, not just the parts you believe to be relevant
  use the mysql command line tool and run show create table awl (or whatever you
called your table) along with any other tables you are using for spamassassin,
and attach the output..

If I had to make an off the cuff guess, I'd say your machine is overloaded and
you are pushing it over the edge when AWL is turned on and it's not something
AWL specific.



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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From parkerm@pobox.com  2005-04-02 17:46 -------
Subject: Re:  AWL with MySQL cause spamd startup failure

This little snippet from the logs is very odd:
2005-04-02 19:19:35 [15288] i: logmsg: accept failed: Resource temporarily unavailable
2005-04-02 19:19:35 [15288] i: accept failed: Resource temporarily unavailable
2005-04-02 19:19:36 [18041] i: logmsg: accept failed: Resource temporarily unavailable
2005-04-02 19:19:36 [18041] i: accept failed: Resource temporarily unavailable
2005-04-02 19:19:36 [292] i: logmsg: accept failed: Resource temporarily unavailable
2005-04-02 19:19:36 [292] i: accept failed: Resource temporarily unavailable
2005-04-02 19:19:36 [11582] i: logmsg: accept failed: Resource temporarily unavailable
2005-04-02 19:19:36 [11582] i: accept failed: Resource temporarily unavailable
2005-04-02 19:23:55 [17977] i: logmsg: connection from localhost.bsd-guide.net [127.0.0.1] at port 25717
2005-04-02 19:23:55 [17977] i: connection from localhost.bsd-guide.net [127.0.0.1] at port 25717
2005-04-02 19:23:55 [17977] i: logmsg: bad protocol: header error: (closed before headers)
2005-04-02 19:23:55 [17977] i: bad protocol: header error: (closed before headers)
2005-04-02 19:25:20 [17977] i: logmsg: connection from localhost.bsd-guide.net [127.0.0.1] at port 44276
2005-04-02 19:25:20 [17977] i: connection from localhost.bsd-guide.net [127.0.0.1] at port 44276
2005-04-02 19:25:20 [17977] i: logmsg: bad protocol: header error: (closed before headers)
2005-04-02 19:25:20 [17977] i: bad protocol: header error: (closed before headers)
2005-04-02 19:25:28 [17977] i: logmsg: connection from localhost.bsd-guide.net [127.0.0.1] at port 37126
2005-04-02 19:25:28 [17977] i: connection from localhost.bsd-guide.net [127.0.0.1] at port 37126
2005-04-02 19:25:28 [17977] i: logmsg: bad protocol: header error: (closed before headers)
2005-04-02 19:25:28 [17977] i: bad protocol: header error: (closed before headers)
2005-04-02 19:25:38 [17977] i: logmsg: connection from localhost.bsd-guide.net [127.0.0.1] at port 40680
2005-04-02 19:25:38 [17977] i: connection from localhost.bsd-guide.net [127.0.0.1] at port 40680
2005-04-02 19:25:38 [17977] i: logmsg: bad protocol: header error: (closed before headers)
2005-04-02 19:25:38 [17977] i: bad protocol: header error: (closed before headers)


Might be some sort of bad interaction with OpenBSD.  When you turn off AWL SQL it works just fine?  Can you attach a similar logfile with AWL SQL turned off?

Also, what does:
/usr/bin/spamc -V
return?

If you run everything using a UNIX domain socket (ie -U) instead does
it behave the same way?

Do you have some sort of security enabled that monitors TCP ports? or
some sort of load balancer in place?

Thanks
Michael




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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From peo@bsd-guide.net  2005-04-02 11:13 -------
Created an attachment (id=2760)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2760&action=view)
spamassassin -D --lint




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

[Bug 4239] AWL with MySQL cause spamd startup failure

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


peo@bsd-guide.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #2762 is|0                           |1
           obsolete|                            |




------- Additional Comments From peo@bsd-guide.net  2005-04-03 00:26 -------
Created an attachment (id=2763)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2763&action=view)
spamd.log during startup and sending a few mails (AWL in a file)




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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From peo@bsd-guide.net  2005-04-03 00:24 -------
(In reply to comment #12)
> Subject: Re:  AWL with MySQL cause spamd startup failure
> 
> This little snippet from the logs is very odd:
agree.. nothing tells me what resource is not available.. and as you can see,
one child process of spamd was started during testing with AWL in MySQL (a total
of two spamd processes, including the parent). The problem seems to come from
the child, and when running locally, it looks like the parent process is
handling the message.

> 
> Might be some sort of bad interaction with OpenBSD.  When you turn off AWL SQL
it works just fine?  Can you attach a similar logfile with AWL SQL turned off?
> 
it works fine without AWL, and also when I have the AWL in a file..

> Also, what does:
> /usr/bin/spamc -V
> return?
> 
# spamc -V
SpamAssassin Client version 3.0.2

> If you run everything using a UNIX domain socket (ie -U) instead does
> it behave the same way?
> 
> Do you have some sort of security enabled that monitors TCP ports? or
> some sort of load balancer in place?

only pf blocking external access to SSH from untrusted networks. Local interface
is not filtered at all (pass quick on lo0 all). I will try to turn fw off for a
while, and see if anything changes.

/PeO




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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From peo@bsd-guide.net  2005-04-02 11:00 -------
Created an attachment (id=2757)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2757&action=view)
local.cf for AWL using a file

using this file, SA works with AWL without problems



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

[Bug 4239] AWL with MySQL cause spamd startup failure

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





------- Additional Comments From peo@bsd-guide.net  2005-04-02 10:59 -------
Created an attachment (id=2756)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2756&action=view)
local.cf for AWL using MySQL




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