I sent this one last week, but it was rejected because I sent from the wrong account (I think Paul received it though since I also replied directly to him). Not very successful venture my first post on the list :) Anyway, here it is again.

--------------

There appears to be a bug in the way the interval times are calculated.
 This problem doesn't explain why your scans are slow, but it may show
you where the bottle neck really is.

The bug is in the deltatime function which calculates the time it takes
to process each section of the code.  the deltatime function creates a
lexical $last_time variable in the scope of the function whereas it
really should be using the global copy.  The dependance on global
variables throughout all the functions makes it very easy to make a
scoping mistake like this.

This bug may explain why it looks like everything happens blazingly
fast, except for the very last stage.

A trivial patch is included below.


--- qmail-scanner-queue.template.orig Fri Apr 2 15:37:27 2004 +++ qmail-scanner-queue.template Fri Apr 2 15:37:54 2004 @@ -1989,7 +1989,7 @@ }

 sub deltatime {
-  my ($delta,$current_time,$last_time);
+  my ($delta,$current_time);
   $current_time = [gettimeofday];
   $delta =  tv_interval ($last_time, $current_time);
   $last_time=$current_time;


Cheers,


Cees


[EMAIL PROTECTED] wrote: > > got a weird problem (i would have checked the archives, but i'm getting > an error at sourceforge when i try). > > i'm preparing a new proxy spam/virus scanner. admittedly, this is my > first FreeBSD box - i've been solaris up until now. but i don't think > this is OS related. > > i'll say up front as well that this is Salvatore Toribio's patched > version of 1.21 - but again, i don't think that's the issue (however, i > understand if Mr. Haar doesn't want to approach this issue). > > all that said - i've sent some test messages to the server, and while > they are being scanned and processed properly, there's an anomaly at the > end of the scan, as you can see below - the actual scanning and > processing takes a fraction of a second, but the last step, the cleanup, > takes 24 seconds! > > i'm baffled. any thoughts on this? > > Fri, 02 Apr 2004 09:30:33 -0800:46026: e_v_r: email_quarantine_report > took 0.052252 seconds to execute > Fri, 02 Apr 2004 09:30:33 -0800:46026: cleanup: /bin/rm -rf > /var/spool/qmailscan/tmp/pravda.smileglobal.com108092703357446026/ > /var/spool/qmailscan/working/new/pravda.smileglobal.com108092703357446026 > Fri, 02 Apr 2004 09:30:57 -0800:46026: --- all finished. Total of > 24.215865 secs > > Paul Theodoropoulos > http://www.anastrophe.com > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Qmail-scanner-general mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general





-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Qmail-scanner-general mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general

Reply via email to