Bug 10952 - Clamd shuts down on its own constantly without any errors
Clamd shuts down on its own constantly without any errors
Status: RESOLVED FIXED
Product: ClamAV
Classification: ClamAV
Component: clamd
stable
x86 GNU/Linux
: P3 major
: ---
Assigned To: ClamAV team
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-07 11:10 EDT by Martin Kovachev
Modified: 2014-05-20 12:53 EDT (History)
1 user (show)

See Also:
QA Contact:


Attachments
Clamd most recent log file (1.61 MB, application/octet-stream)
2014-04-07 11:10 EDT, Martin Kovachev
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Kovachev 2014-04-07 11:10:49 EDT
Created attachment 6578 [details]
Clamd most recent log file

I am baffled with an issue which i can't understand.

Clamd is stopping (appears to be stopping just fine - no errors) on its own on random periods of time - quite often: each hour or two.

I checked all logs, enabled all sorts of debug logging - nothing really strange showing up.

Checked up memory - plenty available...

Freshclam is also running and notifying clamd when necessary. I tried to stop it - no change - clamd is still stopping on its own.

I am attaching the most recent log file.

Let me know if you need anything else!

Thank you,
Martin Kovachev

CPU is: 

processor	: 3
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Xeon(R) CPU           E5420  @ 2.50GHz
stepping	: 10
cpu MHz		: 435.918
cache size	: 6144 KB
physical id	: 0
siblings	: 4
core id		: 3
cpu cores	: 4
apicid		: 3
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
bogomips	: 4987.50
clflush size	: 64
cache_alignment	: 64
address sizes	: 38 bits physical, 48 bits virtual
power management:

----
Memory state:

             total       used       free     shared    buffers     cached
Mem:          5956       1085       4871          0          0          0
-/+ buffers/cache:       1085       4871
Swap:            0          0          0

----
Clamd ps aux:

clam     32065  1.1  3.8 273180 231808 ?       Ssl  17:51   0:12 clamd

----
vmstat:

procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0      0 4988612      0      0    0    0   144    95    0    2  1  0 96  2  0
Comment 1 Martin Kovachev 2014-04-07 11:12:38 EDT
A few other notes in case they have a relation:

System is (OpenVZ):

Linux 2.6.18-371.3.1.el5.028stab110.1 #1 SMP Fri Dec 13 15:01:51 MSK 2013 i686 i686 i386 GNU/Linux
Comment 2 Steven Morgan 2014-04-08 18:55:40 EDT
Reviewed the log. Clamd is stopping and restarting every hour exactly (xx:50:02) from when it was started(03:50:02).

How was this clam installed originally (from source or from package)?

What process are used to start clamd and is any process monitoring clamd?

I also notice that this is clamav 0.97.6. Can you try 0.98.1?
Comment 3 Martin Kovachev 2014-04-09 03:40:11 EDT
(In reply to Steven Morgan from comment #2)
> Reviewed the log. Clamd is stopping and restarting every hour exactly
> (xx:50:02) from when it was started(03:50:02).
> 
> How was this clam installed originally (from source or from package)?
> 
> What process are used to start clamd and is any process monitoring clamd?
> 
> I also notice that this is clamav 0.97.6. Can you try 0.98.1?

Sorry forgot to mention this one: clamav was compiled from source.

I'll recompile with the new version and let you know how it handles.
Comment 4 Steven Morgan 2014-04-09 12:15:38 EDT
(In reply to Martin Kovachev from comment #3)
> (In reply to Steven Morgan from comment #2)
> > Reviewed the log. Clamd is stopping and restarting every hour exactly
> > (xx:50:02) from when it was started(03:50:02).
> > 
> > How was this clam installed originally (from source or from package)?
> > 
> > What process are used to start clamd and is any process monitoring clamd?
> > 
> > I also notice that this is clamav 0.97.6. Can you try 0.98.1?
> 
> Sorry forgot to mention this one: clamav was compiled from source.
> 
> I'll recompile with the new version and let you know how it handles.

Also, the messages that occur every hour:

Wed Mar 26 22:50:02 2014 -> Closing the main sockets.
Wed Mar 26 22:50:02 2014 -> Socket file removed.
Wed Mar 26 22:50:02 2014 -> +++ Started at Wed Mar 26 22:50:02 2014

These all come from clamd main(). The first two messages are from the end of main immediately prior to main()'s return. The third message is from the beginning of main(). There must be some script or process that is re-initiating main() following the shutdown. Can you identify what that is?
Comment 5 Martin Kovachev 2014-04-11 08:01:15 EDT
Hello once more.

After installing the latest version - cleanly by removing everything past - it all works now.

The crond restarting was done on purpose by myself - to counteract the constant 'death' of the daemon.

I have no idea what the cause was.. something to do with an unclean install with the previous versions i guess...

Sorry to have lost your time on this :(