ClamAv database load exits with status 55 (cannot allocate memory)

Issue #717 resolved
Christopher Scheidel created an issue

It appears that ClamAV is not able to refresh on existing install with existing data.

From /log/clamav/freshclam.log

Thu Dec  5 09:17:01 2019 -> --------------------------------------
Thu Dec  5 09:17:01 2019 -> ClamAV update process started at Thu Dec  5 09:17:01 2019
Thu Dec  5 09:17:01 2019 -> WARNING: Your ClamAV installation is OUTDATED!
Thu Dec  5 09:17:01 2019 -> WARNING: Local version: 0.101.4 Recommended version: 0.102.1
Thu Dec  5 09:17:01 2019 -> DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
Thu Dec  5 09:17:01 2019 -> main.cld is up to date (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr)
Thu Dec  5 09:17:01 2019 -> daily.cld is up to date (version: 25653, sigs: 2027652, f-level: 63, builder: raynman)
Thu Dec  5 09:17:01 2019 -> bytecode.cld is up to date (version: 331, sigs: 94, f-level: 63, builder: anvilleg)
Thu Dec  5 10:17:01 2019 -> --------------------------------------
Thu Dec  5 10:17:01 2019 -> ClamAV update process started at Thu Dec  5 10:17:01 2019
Thu Dec  5 10:17:01 2019 -> WARNING: Your ClamAV installation is OUTDATED!
Thu Dec  5 10:17:01 2019 -> WARNING: Local version: 0.101.4 Recommended version: 0.102.1
Thu Dec  5 10:17:01 2019 -> DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
Thu Dec  5 10:17:01 2019 -> main.cld is up to date (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr)
Thu Dec  5 10:17:02 2019 -> Downloading daily-25654.cdiff [100%]
Thu Dec  5 10:17:46 2019 -> WARNING: [LibClamAV] mpool_malloc(): Can't allocate memory (262144 bytes).
Thu Dec  5 10:17:46 2019 -> WARNING: [LibClamAV] hm_addhash_bin: failed to grow virusname array to 104 entries
Thu Dec  5 10:17:46 2019 -> WARNING: [LibClamAV] cli_loadhash: Malformed hash string at line 298032
Thu Dec  5 10:17:46 2019 -> WARNING: [LibClamAV] cli_loadhash: Problem parsing database at line 298032
Thu Dec  5 10:17:46 2019 -> WARNING: [LibClamAV] Can't load daily.hdb: Can't allocate memory
Thu Dec  5 10:17:46 2019 -> WARNING: [LibClamAV] cli_tgzload: Can't load daily.hdb
Thu Dec  5 10:17:46 2019 -> WARNING: [LibClamAV] Can't load /data/var/clamav/clamav-1da12b65935428a1ee34454da7a350e1.tmp/clamav-264ecf126db67cdbfc9e01e75b685f55.cld: Malformed database
Thu Dec  5 10:17:46 2019 -> ERROR: Failed to load new database: Malformed database
Thu Dec  5 10:17:47 2019 -> WARNING: Database load exited with status 55
Thu Dec  5 10:17:47 2019 -> ERROR: Failed to load new database
Thu Dec  5 10:17:47 2019 -> --------------------------------------

First entry shows last success, second entry shows first failure. Failing every hour from this point forward. Issue occurred while using analogic/poste.io:2.1.11. Tried upgrading to analogic/poste.io:2.2.0 and issue continues.

Docker host has 2Gb assigned. docker stats output shows no where near 1.94GiB limit.

CONTAINER ID        NAME                CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
2ab0085c2a04        mailserver          0.71%               1.082GiB / 1.947GiB   55.58%              913kB / 1.93MB      713MB / 424MB       88

Run Configuration

#!/bin/bash
docker run \
    -d \
    -p 25:25 \
    -p 80:80 \
    -p 110:110 \
    -p 143:143 \
    -p 443:443 \
    -p 587:587 \
    -p 993:993 \
    -p 995:995 \
    --restart unless-stopped \
    -e DISABLE_ROUNDCUBE='true' \
    -v /etc/localtime:/etc/localtime:ro \
    -v /root/data:/data \
    -v /root/config/sieve/90-plugin.conf:/etc/dovecot/conf.d/90-plugin.conf \
    --name "mailserver" \
    -h "(redacted)" \
    -t analogic/poste.io:2.2.0

Freshclam Status

Running freshclam from within the container yields

# freshclam
Thu Dec  5 14:50:59 2019 -> ClamAV update process started at Thu Dec  5 14:50:59 2019
Thu Dec  5 14:50:59 2019 -> ^Your ClamAV installation is OUTDATED!
Thu Dec  5 14:50:59 2019 -> ^Local version: 0.101.4 Recommended version: 0.102.1
Thu Dec  5 14:50:59 2019 -> DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
Thu Dec  5 14:50:59 2019 -> main.cld is up to date (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr)
Thu Dec  5 14:50:59 2019 -> daily.cld is up to date (version: 25654, sigs: 2029534, f-level: 63, builder: raynman)
Thu Dec  5 14:50:59 2019 -> bytecode.cld is up to date (version: 331, sigs: 94, f-level: 63, builder: anvilleg)

