Page 1 of 1

clamd crashing

Posted: 15 Mar 2015 16:52
by The_Penguin
Hi all. I have read a number of threads on clamd crashing, and I think my problem may be different.

I have been running EFA for about 3 months and it's been pretty good. Recently clamd started crashing. /var was a bit full, so I increased it, also increased RAM to 4GB and reduced MailScanner children.
Just upgraded to 3.0.0.7 and the problem persists.
System is running under Hyper-V Server 2012R2 on an Intel i7. The EFA VM has 4GB of RAM, 4 virtual CPUs,and 64GB of disk.
With clamd running and 4 instances of MailScanner running I have 962MB free

Code: Select all

[root@mcsspam etc]# free -m
             total       used       free     shared    buffers     cached
Mem:          3823       2861        962          0        121       1809
-/+ buffers/cache:        929       2893
Swap:            0          0          0
The error I see in syslog is a protection fault:

Code: Select all

Mar 15 09:46:21 mcsspam kernel: clamd[65470] general protection ip:348e6b2e45 sp:7fffaefccbe8 error:0 in libclamav.so.6.1.23[348e600000+178000]
Seems to be happening every 3 hours or so.
The only thing lacking on the physical host is disk speed, scheduled to change to a decent Adaptec RAID controller next week.

Anything I should be looking for?

Thanks in advance.

Re: clamd crashing

Posted: 16 Mar 2015 12:39
by The_Penguin
Update. Put more physical RAM in the Hyper-V server and bumped up the VM RAM to 6GB.
Also dropped the VCPus down to 2 (4 was overkill for my tiny workload) and now it seems stable.

Re: clamd crashing

Posted: 18 Mar 2015 03:36
by The_Penguin
Update 2, spoke too soon, had a few more crashes. Some protection faults, and some failures during self-check reload db failed: Malformed database
Did my RAID upgrade last night, Adaptec 6805 and my disk performance is significantly better. So maybe that was the issue, has been fine for 24 hours now. Fingers crossed.

Re: clamd crashing

Posted: 18 Mar 2015 14:11
by shawniverson
Cool, keep us posted :D

Re: clamd crashing

Posted: 08 Apr 2015 20:05
by ressel
My clamd is also crashing sometimes, and then EFA builds a big mail queue.
Until now my best fix, have been to reboot EFA server.
And then it will run again for some weeks.

Re: clamd crashing

Posted: 08 Apr 2015 20:52
by darky83
Most crashes i have had in my tests were due to the lack of memory.

Note that multiple factors determine the need for memory so your individual use case might need you to increase the memory.

One big thing to remember is that we don't run any swap partition in the system, so if you run out of memory the system will crash.

If you experience crashes try increasing the memory, depending on your workload and settings (mailscanner children is a huge factor here) you might even need to increase it way above the default 2 or 4 GB.

(I run a system with 64GB just for processing...)

If you don't have that much memory available you might try adding a disk to the VM and configure it as swap..
Just let me know if you need an howto, then i update the wiki with a small tutorial.