#991316 clamav: Freshclam exhaust diff download quotas before switching to full downloads

Package:
clamav
Source:
clamav
Description:
anti-virus utility for Unix - command-line interface
Submitter:
Jean-Michel Vourgère
Date:
2021-07-20 14:15:04 UTC
Severity:
normal
#991316#5
Date:
2021-07-20 14:10:20 UTC
From:
To:
Dear Maintainer,

Clamav no longer download updates on my server.

I am in a situation where I get message:
Incremental update failed, trying to download daily.cvd

However, freshclam tried so hard to download the diff that I get quick
out every time from the mirror with the error:

Tue Jul 20 15:45:49 2021 -> ^Can't download daily.cvd from https://database.clamav.net/daily.cvd
Tue Jul 20 15:45:49 2021 -> ^FreshClam received error code 429 from the ClamAV Content Delivery Network (CDN).
Tue Jul 20 15:45:49 2021 -> This means that you have been rate limited by the CDN.
Tue Jul 20 15:45:49 2021 ->  1. Run FreshClam no more than once an hour to check for updates.
Tue Jul 20 15:45:49 2021 ->     FreshClam should check DNS first to see if an update is needed.
Tue Jul 20 15:45:49 2021 ->  2. If you have more than 10 hosts on your network attempting to download,
Tue Jul 20 15:45:49 2021 ->     it is recommended that you set up a private mirror on your network using
Tue Jul 20 15:45:49 2021 ->     cvdupdate (https://pypi.org/project/cvdupdate/) to save bandwidth on the
Tue Jul 20 15:45:49 2021 ->     CDN and your own network.
Tue Jul 20 15:45:49 2021 ->  3. Please do not open a ticket asking for an exemption from the rate limit,
Tue Jul 20 15:45:49 2021 ->     it will not be granted.
Tue Jul 20 15:45:49 2021 -> ^You are on cool-down until after: 2021-07-20 19:45:49
Tue Jul 20 15:45:49 2021 -> *Current working dir is /var/lib/clamav/
Tue Jul 20 15:45:49 2021 -> *check_for_new_database_version: Local copy of main found: main.cld.
Tue Jul 20 15:45:49 2021 -> *query_remote_database_version: main.cvd version from DNS: 61
Tue Jul 20 15:45:49 2021 -> main database available for update (local version: 59, remote version: 61)

See attached full log.

I expected freshclam to give up retrying patching the database and switch
to full download *before* hitting the rate limitation. Every time it gives up and
switch to full download, it is too late and the full download fails too.

As a result, freshclam is totally broken here.
--- data dir ---
total 621784
-rw-r--r-- 1 clamav clamav   1438720 Mar  8 17:00 bytecode.cld
-rw-r--r-- 1 clamav clamav 327847424 Jul 14 14:00 daily.cld
-rw-r--r-- 1 clamav clamav 307403264 Nov 25  2019 main.cld
-rw------- 1 clamav clamav        69 Jul 20 15:45 mirrors.dat