Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Apr 2008 15:00:01 GMT
From:      Sebastian Inacker <inacker@fmsweb.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/122534: ClamAV stopps working if it's database directory is locked.
Message-ID:  <200804071500.m37F01Lv090616@www.freebsd.org>
Resent-Message-ID: <200804071510.m37FA1l1071398@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         122534
>Category:       ports
>Synopsis:       ClamAV stopps working if it's database directory is locked.
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 07 15:10:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Sebastian Inacker
>Release:        6.2-RELEASE
>Organization:
FMS Internetservice
>Environment:
FreeBSD qmail.fmsweb.de 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007     root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
When the database directory of ClamAV is locked, clamav is terminating.

It seems to me, that this is because of freshclam, which is not able to reach any listed mirrors at this moment.

IMO: ClamAV should not force a reload, if the directory is locked and ClamAV can not proceed because of this reason. (Why force a reload, which will fail?)

Looks like a "negative feature" to me.      

/var/log/clamav/clamd.log

Mon Apr  7 01:33:41 2008 -> SelfCheck: Database status OK.
Mon Apr  7 02:04:15 2008 -> SelfCheck: Database modification detected. Forcing reload.
Mon Apr  7 02:04:15 2008 -> Reading databases from /var/db/clamav
Mon Apr  7 02:06:25 2008 -> ERROR: reload db failed: Unable to lock database directory (try 1)
Mon Apr  7 02:08:35 2008 -> ERROR: reload db failed: Unable to lock database directory (try 2)
Mon Apr  7 02:10:45 2008 -> ERROR: reload db failed: Unable to lock database directory (try 3)
Mon Apr  7 02:10:45 2008 -> ERROR: reload db failed: Unable to lock database directory
Mon Apr  7 02:10:45 2008 -> Terminating because of a fatal error.
Mon Apr  7 02:10:45 2008 -> Shutting down the main socket.
Mon Apr  7 02:10:45 2008 -> Closing the main socket.
Mon Apr  7 02:10:45 2008 -> Socket file removed.
Mon Apr  7 02:10:45 2008 -> Pid file removed.
Mon Apr  7 02:10:45 2008 -> --- Stopped at Mon Apr  7 02:10:45 2008

Seems, that the directory is stil locked by freshclam, which had problems to reach any mirror at this time:

/var/log/clamav/freshclam.log

[...]
Can't connect to port 80 of host database.clamav.net (IP: 62.26.160.3)
Trying host database.clamav.net (62.201.161.84)...
nonblock_connect: connect timing out (30 secs)
Can't connect to port 80 of host database.clamav.net (IP: 62.201.161.84)
Trying host database.clamav.net (85.10.242.82)...
nonblock_connect: connect timing out (30 secs)
Can't connect to port 80 of host database.clamav.net (IP: 85.10.242.82)
Trying host database.clamav.net (85.199.169.78)...
nonblock_recv: recv timing out (30 secs)
ERROR: getfile: Error while reading database from database.clamav.net (IP: 85.199.169.78)
ERROR: Can't download daily.cvd from database.clamav.net
Giving up on database.clamav.net...
Update failed. Your network may be down or none of the mirrors listed in freshclam.conf is working. Check http://www.clamav.net/support/mirror-problem for possible reasons.

I'm useing ClamAV from ports. I haven't seen something releated in /usr/ports/UPDATING

# pkg_info | grep clamav
clamav-0.92.1_1     Command line virus scanner written entirely in C

I'm contacting FreeBSD, not ClamAV because of:
"Please do not report any bug affecting software derived from ClamAV and distributed by a third party (i.e. ports we do not maintain directly) because we have no control over them. Contact their developers instead." (http://www.clamav.org/bugs/)

Status critical because virus scanning/delivery of email stops working...

>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804071500.m37F01Lv090616>