Koozali.org: home of the SME Server

Clamd memory problem, leading to smtp failures

Offline holck

  • *
  • 322
  • +1/-0
Clamd memory problem, leading to smtp failures
« on: June 03, 2015, 08:27:04 AM »
Running SME 9, completely updated...

Clamd has been running for me for ages, with no problems. But yesterday, it suddenly experienced a memory problem:
Code: [Select]
2015-06-02 13:03:44.069130500 malloc_problem: Cannot allocate memory
2015-06-02 13:03:44.069134500 LibClamAV Error: cli_malloc(): Can't allocate memory (78 bytes).
2015-06-02 13:03:44.069135500 LibClamAV Error: lineCreate: Unable to allocate memory for ret
2015-06-02 13:04:11.512157500 Access denied: (null)
Messages similar to these are shown several times in the clamd log for the following hours.
I first noticed this a few hours later, because the server wouldn't accept incoming e-mails. top showed a cpu-utilization of 100% for clamd. The qpsmtpd log-file showed lots of messages like
Code: [Select]
2015-06-02 15:05:57.532424500
2015-06-02 15:05:57.532424500 9995 logging::logterse plugin (deny): ` 212.60.118.215    msg1.anycloud.dk        msg1.anycloud.dk        <faktura@fb.dk> <user@mydomain.dk>     virus::clamav   902             msg denied before queued
2015-06-02 15:07:05.384682500 10019 virus::clamav plugin (data_post): Changing permissions on file to permit scanner access
2015-06-02 15:07:05.405196500 10019 virus::clamav plugin (data_post): ClamAV error: /usr/bin/clamdscan --stdout  --config-file=/etc/clamd.conf --no-summary /var/spool/qpsmtpd/1433250418:10019:0 2>&1: 2
I managed to kill -9 clamd, did a signal-event email-update, and the server started accepting emails for internal users again. But for some reason, unknown to me, it still wouldn't accept emails from users outside the LAN, supplying user names and passwords. I wasn't able to find out why.

But even though I didn't change anything, after a few hours, the server started accepting these emails again, as it usually does (users from outside the LAN, using the server as an external SMTP-server, if validated with user names and passwords). Strange ...

I can see on the net that the memory requirements for clamd often have been a problem. But it would be nice, if these situations could be handled more gracefully.
......

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: Clamd memory problem, leading to smtp failures
« Reply #1 on: June 03, 2015, 09:08:16 AM »
Hi. Please, could you open a bug, with this information, and some more details, like:

- if you're running SME9 i386 or x86_64
- when did the problem started (yesterday, but was it after an update or something ?)
- which version of clamd and smeserver-clamav are installed

We'll then be able to fixe it.

Thanks
C'est la fin du monde !!! :lol:

Offline holck

  • *
  • 322
  • +1/-0
......