Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-19 Thread Marko Lerota
Martin Blapp [EMAIL PROTECTED] writes:

 Hi,

 I just fixed those issues with the port.

 Thanks for reporting !

So we can safely use libpthread.so again? No need to use libmap.conf?

-- 
One cannot sell the earth upon which the people walk
Tacunka Witco 
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Clamav-90_2 Lockup with freebsd 6.2

2007-03-18 Thread Dimuthu Parussalla
Hi,

I am not sure why. But my dual xeon with libthr on clamav-90.1 still gives
very high cpu usage.

Is it fixed yet?

Di


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Martin Blapp
Sent: Saturday, 17 March 2007 1:00 AM
To: Laurent Frigault
Cc: Rob MacGregor; clamav-devel@lists.clamav.net;
freebsd-stable@freebsd.org
Subject: Re: Clamav-90_2 Lockup with freebsd 6.2



Hi,

I just fixed those issues with the port.

Thanks for reporting !

Martin Blapp, [EMAIL PROTECTED] [EMAIL PROTECTED]
--
ImproWare AG, UNIXSP  ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 61 826 93 00 Fax: +41 61 826 93 01
PGP: finger -l [EMAIL PROTECTED]
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
--

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]



___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Clamav-90_2 Lockup with freebsd 6.2

2007-03-18 Thread Martin Blapp


Hi,


I am not sure why. But my dual xeon with libthr on clamav-90.1 still gives
very high cpu usage.


It's the same case here. What happens if you limit kern.smp.maxcpus
to 1 ? Does it still use the same amount cpu time ? What happens if
you link clamd against libc_r ?

--
Martin
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-16 Thread Martin Blapp


Hi,

I just fixed those issues with the port.

Thanks for reporting !

Martin Blapp, [EMAIL PROTECTED] [EMAIL PROTECTED]
--
ImproWare AG, UNIXSP  ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 61 826 93 00 Fax: +41 61 826 93 01
PGP: finger -l [EMAIL PROTECTED]
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
--

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-15 Thread Kevin Way



[snip patch]

Does this patch make the libmap.conf hack unneeded?



I frist thought so, but no, the more threads are running concurrently
the slower libpthreads behaves, as it gets more lock contention. Until
this is addressed somehow, use libthr.so

FWIW, we have several machines running with the libmap.conf hack.  
clamav no longer locks up, but has instead taken to occasionally dying 
altogether.


It's an easier to detect and manage situation, but if you're counting on 
clamav's presence, I strongly recommend the use of an external watchdog 
process.


Best Regards,
Kevin Way
Inside Systems, Inc.


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-15 Thread Mike Tancsa

At 01:52 PM 3/15/2007, Kevin Way wrote:


FWIW, we have several machines running with the libmap.conf hack.
clamav no longer locks up, but has instead taken to occasionally 
dying altogether.

Hi,
I think there are other bugs in the current clamd, the main one that 
we run into is when it tries to reload the database, and it somehow 
confuses itself and exits.


http://lurker.clamav.net/message/20070314.170629.9118e704.en.html


---Mike 


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-15 Thread Rob MacGregor
Mike Tancsa unleashed the infinite monkeys on 15/03/2007 19:58 producing:
 At 01:52 PM 3/15/2007, Kevin Way wrote:
 
 FWIW, we have several machines running with the libmap.conf hack.
 clamav no longer locks up, but has instead taken to occasionally dying
 altogether.
 Hi,
 I think there are other bugs in the current clamd, the main one that we
 run into is when it tries to reload the database, and it somehow
 confuses itself and exits.
 
 http://lurker.clamav.net/message/20070314.170629.9118e704.en.html

At least on FreeBSD 5.4 I think I've tracked the problem down to -lthr:

  http://www.freebsd.org/cgi/query-pr.cgi?pr=110352

Using either -lpthread or simply not using -lthr clamd (for me) doesn't
crash (well, not yet :).

Only happens to me with 0.90.1 in daemon mode.  With 0.90_x or 0.90.1 in
foreground mode it stays running afer the selfcheck.

-- 
 Rob | Oh my God! They killed init! You bastards!
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-15 Thread Laurent Frigault
On Thu, Mar 15, 2007 at 08:28:10PM +, Rob MacGregor wrote:
  FWIW, we have several machines running with the libmap.conf hack.
  clamav no longer locks up, but has instead taken to occasionally dying
  altogether.
  Hi,
  I think there are other bugs in the current clamd, the main one that
  we run into is when it tries to reload the database, and it somehow
  confuses itself and exits.
  
  http://lurker.clamav.net/message/20070314.170629.9118e704.en.html
 
 At least on FreeBSD 5.4 I think I've tracked the problem down to -lthr:
 
   http://www.freebsd.org/cgi/query-pr.cgi?pr=110352
 
 Using either -lpthread or simply not using -lthr clamd (for me) doesn't
 crash (well, not yet :).
 
 Only happens to me with 0.90.1 in daemon mode.  With 0.90_x or 0.90.1 in
 foreground mode it stays running afer the selfcheck.

I have seen several clamd locks under 5.5 + libthr with 0.90.1 . No
problem under 5.5 with pthread . See the 2nd part of 

http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/110334

regards,
-- 
Laurent Frigault | url:http://www.agneau.org/
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-12 Thread Martin Blapp


Hi,


[snip patch]

Does this patch make the libmap.conf hack unneeded?



I frist thought so, but no, the more threads are running concurrently
the slower libpthreads behaves, as it gets more lock contention. Until
this is addressed somehow, use libthr.so

--
Martin
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-11 Thread Larry Rosenman

On Sat, 10 Mar 2007, Mike Jakubik wrote:


Martin Blapp wrote:
Clamd with libpthread.so is still broken. Please use libthr.so. I'm 
currently
investigating why libpthreads.so has problems with clamd, and it looks to 
me

