pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

clamav on i386: infinite cpu usage with freshclam



I have used clamav off and on over the years with reasonable results
(for the concept).  I recently wanted to scan a NetBSD 9/i386 machine,
so I installed a binary package and ran freshclam.  That downloaded a
definition file in /var/clamav/tmp.63c1632ca5 and then proceeded to sit
with 100% CPU usage.  I let it go 10 hours, on a 2006 Macbook.  I had
the same long-CPU (but only let it go half an hour) on a 2006ish
desktop.

I had built the binary package myself, with userland being recent
netbsd-9 and pkgsrc being 2023Q1.  Everything else coming from this
build is fine.

On a 2008 MacbookPro running Netbsd 9/amd64, freshclam finished in 127s
after downloading and testing several databases.  It was not super fast,
but clearly not hanging.  This machine is in the same speed ballpark as
the 2006 Macbook, perhaps twice as fast but close.  Both have 4GB of RAM.

  #> time freshclam
  ClamAV update process started at Mon Apr 24 19:36:48 2023
  daily database available for download (remote version: 26886)
  Time:   10.1s, ETA:    0.0s [========================>]   58.37MiB/58.37MiB
  Testing database: '/var/clamav/tmp.120aee1763/clamav-06a2742c6a3afc6d9e133e5e0869c789.tmp-daily.cvd' ...
  Database test passed.
  daily.cvd updated (version: 26886, sigs: 2031620, f-level: 90, builder: raynman)
  main database available for download (remote version: 62)
  Time:   27.0s, ETA:    0.0s [========================>]  162.58MiB/162.58MiB
  Testing database: '/var/clamav/tmp.120aee1763/clamav-828b7351393983bb0906e249c211f007.tmp-main.cvd' ...
  Database test passed.
  main.cvd updated (version: 62, sigs: 6647427, f-level: 90, builder: sigmgr)
  bytecode database available for download (remote version: 334)
  Time:    1.8s, ETA:    0.0s [========================>]  285.12KiB/285.12KiB
  Testing database: '/var/clamav/tmp.120aee1763/clamav-e1952b390aa32bddac2ca85bb9d7648e.tmp-bytecode.cvd' ...
  Database test passed.
  bytecode.cvd updated (version: 334, sigs: 91, f-level: 90, builder: anvilleg)

  real    2m6.670s
  user    1m29.967s
  sys     0m8.440s

But on the 2006 i386 desktop, 100% CPU and some data from killing it:

  #> time freshclam
  ClamAV update process started at Mon Apr 24 19:39:20 2023
  daily database available for download (remote version: 26886)
  Time:    5.6s, ETA:    0.0s [========================>]   58.37MiB/58.37MiB
  [ 14115848.0624071] load: 0.98  cmd: freshclam 25800 [iowait 0xb64aed87/0] 200.79u 5.33s 99% 9720k
  ^CUpdate process terminated

  real    3m32.944s
  user    3m25.677s
  sys     0m5.494s

Is anyone else seeing this?  Does clamav work for anyone on NetBSD/i386?


Home | Main Index | Thread Index | Old Index