From owner-freebsd-questions@FreeBSD.ORG Fri Jul 30 19:30:45 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C18A16A4CE for ; Fri, 30 Jul 2004 19:30:45 +0000 (GMT) Received: from smtp.rdsnet.ro (smtp.rdsnet.ro [62.231.74.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id B4D8843D3F for ; Fri, 30 Jul 2004 19:30:44 +0000 (GMT) (envelope-from itetcu@apropo.ro) Received: (qmail 1587 invoked by uid 89); 30 Jul 2004 19:30:21 -0000 Received: from unknown (HELO it.buh.tecnik93.com) (81.196.204.98) by 0 with SMTP; 30 Jul 2004 19:30:21 -0000 Received: from localhost (localhost.buh.tecnik93.com [127.0.0.1]) by it.buh.tecnik93.com (Postfix) with ESMTP id C642DB0; Fri, 30 Jul 2004 22:30:16 +0300 (EEST) Received: from it.buh.tecnik93.com ([127.0.0.1]) by localhost (it.buh.tecnik93.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10972-05; Fri, 30 Jul 2004 22:30:16 +0300 (EEST) Received: from it.buh.tecnik93.com (localhost.buh.tecnik93.com [127.0.0.1]) by it.buh.tecnik93.com (Postfix) with SMTP id 4570A6D; Fri, 30 Jul 2004 22:30:16 +0300 (EEST) Date: Fri, 30 Jul 2004 22:30:15 +0300 From: Ion-Mihai Tetcu To: fred@bsdhost.net Message-Id: <20040730223015.58d5b496@it.buh.tecnik93.com> In-Reply-To: References: X-Mailer: Sylpheed-Claws 0.9.12 (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at it.buh.cameradicommercio.ro cc: freebsd-questions@freebsd.org Subject: Re: problem with clamav X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2004 19:30:45 -0000 On Fri, 30 Jul 2004 19:55:35 +0200 fred@bsdhost.net wrote: > > Hello, > > Since two days I have a problem with clamav. The daemon clamd is > clogging my CPU. > I have try to update the port. I have tryed the devel version in the > ports. I have also tryed the snapshot from clamav and the problem is > still here. > > # top > ... > PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND > 2122 clamav 60 0 9512K 8168K RUN 6:27 95.80% 95.80% clamd > ... > > I am running 4.10. > > Does someone experiance this or have already seen this ? I believe this diff against devel-20040728 would resolve your problem: --- matcher-bm.c.bk Mon Jul 19 13:54:40 2004 +++ matcher-bm.c Thu Jul 29 21:59:42 2004 @@ -91,11 +91,27 @@ void cli_bm_free(struct cl_node *root) {7 + struct cli_bm_patt *b1, *b2; + int i; + if(root->bm_shift) free(root->bm_shift); - if(root->bm_suffix) + if(root->bm_suffix) { + for(i = 0; i < 65536; i++) { + b1 = root->bm_suffix[i]; + while(b1) { + b2 = b1; + b1 = b1->next; + if (b2->virname) + free(b2->virname); + if (b2->pattern) + free(b2->pattern); + free(b2); + } + } free(root->bm_suffix); + } } int cli_bm_scanbuff(const char *buffer, unsigned int length, const char **virname, const struct cl_node *root) -- IOnut Unregistered ;) FreeBSD "user"