Damian Menscher wrote:
On Tue, 24 May 2005, Doug Hardie wrote:
On May 24, 2005, at 13:21, Stephen Gran wrote:
<snip>
Just to bring you (and anyone else joining us) up to speed, here's a
description of how it's supposed to work:
When there's a database update, the milter wants everything to be quiet.
So it stops accepting new connections. It then waits for the
currently-running children to finish. Once n_children drops to 0, it
reloads the database and resumes accepting connections.
At least, that's the theory. In practice, n_children isn't ever hitting
0, so it stays in the !accepting state forever. For example, in the
ktrace you posted, n_children dropped from 7 down to 2. The fact that
it never reached 0 is the entire problem. Of course, nobody knows *why*
it isn't reaching 0. It might be from a hung scanner thread, or from a
pthreads race condition, or even a locking issue.
The hope was that getting an strace of each thread of a hung milter
would provide information on which of those causes was at fault, and
perhaps enable us to actually locate the bug.
Damian Menscher
Is that how clamd does it also?
For clamav-milter, milter sessions can be quite long lived depending on
the nature of the connection. If this !accepting depends on the sendmail
closing the milter connection/thread this could potentialy be quite a
long time.
It does not take long for sendmail to abort a milter that does not
accept new connections and successfully launch a new milter thread.
Milters should never intentionaly refuse connections from sendmail;
libmilter will abort and exit the milter after N consecutive errors of
which non-accepts and failure to create a thread are one.
(why is this about accepting connections...the errors I have seen are
about launching the new threads)
Would it be possible to have existing threads use the old loaded
database and to have the new threads use a new loaded database?
Destroy the old database when its ref_count hits 0.
Joe
_______________________________________________
http://lurker.clamav.net/list/clamav-users.html