Koozali.org: home of the SME Server

Clamd going wild on CPU

Offline Proxy

  • **
  • 28
  • +0/-0
Clamd going wild on CPU
« on: April 06, 2010, 06:46:22 PM »
Hi there,

My Clamd is going wild on CPU. (SME v.7.4)
I can stop it, no problem there (with Service Control a nice Contrib)
But when i start clamd up again then CPU goes from 50 to 98%
What can i do to act clamd as normal again.
Please help.

Kind regards,
Proxy


Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Clamd going wild on CPU
« Reply #1 on: April 06, 2010, 07:10:40 PM »
proxy: does you clamd stay at high cpu load for a while? for minutes? hours?

did you notice anything strange|interesting in /var/log/clamd/current?

please take the time to report in bugzilla, thank you

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Clamd going wild on CPU
« Reply #2 on: April 06, 2010, 07:12:10 PM »
What can i do to act clamd as normal again.

Diagnose and then fix the problem.

Offline Proxy

  • **
  • 28
  • +0/-0
Re: Clamd going wild on CPU
« Reply #3 on: April 06, 2010, 07:26:29 PM »
-> proxy: does you clamd stay at high cpu load for a while? for minutes? hours?
-> did you notice anything strange|interesting in /var/log/clamd/current?

For hours and hours...
The log is very strange indeed:

@400000004bb99cc110aee59c LibClamAV Error: mpool_malloc(): Can't allocate memory (262144 bytes).
@400000004bb99cd213622e5c LibClamAV Error: mpool_malloc(): Can't allocate memory (262144 bytes).
@400000004bb99cd213680e44 LibClamAV Error: cli_mpool_strdup(): Can't allocate memory (19 bytes).
@400000004bb99cd21368e904 LibClamAV Error: cli_loadmd5: Problem parsing database at line 364431
@400000004bb99cd21369db34 LibClamAV Error: Can't load main.mdb: Malformed database
@400000004bb99cd2136aa26c LibClamAV Error: cli_tgzload: Can't load main.mdb
@400000004bb99cd2136e6744 LibClamAV Error: Can't load /var/clamav/main.cld: Malformed database
@400000004bb99cd2137197ac ERROR: Malformed database
@400000004bb99cd2137623bc Closing the main socket.
@400000004bb99ce403354bf4 LibClamAV Error: mpool_malloc(): Can't allocate memory (262144 bytes).
@400000004bb99ce403387874 LibClamAV Error: cli_mpool_strdup(): Can't allocate memory (21 bytes).
@400000004bb99ce40339571c LibClamAV Error: cli_loadmd5: Problem parsing database at line 373101
@400000004bb99ce4033a511c LibClamAV Error: Can't load main.mdb: Malformed database
@400000004bb99ce4033cbe34 LibClamAV Error: cli_tgzload: Can't load main.mdb
@400000004bb99ce403403104 LibClamAV Error: Can't load /var/clamav/main.cld: Malformed database
@400000004bb99ce40346a944 ERROR: Malformed database
@400000004bb99ce40348ace4 Closing the main socket.
@400000004bb99e2712adf98c ERROR: LOCAL: Socket file /var/clamav/clamd.socket is in use by another process.
@400000004bb99e2714ff4074 Closing the main socket.
@400000004bb99e403a35bdb4 ERROR: LOCAL: Socket file /var/clamav/clamd.socket is in use by another process.
@400000004bb99e403a3de3a4 Closing the main socket.
@400000004bb99e5910e3f78c ERROR: LOCAL: Socket file /var/clamav/clamd.socket is in use by another process.
@400000004bb99e5910ea602c Closing the main socket.
@400000004bb99e780c5a29ac ERROR: LOCAL: Socket file /var/clamav/clamd.socket is in use by another process.
@400000004bb99e780e2256ec Closing the main socket.
@400000004bb99eb2392ed8ec ERROR: LOCAL: Socket file /var/clamav/clamd.socket is in use by another process.
@400000004bb99eb302f1c6cc Closing the main socket.

Offline Proxy

  • **
  • 28
  • +0/-0
Re: Clamd going wild on CPU
« Reply #4 on: April 09, 2010, 09:27:24 AM »
How must i uninstall clamd from the SME v.74 ?

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Clamd going wild on CPU
« Reply #5 on: April 09, 2010, 11:11:42 AM »
Proxy

You can alter virus scanning settings in server manager, see the Email panel.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Proxy

  • **
  • 28
  • +0/-0
Re: Clamd going wild on CPU
« Reply #6 on: April 09, 2010, 12:17:37 PM »
Yes i know but this goes futher, clamd is a part of SMEServer and uninstall is not so easy.
But thanks for your answer.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Clamd going wild on CPU
« Reply #7 on: April 09, 2010, 01:46:09 PM »
clamd is a part of SMEServer and uninstall is not so easy.

Correct. So why do you want to uninstall it?

Offline Proxy

  • **
  • 28
  • +0/-0
Re: Clamd going wild on CPU
« Reply #8 on: April 09, 2010, 03:35:40 PM »
First un-install and then install again, maybe the problem is then over.

Offline Proxy

  • **
  • 28
  • +0/-0
Re: Clamd going wild on CPU
« Reply #9 on: April 15, 2010, 12:26:04 PM »
I think i have found the solution for this problem:

1: Kill the clamd process if it's still running.
2: goto var/clamav and delete everything in that directory
3: goto etc/cron.daily and start freshclam
4: then start the clamd process again, after a few minutes high cpu clamd is ready to act normal.


I also tested it when i send and receive e-mails
So far it's working....
« Last Edit: April 15, 2010, 12:27:53 PM by Proxy »

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Clamd going wild on CPU
« Reply #10 on: April 15, 2010, 02:56:18 PM »
I think i have found the solution for this problem:

Please provide all your information via the bug tracker. Thanks.

Offline Proxy

  • **
  • 28
  • +0/-0
Re: Clamd going wild on CPU
« Reply #11 on: April 15, 2010, 03:40:29 PM »
What is a 'bug tracker' and how can i do that?
I like to help, but calling me bug Tracker is not nice  :D

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: Clamd going wild on CPU
« Reply #12 on: April 15, 2010, 03:59:14 PM »
You are joking I suppose, but I will bite.

Might be one of these:
http://bugs.contribs.org/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&product=SME+Server+7.X&content=clam

Or you may need to file an entirely new one:
http://bugs.contribs.org/


Offline Proxy

  • **
  • 28
  • +0/-0
Re: Clamd going wild on CPU
« Reply #13 on: April 15, 2010, 05:41:00 PM »
I know what a bug tracker is yes, that was a joke, but:

The part of clamd was not a joke.
The solution as describe above,.. i have found it after days of searching and thinking.
I don't think it's a bug, clamd just hung up, or perhaps the problem occurs when there is a new version update.?
I have seen reports of clamd CPU high for many years, seems to me there are bug tracker reports enough.
But then again i am a new-be, with 27 posts till now.. ;-)