like a library bug.


This may be related to a problem i had with Mysql on a large server recently. 
Mysql threads would start eating a lot of CPU and staying around forever. I 
switched to libthr and the problem went away. Sorry, i don't have any more 
info than this, because it is a production server i cant mess around with it 
any more.

I've seen the high-cpu stuff with ClamAV_0.90_3, even with libthr.

Anyone got a fix?

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 512-248-2683 E-Mail: ler@lerctr.org
US Mail: 430 Valona Loop, Round Rock, TX 78681-3893
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-10 Thread Martin Blapp


Hi,


Don't use it, it's broken.

-trog


Nope, it looks like a race in cli_scanmail() which deadlocks somewhere
with libpthread.so. This workaround fixes the problem for me. I'm still
investigating where the real cause for this problem is.

--- libclamav/scanners.cTue Feb 13 02:06:28 2007
+++ libclamav/scanners.cSat Mar 10 12:00:16 2007
@@ -38,6 +38,9 @@
 #include netinet/in.h
 #endif

+#  include pthread.h
+static pthread_mutex_t extractmail_mutex = PTHREAD_MUTEX_INITIALIZER;
+
 #if HAVE_MMAP
 #if HAVE_SYS_MMAN_H
 #include sys/mman.h
@@ -1652,12 +1655,16 @@
 /*
  * Extract the attachments into the temporary directory
  */
+pthread_mutex_lock(extractmail_mutex);
 if((ret = cli_mbox(dir, desc, ctx))) {
-   if(!cli_leavetemps_flag)
+   if(!cli_leavetemps_flag) {
+   pthread_mutex_unlock(extractmail_mutex);
cli_rmdirs(dir);
+   }
free(dir);
return ret;
 }
+pthread_mutex_unlock(extractmail_mutex);

 ret = cli_scandir(dir, ctx);

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-10 Thread Martin Blapp


And even more narrowed down ...

--- libclamav/mbox.c.orig   Tue Feb 13 14:06:57 2007
+++ libclamav/mbox.cSat Mar 10 14:09:09 2007
@@ -413,6 +413,7 @@

 #ifdef CL_THREAD_SAFE
 static pthread_mutex_t tables_mutex = PTHREAD_MUTEX_INITIALIZER;
+static  pthread_mutex_t body_mutex = PTHREAD_MUTEX_INITIALIZER;
 #endif

 #ifndefO_BINARY
@@ -1494,6 +1495,7 @@
/*
 * Write out the last entry in the mailbox
 */
+   pthread_mutex_lock(body_mutex);
if((retcode == CL_SUCCESS)  messageGetBody(body)) {
messageSetCTX(body, ctx);
switch(parseEmailBody(body, NULL, mctx, 0)) {
@@ -1505,6 +1507,7 @@
break;
}
}
+   pthread_mutex_unlock(body_mutex);

