Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: Proxy on April 06, 2010, 06:46:22 PM

Title: Clamd going wild on CPU
Post by: Proxy 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

Title: Re: Clamd going wild on CPU
Post by: Stefano 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
Title: Re: Clamd going wild on CPU
Post by: CharlieBrady on April 06, 2010, 07:12:10 PM
What can i do to act clamd as normal again.

Diagnose and then fix the problem.
Title: Re: Clamd going wild on CPU
Post by: Proxy 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.
Title: Re: Clamd going wild on CPU
Post by: Proxy on April 09, 2010, 09:27:24 AM
How must i uninstall clamd from the SME v.74 ?
Title: Re: Clamd going wild on CPU
Post by: janet on April 09, 2010, 11:11:42 AM
Proxy

You can alter virus scanning settings in server manager, see the Email panel.
Title: Re: Clamd going wild on CPU
Post by: Proxy 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.
Title: Re: Clamd going wild on CPU
Post by: CharlieBrady 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?
Title: Re: Clamd going wild on CPU
Post by: Proxy on April 09, 2010, 03:35:40 PM
First un-install and then install again, maybe the problem is then over.
Title: Re: Clamd going wild on CPU
Post by: Proxy 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....
Title: Re: Clamd going wild on CPU
Post by: CharlieBrady 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.
Title: Re: Clamd going wild on CPU
Post by: Proxy 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
Title: Re: Clamd going wild on CPU
Post by: mercyh 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/

Title: Re: Clamd going wild on CPU
Post by: Proxy 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.. ;-)