Comments (3)

  1. Christopher Scheidel reporter

    Going to self close this problem, as it appears it was an issue with the AV file daily-25654.cdiff specifically.

    Thu Dec  5 13:17:55 2019 -> --------------------------------------
    Thu Dec  5 13:17:55 2019 -> ClamAV update process started at Thu Dec  5 13:17:55 2019
    Thu Dec  5 13:17:55 2019 -> WARNING: Your ClamAV installation is OUTDATED!
    Thu Dec  5 13:17:55 2019 -> WARNING: Local version: 0.101.4 Recommended version: 0.102.1
    Thu Dec  5 13:17:55 2019 -> DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
    Thu Dec  5 13:17:55 2019 -> main.cld is up to date (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr)
    Thu Dec  5 13:17:56 2019 -> Downloading daily-25654.cdiff [100%]
    Thu Dec  5 13:18:50 2019 -> WARNING: [LibClamAV] mpool_malloc(): Can't allocate memory (262144 bytes).
    Thu Dec  5 13:18:50 2019 -> WARNING: [LibClamAV] cli_mpool_strdup(): Can't allocate memory (27 bytes).
    Thu Dec  5 13:18:50 2019 -> WARNING: [LibClamAV] cli_loadhash: Problem parsing database at line 288394
    Thu Dec  5 13:18:50 2019 -> WARNING: [LibClamAV] Can't load daily.hdb: Malformed database
    Thu Dec  5 13:18:50 2019 -> WARNING: [LibClamAV] cli_tgzload: Can't load daily.hdb
    Thu Dec  5 13:18:50 2019 -> WARNING: [LibClamAV] Can't load /data/var/clamav/clamav-b3c7af529443d629585c02db4a19f371.tmp/clamav-94d506d5218ae46d8467600fc1f356f0.cld: Malformed database
    Thu Dec  5 13:18:50 2019 -> ERROR: Failed to load new database: Malformed database
    Thu Dec  5 13:18:52 2019 -> WARNING: Database load exited with status 55
    Thu Dec  5 13:18:52 2019 -> ERROR: Failed to load new database
    Thu Dec  5 13:35:17 2019 -> --------------------------------------
    Thu Dec  5 13:35:17 2019 -> ClamAV update process started at Thu Dec  5 13:35:17 2019
    Thu Dec  5 13:35:17 2019 -> WARNING: Your ClamAV installation is OUTDATED!
    Thu Dec  5 13:35:17 2019 -> WARNING: Local version: 0.101.4 Recommended version: 0.102.1
    Thu Dec  5 13:35:17 2019 -> DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
    Thu Dec  5 13:35:17 2019 -> main.cld is up to date (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr)
    Thu Dec  5 13:35:24 2019 -> Downloading daily-25654.cdiff [100%]
    Thu Dec  5 13:36:40 2019 -> daily.cld updated (version: 25654, sigs: 2029534, f-level: 63, builder: raynman)
    Can't query daily.25654.105.1.0.6810DA54.ping.clamav.net
    Thu Dec  5 13:36:40 2019 -> bytecode.cld is up to date (version: 331, sigs: 94, f-level: 63, builder: anvilleg)
    Thu Dec  5 13:36:43 2019 -> Database updated (6594530 signatures) from db.local.clamav.net (IP: 104.16.218.84)
    Thu Dec  5 13:36:43 2019 -> WARNING: Clamd was NOT notified: Can't connect to clamd through /var/run/clamav/clamd.ctl: No such file or directory
    Thu Dec  5 13:38:57 2019 -> --------------------------------------
    Thu Dec  5 13:38:57 2019 -> ClamAV update process started at Thu Dec  5 13:38:57 2019
    Thu Dec  5 13:38:57 2019 -> WARNING: Your ClamAV installation is OUTDATED!
    Thu Dec  5 13:38:57 2019 -> WARNING: Local version: 0.101.4 Recommended version: 0.102.1
    Thu Dec  5 13:38:57 2019 -> DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
    Thu Dec  5 13:38:57 2019 -> main.cld is up to date (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr)
    Thu Dec  5 13:38:57 2019 -> daily.cld is up to date (version: 25654, sigs: 2029534, f-level: 63, builder: raynman)
    Thu Dec  5 13:38:57 2019 -> bytecode.cld is up to date (version: 331, sigs: 94, f-level: 63, builder: anvilleg)
    Thu Dec  5 13:45:29 2019 -> --------------------------------------
    

  2. Log in to comment