/*
 * Tidy up and quit

Martin Blapp, [EMAIL PROTECTED] [EMAIL PROTECTED]
--
ImproWare AG, UNIXSP  ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 61 826 93 00 Fax: +41 61 826 93 01
PGP: finger -l [EMAIL PROTECTED]
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
--

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-10 Thread Mike Jakubik

Martin Blapp wrote:
Clamd with libpthread.so is still broken. Please use libthr.so. I'm 
currently
investigating why libpthreads.so has problems with clamd, and it looks 
to me

like a library bug.


This may be related to a problem i had with Mysql on a large server 
recently. Mysql threads would start eating a lot of CPU and staying 
around forever. I switched to libthr and the problem went away. Sorry, i 
don't have any more info than this, because it is a production server i 
cant mess around with it any more.
   
___

freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-08 Thread Marko Lerota
Renato Botelho [EMAIL PROTECTED] writes:

 I found the problem, a bad REINPLACE_CMD was changing wrong var on configure
 scripts, don't respecting PTHREAD_LIBS.

 It's fixed now on 0.90_3.

No, It's not. Today I added a new server with fresh clamav-0.90_3
package. Sockstat again started to jump to the sky. 

-- 
One cannot sell the earth upon which the people walk
Tacunka Witco 
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-08 Thread Martin Blapp


Hi,


No, It's not. Today I added a new server with fresh clamav-0.90_3
package. Sockstat again started to jump to the sky.


Clamd with libpthread.so is still broken. Please use libthr.so. I'm currently
investigating why libpthreads.so has problems with clamd, and it looks to me
like a library bug.

--
Martin
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Clamav-90_2 Lockup with freebsd 6.2

2007-03-08 Thread Dimuthu Parussalla
How do I tell clamd to use libthr.so ?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Martin Blapp
Sent: Friday, 9 March 2007 4:08 AM
To: Marko Lerota
Cc: Chris; freebsd-stable@freebsd.org; Renato Botelho; Daniel Eischen;
Anton Karpov; Alexander Shikoff
Subject: Re: Clamav-90_2 Lockup with freebsd 6.2



Hi,

 No, It's not. Today I added a new server with fresh clamav-0.90_3
 package. Sockstat again started to jump to the sky.

Clamd with libpthread.so is still broken. Please use libthr.so. I'm
currently
investigating why libpthreads.so has problems with clamd, and it looks to me
like a library bug.

--
Martin
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]



___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Clamav-90_2 Lockup with freebsd 6.2

2007-03-08 Thread Mike Tancsa

At 03:19 PM 3/8/2007, Dimuthu Parussalla wrote:

How do I tell clamd to use libthr.so ?


Create the file  /etc/libmap.conf with the contents

[clamd]
libc_r.so.5 libthr.so.2
libc_r.so.6 libthr.so.2
libthr.so.2 libthr.so.2
libpthread.so.1 libthr.so.2
libpthread.so.2 libthr.so.2

---Mike



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Martin Blapp
Sent: Friday, 9 March 2007 4:08 AM
To: Marko Lerota
Cc: Chris; freebsd-stable@freebsd.org; Renato Botelho; Daniel Eischen;
Anton Karpov; Alexander Shikoff
Subject: Re: Clamav-90_2 Lockup with freebsd 6.2



Hi,

 No, It's not. Today I added a new server with fresh clamav-0.90_3
 package. Sockstat again started to jump to the sky.

Clamd with libpthread.so is still broken. Please use libthr.so. I'm
currently
investigating why libpthreads.so has problems with clamd, and it looks to me
like a library bug.

--
Martin
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]



___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-08 Thread Doug Barton

Mike Tancsa wrote:

Create the file  /etc/libmap.conf with the contents

[clamd]



libthr.so.2 libthr.so.2


I don't know why that error keeps cropping up, but it should be noted 
that this isn't necessary, or desirable.


Doug

--

This .signature sanitized for your protection

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-08 Thread Mike Tancsa

At 04:43 PM 3/8/2007, Doug Barton wrote:

Mike Tancsa wrote:

Create the file  /etc/libmap.conf with the contents
[clamd]



libthr.so.2 libthr.so.2


I don't know why that error keeps cropping up, but it should be 
noted that this isn't necessary, or desirable.


Thanks,
It was just a typo (too many yy p no doubt...)

---Mike 


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-07 Thread Renato Botelho
On Tue, Mar 06, 2007 at 03:58:33PM -0500, Mike Tancsa wrote:
 At 10:55 AM 3/1/2007, Renato Botelho wrote:
 
  FYI: https://wwws.clamav.net/bugzilla/show_bug.cgi?id=307#c8
 
 I found the problem, a bad REINPLACE_CMD was changing wrong var on 
 configure
 scripts, don't respecting PTHREAD_LIBS.
 
 It's fixed now on 0.90_3.
 
 Any chance to update the port to use 0.90.1  ? It fixes a number of 
 bugs, one of which happens fairly often (bad directory perms after a db 
 update)

I'm working on this, but since this version bumped libclamav version, i need
to test and fix all clamav dependant ports.

-- 
Renato Botelho garga @ FreeBSD.org
   freebsd @ galle.com.br
GnuPG Key: http://www.FreeBSD.org/~garga/pubkey.asc

Conquering the world on horseback is easy; it is dismounting and
governing that is hard.
-- Chinggis (Genghis) Khan
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-07 Thread Chris

On 06/03/07, Mike Tancsa [EMAIL PROTECTED] wrote:

At 10:55 AM 3/1/2007, Renato Botelho wrote:
 
  FYI: https://wwws.clamav.net/bugzilla/show_bug.cgi?id=307#c8

I found the problem, a bad REINPLACE_CMD was changing wrong var on configure
scripts, don't respecting PTHREAD_LIBS.

It's fixed now on 0.90_3.

Any chance to update the port to use 0.90.1  ? It fixes a number of
bugs, one of which happens fairly often (bad directory perms after a db update)

---Mike




What configuration in exim is needed to make it use tcp instead of sockets?

thanks

Chris
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-07 Thread Pete French
 What configuration in exim is needed to make it use tcp instead of sockets?

av_scanner = clamd:127.0.0.1 3310

instead of

av_scanner = clamd:/var/run/clamav/clamd

and then in clamd.conf, comment out 'LocalSocket' and uncomment the
'TCPSocket' and 'TCPAddr' settings so it looks like this:

#LocalSocket /var/run/clamav/clamd
TCPSocket 3310
TCPAddr 127.0.0.1  

-pcf
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-07 Thread Chris

On 07/03/07, Pete French [EMAIL PROTECTED] wrote:

 What configuration in exim is needed to make it use tcp instead of sockets?

   av_scanner = clamd:127.0.0.1 3310

instead of

   av_scanner = clamd:/var/run/clamav/clamd

and then in clamd.conf, comment out 'LocalSocket' and uncomment the
'TCPSocket' and 'TCPAddr' settings so it looks like this:

   #LocalSocket /var/run/clamav/clamd
   TCPSocket 3310
   TCPAddr 127.0.0.1

-pcf


many thanks seems to be working

Chris
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-06 Thread Renato Botelho
On Thu, Mar 01, 2007 at 03:43:26PM +0200, Alexander Shikoff wrote:
 Hi All,
 
 On Thu, Mar 01, 2007 at 08:32:55AM -0500, Daniel Eischen wrote:
  On Thu, 1 Mar 2007, Martin Blapp wrote:
  
  
  Hi,
  
  Clamd is currently broken with libpthread for some threading-reason.
  You definitly need to use libthr (which is still CPU hungry, but
  works better).
  
  I don't think it is a problem with libpthread.
 
 FYI: https://wwws.clamav.net/bugzilla/show_bug.cgi?id=307#c8

I found the problem, a bad REINPLACE_CMD was changing wrong var on configure
scripts, don't respecting PTHREAD_LIBS.

It's fixed now on 0.90_3.

Thanks for all.
-- 
Renato Botelho garga @ FreeBSD.org
   freebsd @ galle.com.br
GnuPG Key: http://www.FreeBSD.org/~garga/pubkey.asc

Love at first sight is one of the greatest
labor-saving devices the world has ever seen.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-06 Thread Oliver Brandmueller
Hi,

On Fri, Mar 02, 2007 at 11:19:40AM -0300, Carlos Horowicz wrote:
 Anybody tried this additionally in /etc/libmap.conf ?
 
 [/usr/local/lib/libclamav.so.1]
 libpthread.so.2 libthr.so.2
 
 clamav-0.90_2 reduced CPU consumption for me on 6.2-Stable since I 
 added the two sections in libmap.conf

Apart from already running with libthr for clamav for a long time, I 
just changed my exim config: While having big CPU usage problems in the 
last days with exim connecting to the local socket I have exim 
now connecting to localhot:3310 by tcp. The difference is, that before 
clamd scanned all files in the directory given by exim. Effectively exim 
was unpacking the whole MIME structure and placed all parts in the dir 
plus the complete e-mail. That way clamd need to examine every single 
part and also checked the whole e-mail unpacking the structure by 
itself. When using the TCP socket the mail is just sent as a stream and 
clamd handles it completely. For us this was anyhow just the first step 
before moving clamd to a loadbalanced set of servers, so that a failing 
clamd does not affect exim anymore.

- Oliver


-- 
| Oliver Brandmueller | Offenbacher Str. 1  | Germany   D-14197 Berlin |
| Fon +49-172-3130856 | Fax +49-172-3145027 | WWW:   http://the.addict.de/ |
|   Ich bin das Internet. Sowahr ich Gott helfe.   |
| Eine gewerbliche Nutzung aller enthaltenen Adressen ist nicht gestattet! |
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-06 Thread Mike Tancsa

At 10:39 AM 3/6/2007, Oliver Brandmueller wrote:

last days with exim connecting to the local socket I have exim
now connecting to localhot:3310 by tcp. The difference is, that before


Perhaps this is why we were not seeing the high CPU usage post our 
upgrade, as we have the milters on our sendmail boxes talking back 
via TCP to a number of boxes running clamd.


---Mike 


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-06 Thread Pete French
 last days with exim connecting to the local socket I have exim 
 now connecting to localhot:3310 by tcp. The difference is, that before 
 clamd scanned all files in the directory given by exim. Effectively exim 
 was unpacking the whole MIME structure and placed all parts in the dir 

Interesting, am trying this now - have changed clamd to work via a socket,
but do you still have the 'demime = *' in your config where the
message is scanned ? Is this necessary anymore ?


-pcf.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-06 Thread Oliver Brandmueller
Hello,

On Tue, Mar 06, 2007 at 04:45:37PM +, Pete French wrote:
  last days with exim connecting to the local socket I have exim 
  now connecting to localhot:3310 by tcp. The difference is, that before 
  clamd scanned all files in the directory given by exim. Effectively exim 
  was unpacking the whole MIME structure and placed all parts in the dir 
 
 Interesting, am trying this now - have changed clamd to work via a socket,
 but do you still have the 'demime = *' in your config where the
 message is scanned ? Is this necessary anymore ?

Actually, the message gets unpacked by exim even without this option for 
the malware acl. It's removed, but doesn't give any difference. I don't 
know if it would have worked before, since it was already unpacked when 
the scanner was called.

- Olli


-- 
| Oliver Brandmueller | Offenbacher Str. 1  | Germany   D-14197 Berlin |
| Fon +49-172-3130856 | Fax +49-172-3145027 | WWW:   http://the.addict.de/ |
|   Ich bin das Internet. Sowahr ich Gott helfe.   |
| Eine gewerbliche Nutzung aller enthaltenen Adressen ist nicht gestattet! |


pgp5prJfKpTyU.pgp
Description: PGP signature


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-06 Thread Patrick Tracanelli
Had a similar behavior here, but with other MTA (qmail, clamdscan 
getting used from simscan).


After raising MaxThreads from 10 (default) to 40 CPU usage got back to 
its normal consuming level.


No idea if this info can help, but that was my recent experience.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Clamav-90_2 Lockup with freebsd 6.2

2007-03-06 Thread Dimuthu Parussalla
Hi,

I am running latest CVSUP branch today. Still having the same problem. Only
way to reduce cpu usage is to increase maxthreads as others mentioned.


What version it is fixed? is it not submitted through ports yet?

Regards
Dimi

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Renato Botelho
Sent: Friday, 2 March 2007 2:56 AM
To: Alexander Shikoff
Cc: Marko Lerota; Chris; freebsd-stable@FreeBSD.org; Daniel Eischen;
Martin Blapp; Anton Karpov
Subject: Re: Clamav-90_2 Lockup with freebsd 6.2


On Thu, Mar 01, 2007 at 03:43:26PM +0200, Alexander Shikoff wrote:
 Hi All,

 On Thu, Mar 01, 2007 at 08:32:55AM -0500, Daniel Eischen wrote:
  On Thu, 1 Mar 2007, Martin Blapp wrote:
 
  
  Hi,
  
  Clamd is currently broken with libpthread for some threading-reason.
  You definitly need to use libthr (which is still CPU hungry, but
  works better).
 
  I don't think it is a problem with libpthread.

 FYI: https://wwws.clamav.net/bugzilla/show_bug.cgi?id=307#c8

I found the problem, a bad REINPLACE_CMD was changing wrong var on configure
scripts, don't respecting PTHREAD_LIBS.

It's fixed now on 0.90_3.

Thanks for all.
--
Renato Botelho garga @ FreeBSD.org
   freebsd @ galle.com.br
GnuPG Key: http://www.FreeBSD.org/~garga/pubkey.asc

Love at first sight is one of the greatest
labor-saving devices the world has ever seen.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]



___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-06 Thread Mike Tancsa

At 10:55 AM 3/1/2007, Renato Botelho wrote:


 FYI: https://wwws.clamav.net/bugzilla/show_bug.cgi?id=307#c8

I found the problem, a bad REINPLACE_CMD was changing wrong var on configure
scripts, don't respecting PTHREAD_LIBS.

It's fixed now on 0.90_3.


Any chance to update the port to use 0.90.1  ? It fixes a number of 
bugs, one of which happens fairly often (bad directory perms after a db update)


---Mike

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2 (fwd)

2007-03-05 Thread Martin Blapp


After further analyzing I think that pthread_cond_timedwait() in 
libpthread.so.2 has some issues.


While the default clamd worker timeout of 30 seconds is reached with
libc_r.so.6 and libthr.so.2 and pthread_cond_timedwait() returns ETIMEDOUT
there, libpthread.so doesn't get any ETIMEDOUT errors back at all, and the code
can never reach the part where the worker thread gets detached and the thread
count gets decreased.

With libpthread.so.2 pthread_cond_timedwait() returns always 0.

The manpage tells me:


The pthread_cond_timedwait() function atomically blocks the current
thread waiting on the condition variable specified by cond, and unblocks
the mutex specified by mutex.  The waiting thread unblocks only after
another thread calls pthread_cond_signal(3), or pthread_cond_broadcast(3)
with the same condition variable, or if the system time reaches the time
specified in abstime, and the current thread reacquires the lock on
mutex.


That doesn't seem to work with libpthread.so.2. Any hints ?

--
Martin

Martin Blapp, [EMAIL PROTECTED] [EMAIL PROTECTED]
--
ImproWare AG, UNIXSP  ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 61 826 93 00 Fax: +41 61 826 93 01
PGP: finger -l [EMAIL PROTECTED]
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
--

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-04 Thread Chris

On 01/03/07, Renato Botelho [EMAIL PROTECTED] wrote:

On Thu, Mar 01, 2007 at 02:04:18PM -0500, Daniel Eischen wrote:
 On Thu, 1 Mar 2007, Alexander Shikoff wrote:

 Hi All,
 
 On Thu, Mar 01, 2007 at 08:32:55AM -0500, Daniel Eischen wrote:
 On Thu, 1 Mar 2007, Martin Blapp wrote:
 
 
 Hi,
 
 Clamd is currently broken with libpthread for some threading-reason.
 You definitly need to use libthr (which is still CPU hungry, but
 works better).
 
 I don't think it is a problem with libpthread.
 
 FYI: https://wwws.clamav.net/bugzilla/show_bug.cgi?id=307#c8

 I have no idea what this bug report says.  This link and
 any other link I can find to clamav bug reports is not
 working or down.

clamav's configure was wrong, using -lpthread -lc_r in freebsd, now it's
fixed on development version.

Anyway, I change it to ${PTHREAD_LIBS} on ports, to respect this var. Before
my last change, REINPLACE_CMD was changing openbsd entry, and it was causing
the problem.

--
Renato Botelho garga @ FreeBSD.org
  freebsd @ galle.com.br
GnuPG Key: http://www.FreeBSD.org/~garga/pubkey.asc

Peterson's Admonition:
   When you think you're going down for the third time --
   just remember that you may have counted wrong.


so now the latest version of the port has same cpu utilisation as 0.88.7?

Chris
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-04 Thread Martin Blapp


Hi all,

After adding some debug stuff to clamd running with freebsd
libpthread.so I found that:

looking at the output value of 'ps -auxH | grep clamd | grep -v grep | wc -l'
is always staying at 6 threads, but the number of threadpool-thr_alive is
going higher and higher. So threadpool-thr_alive isn't decreased and
is completly incorrect.

In my tests the number of threads with libpthread.so is never going higher than 
6 threads. That explains, why a higher load is going to delay all scan 
operations more and more.


With libthr.so the value of threadpool-thr_alive is equal with the 
output of the ps. It can go very high, but always goes back if no more

work is there to do.

After the maxthreads limit is reached, clamd becomes completly unresponsive
with libpthreads.so.

SIGKILL and SIGSTOP don't work because some (unexisting) worker threads block 
on pthread_cond_timedwait(). Only kill -9 helps. Of course, the counter 
threadpool-thr_alive is wrong and may cause this problem.


Maybe someone with more threads knowledge can help here. I'll now add some debug
stuff to see where threadpool-thr_alive is going to be increased and where it
is decreased. The strange thing is that this works fine with libthr.so.

Martin
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-04 Thread Martin Blapp


Hi,


looking at the output value of 'ps -auxH | grep clamd | grep -v grep | wc -l'
is always staying at 6 threads, but the number of threadpool-thr_alive is
going higher and higher. So threadpool-thr_alive isn't decreased and
is completly incorrect.


After setting IdleTimeout very low to 5 seconds, the threadpool-thr_alive gets 
decreased correctly. There are still always 6 threads running, but further 
threads get cleaned up correctly.


IMHO the whole clamd thread management is somehow broken.

--
Martin
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-04 Thread Daniel Eischen

On Sun, 4 Mar 2007, Martin Blapp wrote:



Hi all,

After adding some debug stuff to clamd running with freebsd
libpthread.so I found that:

looking at the output value of 'ps -auxH | grep clamd | grep -v grep | wc -l'
is always staying at 6 threads, but the number of threadpool-thr_alive is
going higher and higher. So threadpool-thr_alive isn't decreased and
is completly incorrect.

In my tests the number of threads with libpthread.so is never going higher 
than 6 threads. That explains, why a higher load is going to delay all scan 
operations more and more.


With libthr.so the value of threadpool-thr_alive is equal with the output of 
the ps. It can go very high, but always goes back if no more

work is there to do.

After the maxthreads limit is reached, clamd becomes completly unresponsive
with libpthreads.so.

SIGKILL and SIGSTOP don't work because some (unexisting) worker threads block 
on pthread_cond_timedwait(). Only kill -9 helps. Of course, the counter 
threadpool-thr_alive is wrong and may cause this problem.


Maybe someone with more threads knowledge can help here. I'll now add some 
debug
stuff to see where threadpool-thr_alive is going to be increased and where 
it

is decreased. The strange thing is that this works fine with libthr.so.


Make sure clamd is checking the return value of pthread_create()
for errors.  You can also set LIBPTHREAD_PROCESS_SCOPE=yes or
LIBPTHREAD_SYSTEM_SCOPE=yes in your environment to force process
scope or system scope threads (libpthread only) for clamd.

--
DE
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-04 Thread Martin Blapp


Hi,


Make sure clamd is checking the return value of pthread_create()
for errors.  You can also set LIBPTHREAD_PROCESS_SCOPE=yes or
LIBPTHREAD_SYSTEM_SCOPE=yes in your environment to force process
scope or system scope threads (libpthread only) for clamd.


Yes, it does check the return value. And setting system or process scope
doesn't make any difference. As I said, increasing the thread count
works, decreading doesn't.

--
Martin
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-02 Thread Martin Blapp


Hi,



[/usr/local/sbin/clamd]
libpthread.so.2 libthr.so.2
libpthread.so   libthr.so
libc_r.so.6 libpthread.so.2


Correct, just delete the last line. I forgot to delete
the only entry.



The right side of that last line should probably refer to libthr.so.2.
AFAICS, what you have there makes no sense.


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-02 Thread Carlos Horowicz

Hi,

Anybody tried this additionally in /etc/libmap.conf ?

[/usr/local/lib/libclamav.so.1]
libpthread.so.2 libthr.so.2

clamav-0.90_2 reduced CPU consumption for me on 6.2-Stable since I added the
two sections in libmap.conf

-Carlos

2007/3/1, Doug Barton [EMAIL PROTECTED]:


Martin Blapp wrote:

 Hi,

 Clamd is currently broken with libpthread for some threading-reason.
 You definitly need to use libthr (which is still CPU hungry, but
 works better).

 /etc/libmap.conf

 [/usr/local/sbin/clamd]
 libpthread.so.2 libthr.so.2
 libpthread.so   libthr.so
 libc_r.so.6 libpthread.so.2

The right side of that last line should probably refer to libthr.so.2.
AFAICS, what you have there makes no sense.

hth,

Doug

--

   This .signature sanitized for your protection
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-02 Thread Alexandre Biancalana

Anybody tested today released clamav-0.90.1 ??

On 3/2/07, Carlos Horowicz [EMAIL PROTECTED] wrote:


Hi,

Anybody tried this additionally in /etc/libmap.conf ?

[/usr/local/lib/libclamav.so.1]
libpthread.so.2 libthr.so.2

clamav-0.90_2 reduced CPU consumption for me on 6.2-Stable since I added
the
two sections in libmap.conf

-Carlos

2007/3/1, Doug Barton [EMAIL PROTECTED]:

 Martin Blapp wrote:
 
  Hi,
 
  Clamd is currently broken with libpthread for some threading-reason.
  You definitly need to use libthr (which is still CPU hungry, but
  works better).
 
  /etc/libmap.conf
 
  [/usr/local/sbin/clamd]
  libpthread.so.2 libthr.so.2
  libpthread.so   libthr.so
  libc_r.so.6 libpthread.so.2

 The right side of that last line should probably refer to libthr.so.2.
 AFAICS, what you have there makes no sense.

 hth,

 Doug

 --

This .signature sanitized for your protection
 ___
 freebsd-stable@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-stable
 To unsubscribe, send any mail to [EMAIL PROTECTED]


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-01 Thread Chris

On 28/02/07, Marko Lerota [EMAIL PROTECTED] wrote:

Martin Blapp [EMAIL PROTECTED] writes:

 Even with libthr the CPU usage is still far too high ...
 I'm currently looking at the code.

Take a look at this post. I also have CPU usage problems and simscan
installed.

http://www.mail-archive.com/toaster@shupp.org/msg04119.html

 Re: [toaster] clamav 0.90 patches up

 Tom Collins
 Fri, 16 Feb 2007 11:33:52 -0800

 On Feb 15, 2007, at 2:12 PM, Rick Macdougall wrote:

  One thing to keep in mind, if you are not using the :attach in simcontrol,
 do NOT enable rip mime in simscan as that will cause clamdscan to basically
 scan the message and the attachment twice.

  Clamav does a very good job of scanning encoded content and attachments
 all by itself. No need to duplicate effort.

 I recently took a look at ripmime to see if it had a setting that would simply
 dump the attachment filenames without actually creating the attachments. It,
 unfortunately, does not. I haven't looked at the source to see if it would be
 possible to build a modified version to accomplish my goals or not.

 I guess I could modify my simscan to run ripmime, look at the attachment
 filenames, and then delete them all before calling clamav. OR, I could
 simply pass the message file to clamav instead of having it scan the
 entire directory.

 In the case of large attachments, it's a big waste of CPU cycles to scan
 the entire message twice. I might just skip attachment blocking at this point,
 and hope that clamav will catch all of the scr and pif crap.

--
One cannot sell the earth upon which the people walk
   Tacunka Witco
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]



I dont use simscan but use clamav for scanning emails passed from
exim.  I noticed that cpu usage went through the roof and there was
dozens of clamd in sockstat.  On a dual xeon it did cause some smtp
lag but on weaker specs it caused the smtp to completely backlog and
stopped emails arriving.

I downgraded back to 0.88.7 again and all is fine again.

Chris
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-01 Thread Marko Lerota
Chris [EMAIL PROTECTED] writes:

 I dont use simscan but use clamav for scanning emails passed from
 exim.  I noticed that cpu usage went through the roof and there was
 dozens of clamd in sockstat.  On a dual xeon it did cause some smtp
 lag but on weaker specs it caused the smtp to completely backlog and
 stopped emails arriving.

 I downgraded back to 0.88.7 again and all is fine again.

Dozens? Lucky you. I had 600 of them. OK, now we know that simscan 
is not the problem.

-- 
One cannot sell the earth upon which the people walk
Tacunka Witco 
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-01 Thread Martin Blapp


Hi,

Clamd is currently broken with libpthread for some threading-reason.
You definitly need to use libthr (which is still CPU hungry, but
works better).

/etc/libmap.conf

[/usr/local/sbin/clamd]
libpthread.so.2 libthr.so.2
libpthread.so   libthr.so
libc_r.so.6 libpthread.so.2

Martin



Dozens? Lucky you. I had 600 of them. OK, now we know that simscan
is not the problem.

--
One cannot sell the earth upon which the people walk
Tacunka Witco


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-01 Thread Daniel Eischen

On Thu, 1 Mar 2007, Martin Blapp wrote:



Hi,

Clamd is currently broken with libpthread for some threading-reason.
You definitly need to use libthr (which is still CPU hungry, but
works better).


I don't think it is a problem with libpthread.

--
DE
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-01 Thread Alexander Shikoff
Hi All,

On Thu, Mar 01, 2007 at 08:32:55AM -0500, Daniel Eischen wrote:
 On Thu, 1 Mar 2007, Martin Blapp wrote:
 
 
 Hi,
 
 Clamd is currently broken with libpthread for some threading-reason.
 You definitly need to use libthr (which is still CPU hungry, but
 works better).
 
 I don't think it is a problem with libpthread.

FYI: https://wwws.clamav.net/bugzilla/show_bug.cgi?id=307#c8

-- 
Kind Regards,   Alexander Shikoff
[EMAIL PROTECTED]
Mob.: +380 67 946 31 49
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-01 Thread Doug Barton
Martin Blapp wrote:
 
 Hi,
 
 Clamd is currently broken with libpthread for some threading-reason.
 You definitly need to use libthr (which is still CPU hungry, but
 works better).
 
 /etc/libmap.conf
 
 [/usr/local/sbin/clamd]
 libpthread.so.2 libthr.so.2
 libpthread.so   libthr.so
 libc_r.so.6 libpthread.so.2

The right side of that last line should probably refer to libthr.so.2.
AFAICS, what you have there makes no sense.

hth,

Doug

-- 

This .signature sanitized for your protection
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-01 Thread Daniel Eischen

On Thu, 1 Mar 2007, Alexander Shikoff wrote:


Hi All,

On Thu, Mar 01, 2007 at 08:32:55AM -0500, Daniel Eischen wrote:

On Thu, 1 Mar 2007, Martin Blapp wrote:



Hi,

Clamd is currently broken with libpthread for some threading-reason.
You definitly need to use libthr (which is still CPU hungry, but
works better).


I don't think it is a problem with libpthread.


FYI: https://wwws.clamav.net/bugzilla/show_bug.cgi?id=307#c8


I have no idea what this bug report says.  This link and
any other link I can find to clamav bug reports is not
working or down.

--
DE
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-03-01 Thread Meenoo Shivdasani

On 2/26/07, Dimuthu Parussalla [EMAIL PROTECTED] wrote:

Clamav-90_2 Lockup with freebsd 6.2

Still under load clamav_90_2 locks up with high cpu usage. Had to downgrade
the port to 88.7_1 to get the server going. Sockstat shows lots of open
sockets from clamd.


I've been seeing excessive CPU usage from clamav_90_1 on 6.1.  (clamd
taking 60+% of the CPU)  I've somewhat stifled that by reducing the #
of postfix connections to clam and by implementing other postfix
things to reduce the ability of botnet infested hosts to be able to
get to clam in the first place.

FWIW, I didn't see this problem with earlier versions of clam.

M
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-02-28 Thread Marko Lerota
Martin Blapp [EMAIL PROTECTED] writes:

 Even with libthr the CPU usage is still far too high ...
 I'm currently looking at the code.

Take a look at this post. I also have CPU usage problems and simscan 
installed. 

http://www.mail-archive.com/toaster@shupp.org/msg04119.html

 Re: [toaster] clamav 0.90 patches up

 Tom Collins
 Fri, 16 Feb 2007 11:33:52 -0800

 On Feb 15, 2007, at 2:12 PM, Rick Macdougall wrote:

  One thing to keep in mind, if you are not using the :attach in simcontrol, 
 do NOT enable rip mime in simscan as that will cause clamdscan to basically 
 scan the message and the attachment twice.

  Clamav does a very good job of scanning encoded content and attachments 
 all by itself. No need to duplicate effort. 

 I recently took a look at ripmime to see if it had a setting that would 
 simply 
 dump the attachment filenames without actually creating the attachments. It, 
 unfortunately, does not. I haven't looked at the source to see if it would be 
 possible to build a modified version to accomplish my goals or not.

 I guess I could modify my simscan to run ripmime, look at the attachment 
 filenames, and then delete them all before calling clamav. OR, I could 
 simply pass the message file to clamav instead of having it scan the 
 entire directory.

 In the case of large attachments, it's a big waste of CPU cycles to scan 
 the entire message twice. I might just skip attachment blocking at this 
 point, 
 and hope that clamav will catch all of the scr and pif crap.

-- 
One cannot sell the earth upon which the people walk
Tacunka Witco 
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-02-27 Thread Martin Blapp


Hi,


Change the threading lib.  It fixed it for us.

% cat /etc/libmap.conf
[clamd]
libc_r.so.5 libthr.so.2
libc_r.so.6 libthr.so.2
libthr.so.2 libthr.so.2
libpthread.so.1 libthr.so.2
libpthread.so.2 libthr.so.2


Even with libthr the CPU usage is still far too high ...
I'm currently looking at the code.

Martin
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Clamav-90_2 Lockup with freebsd 6.2

2007-02-27 Thread Larry Rosenman
I've seen it go loop as well on my Dual-Xeon.  

I did just switch it to libthr, but still had one occurace.

I did switch maxthreads to 1.

If I can test, please let me know.



-- 
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 512-248-2683E-Mail: ler@lerctr.org
US Mail: 430 Valona Loop, Round Rock, TX 78681-3893

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martin Blapp
Sent: Tuesday, February 27, 2007 11:37 AM
To: Sergey N. Voronkov
Cc: freebsd-stable@freebsd.org
Subject: Re: Clamav-90_2 Lockup with freebsd 6.2


Hi,

 Change the threading lib.  It fixed it for us.

 % cat /etc/libmap.conf
 [clamd]
 libc_r.so.5 libthr.so.2
 libc_r.so.6 libthr.so.2
 libthr.so.2 libthr.so.2
 libpthread.so.1 libthr.so.2
 libpthread.so.2 libthr.so.2

Even with libthr the CPU usage is still far too high ...
I'm currently looking at the code.

Martin
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-02-27 Thread Chris Slothouber

Was this indeed compiled with pthread or with lpthread?

I had this issue on a 4.11-RELEASE machine very recently.  As it does 
not have lpthread, it would fail to compile against this.


Martin Blapp wrote:


Hi,


Change the threading lib.  It fixed it for us.

% cat /etc/libmap.conf
[clamd]
libc_r.so.5 libthr.so.2
libc_r.so.6 libthr.so.2
libthr.so.2 libthr.so.2
libpthread.so.1 libthr.so.2
libpthread.so.2 libthr.so.2


Even with libthr the CPU usage is still far too high ...
I'm currently looking at the code.

Martin
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-02-27 Thread Mike Tancsa

At 12:36 PM 2/27/2007, Martin Blapp wrote:


Hi,


Change the threading lib.  It fixed it for us.

% cat /etc/libmap.conf
[clamd]
libc_r.so.5 libthr.so.2
libc_r.so.6 libthr.so.2
libthr.so.2 libthr.so.2
libpthread.so.1 libthr.so.2
libpthread.so.2 libthr.so.2


Even with libthr the CPU usage is still far too high ...
I'm currently looking at the code.


We have our boxes setup so that we have the milter running on 
different boxes than clamd.  Clamd doesnt seem to take up too much 
more CPU power than it did before using the old libs.


---Mike 


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Clamav-90_2 Lockup with freebsd 6.2

2007-02-27 Thread Dimuthu Parussalla
Hi,

I can confirm the same situation. My dual xeon x236 server runs very high
cpu utilisation with clamav. Also tried with maxthreads to 1. Result is the
same but frequency of locked process seems to be reduced.


Cheers
Dimi



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Martin Blapp
Sent: Wednesday, 28 February 2007 4:37 AM
To: Sergey N. Voronkov
Cc: freebsd-stable@freebsd.org
Subject: Re: Clamav-90_2 Lockup with freebsd 6.2



Hi,

 Change the threading lib.  It fixed it for us.

 % cat /etc/libmap.conf
 [clamd]
 libc_r.so.5 libthr.so.2
 libc_r.so.6 libthr.so.2
 libthr.so.2 libthr.so.2
 libpthread.so.1 libthr.so.2
 libpthread.so.2 libthr.so.2

Even with libthr the CPU usage is still far too high ...
I'm currently looking at the code.

Martin
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]



___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Clamav-90_2 Lockup with freebsd 6.2

2007-02-27 Thread Daniel Eischen

On Wed, 28 Feb 2007, Dimuthu Parussalla wrote:


Hi,

I can confirm the same situation. My dual xeon x236 server runs very high
cpu utilisation with clamav. Also tried with maxthreads to 1. Result is the
same but frequency of locked process seems to be reduced.


I think clamav has a bug somewhere.  I seem to recall
some other application having bad assumptions about
sockets, but can't remember exactly what it was.  I
do know that a close() on a file descriptor does not
wakeup and return an error to all threads waiting
on it.  FreeBSD and supposedly Linux have this
behavior, but Solaris will return an error to all
threads.  I'm not sure this has anything to do with
it, but after seeing the bug report of clamd having
a lot of threads waiting in accept(), it might be a
place to start investigating...

--
DE
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-02-26 Thread Mike Tancsa

At 07:12 PM 2/26/2007, Dimuthu Parussalla wrote:

Clamav-90_2 Lockup with freebsd 6.2


Still under load clamav_90_2 locks up with high cpu usage. Had to downgrade
the port to 88.7_1 to get the server going. Sockstat shows lots of open
sockets from clamd.

I am using simscan+Qmail+Clamav.

Any Ideas to solve this problem?.



Change the threading lib.  It fixed it for us.

% cat /etc/libmap.conf
[clamd]
libc_r.so.5 libthr.so.2
libc_r.so.6 libthr.so.2
libthr.so.2 libthr.so.2
libpthread.so.1 libthr.so.2
libpthread.so.2 libthr.so.2 


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Clamav-90_2 Lockup with freebsd 6.2

2007-02-26 Thread Sergey N. Voronkov
On Mon, Feb 26, 2007 at 10:05:35PM -0500, Mike Tancsa wrote:
 At 07:12 PM 2/26/2007, Dimuthu Parussalla wrote:
 Clamav-90_2 Lockup with freebsd 6.2
 
 
 Still under load clamav_90_2 locks up with high cpu usage. Had to downgrade
 the port to 88.7_1 to get the server going. Sockstat shows lots of open
 sockets from clamd.
 
 I am using simscan+Qmail+Clamav.
 
 Any Ideas to solve this problem?.
 
 
 Change the threading lib.  It fixed it for us.
 
 % cat /etc/libmap.conf
 [clamd]
 libc_r.so.5 libthr.so.2
 libc_r.so.6 libthr.so.2
 libthr.so.2 libthr.so.2
 libpthread.so.1 libthr.so.2
 libpthread.so.2 libthr.so.2 

Or limit MaxThreads to one:

# grep MaxT /usr/local/etc/clamd.conf
MaxThreads 1

Looks like there are some bugs on thread usage into 0.90. It locks on
FreeBSD and Solaris at least. (May be threading is much more linux specific
in comparation to 0.88.7).

Serg.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]