On a Debian 10 server I have this problem with clamav:
root@vps:~# clamscan -r -v --stdout /
Killed
You see I use the verbose flag but that does not give me any information. In years of using clam I have not had this problem. I know it's not a database problem:
root@vps:~# freshclam
Sun Mar 1 00:18:39 2020 -> ClamAV update process started at Sun Mar 1 00:18:39 2020
Sun Mar 1 00:18:39 2020 -> daily.cvd database is up to date (version: 25737, sigs: 2201376, f-level: 63, builder: raynman)
Sun Mar 1 00:18:39 2020 -> main.cvd database is up to date (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr)
Sun Mar 1 00:18:39 2020 -> bytecode.cvd database is up to date (version: 331, sigs: 94, f-level: 63, builder: anvilleg)
Please suggest steps to test.
EDIT: This is an OpenVZ VPS with 512MB RAM.
EDIT: strace
shows killed by SIGKILL
but that doesn't tell me much.
Best Answer
As mentioned in some of the other comments, the likely culprit is
oom_killer
oroom_reaper
. You can check for this by tailing/var/log/messages
while runningclamscan
. Ex:In my case,
clamscan
died after a few seconds, and messages such as the following appeared within/var/log/messages
:So, if you observe the same thing, then you should try allocating more resources (ie: memory) to the machine instance.