Clamav usage CPU 100 % after ugprade to Debian 12

Discussion in 'Installation/Configuration' started by pecka33, Aug 9, 2023.

  1. pecka33

    pecka33 Member

    Hello,

    i did upgrade debian 11 to debian 12. All working fine but i have a problem with clamav. When i used top command a see first line

    Code:
     36142 clamav    20   0  598716 540856  13020 R  93.8   1.6   0:02.23 clamd
    
    i tried to stop clamav and manually start, restart etc. but still is here. For example in freshcalm log are lines as

    Code:
    Wed Aug  9 10:27:43 2023 -> Update process terminated
    Wed Aug  9 10:27:49 2023 -> --------------------------------------
    Wed Aug  9 10:27:49 2023 -> ClamAV update process started at Wed Aug  9 10:27:49 2023
    Wed Aug  9 10:27:49 2023 -> daily database available for update (local version: 26994, remote version: 26995)
    Wed Aug  9 10:27:49 2023 -> Testing database: '/var/lib/clamav/tmp.46a9106c75/clamav-c4db7e5f5bf3b3239702c9a8161718f4.tmp-daily.cld' ...
    Wed Aug  9 10:27:52 2023 -> WARNING: [LibClamAV] cli_dbgets: Invalid data or internal buffer too small
    Wed Aug  9 10:27:52 2023 -> WARNING: [LibClamAV] cli_tgzload: File daily.hsb not correctly loaded
    Wed Aug  9 10:27:52 2023 -> WARNING: [LibClamAV] Can't load /var/lib/clamav/tmp.46a9106c75/clamav-c4db7e5f5bf3b3239702c9a8161718f4.tmp-daily.cld: Malformed database
    Wed Aug  9 10:27:52 2023 -> ERROR: Failed to load new database: Malformed database
    Wed Aug  9 10:27:53 2023 -> WARNING: Stderr output from database load : WARNING: Wed Aug  9 10:27:52 2023 -> [LibClamAV] cli_dbgets: Invalid data or internal buffer too small [...] ERROR: Wed Aug  9 10:27:52 2023 -> Failed to load new database: Malformed database
    Wed Aug  9 10:27:53 2023 -> WARNING: Database load exited with "Test failed"
    Wed Aug  9 10:27:53 2023 -> ERROR: Database test FAILED.
    Wed Aug  9 10:27:53 2023 -> ERROR: Unexpected error when attempting to update daily: Test failed
    Wed Aug  9 10:27:53 2023 -> ERROR: Database update process failed: Test failed
    Wed Aug  9 10:27:53 2023 -> ERROR: Update failed.
    
    i check to clamav status and get

    Code:
    xx@xx:~# service clamav-freshclam status
    ○ clamav-freshclam.service - ClamAV virus database updater
         Loaded: loaded (/lib/systemd/system/clamav-freshclam.service; enabled; pre>
         Active: inactive (dead) since Wed 2023-08-09 10:27:43 CEST; 1min 30s ago
       Duration: 20.838s
           Docs: man:freshclam(1)
                 man:freshclam.conf(5)
                 https://docs.clamav.net/
        Process: 35716 ExecStart=/usr/bin/freshclam -d --foreground=true (code=exit>
       Main PID: 35716 (code=exited, status=0/SUCCESS)
            CPU: 3.890s
    
    Aug 09 10:27:26 xx freshclam[35716]: WARNING: Wed Aug  9 10:27:26 2023 ->>
    Aug 09 10:27:26 xx freshclam[35716]: ERROR: Wed Aug  9 10:27:26 2023 -> D>
    Aug 09 10:27:27 xx freshclam[35716]: ERROR: Wed Aug  9 10:27:27 2023 -> U>
    Aug 09 10:27:27 xxfreshclam[35716]: ERROR: Wed Aug  9 10:27:27 2023 -> D>
    Aug 09 10:27:27 xx freshclam[35716]: ERROR: Wed Aug  9 10:27:27 2023 -> U>
    Aug 09 10:27:43 xx freshclam[35716]: Wed Aug  9 10:27:43 2023 -> Update p>
    Aug 09 10:27:43 xx systemd[1]: Stopping clamav-freshclam.service - ClamAV>
    Aug 09 10:27:43 xx systemd[1]: clamav-freshclam.service: Deactivated succ>
    Aug 09 10:27:43 xx systemd[1]: Stopped clamav-freshclam.service - ClamAV >
    Aug 09 10:27:43 xx systemd[1]: clamav-freshclam.service: Consumed 3.890s >
    lines 1-21/21 (END)...skipping...
    ○ clamav-freshclam.service - ClamAV virus database updater
         Loaded: loaded (/lib/systemd/system/clamav-freshclam.service; enabled; preset: enabled)
         Active: inactive (dead) since Wed 2023-08-09 10:27:43 CEST; 1min 30s ago
       Duration: 20.838s
           Docs: man:freshclam(1)
                 man:freshclam.conf(5)
                 https://docs.clamav.net/
        Process: 35716 ExecStart=/usr/bin/freshclam -d --foreground=true (code=exited, status=0/SUCCESS)
       Main PID: 35716 (code=exited, status=0/SUCCESS)
            CPU: 3.890s
    
    Aug 09 10:27:26 xx freshclam[35716]: WARNING: Wed Aug  9 10:27:26 2023 -> Database load exited with "Test failed"
    Aug 09 10:27:26 xx freshclam[35716]: ERROR: Wed Aug  9 10:27:26 2023 -> Database test FAILED.
    Aug 09 10:27:27 xx freshclam[35716]: ERROR: Wed Aug  9 10:27:27 2023 -> Unexpected error when attempting to update daily: Test failed
    Aug 09 10:27:27 xx freshclam[35716]: ERROR: Wed Aug  9 10:27:27 2023 -> Database update process failed: Test failed
    Aug 09 10:27:27 xx freshclam[35716]: ERROR: Wed Aug  9 10:27:27 2023 -> Update failed.
    Aug 09 10:27:43 xx freshclam[35716]: Wed Aug  9 10:27:43 2023 -> Update process terminated
    Aug 09 10:27:43 xx systemd[1]: Stopping clamav-freshclam.service - ClamAV virus database updater...
    Aug 09 10:27:43 xx systemd[1]: clamav-freshclam.service: Deactivated successfully.
    Aug 09 10:27:43 xx systemd[1]: Stopped clamav-freshclam.service - ClamAV virus database updater.
    Aug 09 10:27:43 xxx systemd[1]: clamav-freshclam.service: Consumed 3.890s CPU time.
    
    Any idea why please?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The clamav signature database is broken. I guess you have to remove the database from /var/lib/clamav and then use freshclam to download a new one.
     
  3. pecka33

    pecka33 Member

    Yes, this help to me, thank you.
     
    till likes this.

Share This Page