A couple days ago, I had clamav-milters that were timing out.

My sendmail logs looked like this:

Apr 27 04:25:50 nameserver2 clamav-milter[4431]: ClamAv: private data not NULL
Apr 27 04:25:50 nameserver2 clamav-milter[4417]: ClamAv: private data not NULL
Apr 27 04:25:52 nameserver2 clamav-milter[4427]: ClamAv: private data not NULL
Apr 27 04:25:52 nameserver2 clamav-milter[4429]: ClamAv: private data not NULL
Apr 27 04:25:52 nameserver2 sendmail[4484]: i3R8PMaZ004484: Milter (clamav-milter): timeout before data read
Apr 27 04:25:52 nameserver2 sendmail[4484]: i3R8PMaZ004484: Milter (clamav-milter): to error state


The ClamAv private data not null error comes from libmilter/handler.c. It is printed when the libmilter state engine returns and the private data != null check is performed then, before the libmilter spawned thread terminates.

Supposedly, in the state engine libmilter/engine.c mi_engine() we have this

    }
               if (sendreply(r, sd, &timeout, ctx) != MI_SUCCESS)
               {
                       ret = MI_FAILURE;
                       break;
               }

call_abort = ST_IN_MAIL(curstate);

And since in clamav-milter.c we have this:


static sfsistat clamfi_close(SMFICTX *ctx) { #ifdef CL_DEBUG struct privdata *privdata = (struct privdata *)smfi_getpriv(ctx);

       cli_dbgmsg("clamfi_close\n");
       if(privdata != NULL) {
               if(use_syslog)
                       syslog(LOG_DEBUG, "clamfi_close, privdata != NULL");
               else
                       cli_warnmsg("clamfi_close, privdata != NULL");
       }
#endif

       if(logVerbose)
               syslog(LOG_DEBUG, "clamfi_close");

       return SMFIS_CONTINUE;
}

That might explain that libmilter would not call clmfi_abort after a timeout sending the repy to sendmail and instead would only call clamfi_close (after mi_engine breaks out of the state loop)

Perhaps the CL_DEBUG should be removed and clamfi_free called on privdata != null?




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Clamav-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/clamav-devel

Reply via email to