[clamav-users] How to boost clamav? Reloading database results in a talking timeout?

Reio Remma reio at mrstuudio.ee
Tue Feb 11 08:47:22 UTC 2020


On 31/10/2019 12:04, Reio Remma wrote:
> On 28/10/2019 12:55, Reio Remma via clamav-users wrote:
>> On 14/09/2019 17:34, G.W. Haywood via clamav-users wrote:
>>> Hi Micah,
>>>
>>> On Fri, 13 Sep 2019, Micah Snyder (micasnyd) wrote:
>>>
>>>> I'm sorry, Ged...
>>>
>>> Apology accepted. :)
>>>
>>> I'm now running the development (0.102) version of clamd, patched with
>>> Mr. Wu's patch, alongside two version 101.4 clamd daemons (an unpatched
>>> one, and one with the patch that I posted on Bugzilla).
>>>
>>> The milter scans all mail with all three daemons.  On the arrival of a
>>> message, if the database is not already being reloaded I start a fresh
>>> reload before the scan so that, for all scans, a reload always executes
>>> concurrently.  Nothing seems to have broken, and so far there's nothing
>>> terribly interesting to report other than the strange failure to detect
>>> which I sent to Joel early this week (and which I'm sure has nothing to
>>> do with these patches). 
>>
>> I've been running a patched 101.4 for a few weeks now and 
>> unfortunately I'm observing a memory leak from the multithreaded 
>> database reloads.
>>
>> I'm observing clamd memory usage going up when the new database loads 
>> and then eventually dropping down to 1.3G again. For some reason 
>> "eventually" means the memory usage drops down only after clamd 
>> processes the next e-mail.
>>
>> The problem however shows itself if clamd happens to reload its 
>> database 2 times if a row with no mail processed in between. 
>> Seemingly it will have 3 databases in memory then and the next mail 
>> being processed releases one of them, but the extra database will 
>> remain "somewhere".
>>
>> All sorts of weird problems always keep popping up on due to low 
>> traffic on the server. :) 
>
> Fortunately 0.102.0 with the patch from ClamAV team doesn't have that 
> issue and seems to release the extra memory right away.
>
> Happily running 0.102.0 now. 

Has anyone got the threaded reload patch working with 0.102.2?

When rebuilding my RPM with 0.102.2, I get the following error when the 
patch is being applied:

+ echo 'Patch #0 (clamd-threaded-reloading.patch):'
Patch #0 (clamd-threaded-reloading.patch):
+ /usr/bin/cat ~/rpmbuild/SOURCES/clamd-threaded-reloading.patch
+ /usr/bin/patch -p1 -b --suffix .threaded_reloading --fuzz=0
patching file clamd/clamd.c
Reversed (or previously applied) patch detected!  Assume -R? [n]

Thanks,
Reio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clamav.net/pipermail/clamav-users/attachments/20200211/6601b123/attachment.htm>


More information about the clamav-users mailing list