clamav-users May 2009 archive
Main Archive Page > Month Archives  > clamav-users archives
clamav-users: [Clamav-users] clamd crash during reload

[Clamav-users] clamd crash during reload

From: Tony Finch <dot_at_nospam>
Date: Fri May 29 2009 - 11:46:54 GMT
To: clamav-users@lists.clamav.net


Last night one of our clamds crashed while trying to reload its database at the same time that freshclam was updating it. I thought that the update was designed to be free of races - it was when I looked at the code many versions ago.

Here are the logs at the time of the crash, plus one line before and after for context. It isn't very informative :-( It would be nice if the cli_errmsg function logged to syslog when called by clamd.

If this happens again I'll have to wrap freshclam in a script to ensure atomic updates. May 29 03:44:20 ppsw-1 clamd[28279]: /spool/exim/scan/1M9s4x-0002df-3E/1M9s4x-0002df-3E.eml: Sanesecurity.Junk.14315.UNOFFICIAL FOUND May 29 03:45:01 ppsw-1 clamd[28279]: SelfCheck: Database modification detected. Forcing reload. May 29 03:45:01 ppsw-1 freshclam[12040]: Current working dir is /opt/clamav-0.95.1+0/share/clamav May 29 03:45:01 ppsw-1 freshclam[12040]: Max retries == 3 May 29 03:45:01 ppsw-1 freshclam[12040]: ClamAV update process started at Fri May 29 03:45:01 2009 May 29 03:45:01 ppsw-1 freshclam[12040]: Using IPv6 aware code May 29 03:45:01 ppsw-1 freshclam[12040]: Querying current.cvd.clamav.net May 29 03:45:01 ppsw-1 freshclam[12040]: TTL: 1 May 29 03:45:01 ppsw-1 freshclam[12040]: Software version from DNS: 0.95.1 May 29 03:45:01 ppsw-1 freshclam[12040]: main.cvd version from DNS: 51 May 29 03:45:01 ppsw-1 freshclam[12040]: main.cld is up to date (version: 51, sigs: 545035, f-level: 42, builder: sven) May 29 03:45:01 ppsw-1 freshclam[12040]: daily.cvd version from DNS: 9403 May 29 03:45:01 ppsw-1 freshclam[12040]: daily.cld is up to date (version: 9403, sigs: 24407, f-level: 42, builder: ccordes) May 29 03:45:01 ppsw-1 freshclam[12040]: safebrowsing.cvd version from DNS: 3655 May 29 03:45:01 ppsw-1 freshclam[12040]: safebrowsing.cld is up to date (version: 3655, sigs: 966881, f-level: 42, builder: google) May 29 03:45:01 ppsw-1 freshclam[12059]: Current working dir is /opt/clamav-0.95.1+0/share/clamav May 29 03:45:01 ppsw-1 freshclam[12059]: Max retries == 3 May 29 03:45:01 ppsw-1 freshclam[12059]: ClamAV update process started at Fri May 29 03:45:01 2009 May 29 03:45:01 ppsw-1 freshclam[12059]: Using IPv6 aware code May 29 03:45:01 ppsw-1 freshclam[12059]: If-Modified-Since: Thu, 14 May 2009 14:28:45 GMT May 29 03:45:01 ppsw-1 freshclam[12059]: Reading CVD header (main.cvd): May 29 03:45:01 ppsw-1 clamd[28279]: Reading databases from /opt/clamav-0.95.1+0/share/clamav May 29 03:45:01 ppsw-1 freshclam[12059]: Connected to database.clamav.net (IP: 81.91.100.173). May 29 03:45:01 ppsw-1 freshclam[12059]: Trying to retrieve CVD header of http://database.clamav.net/main.cvd May 29 03:45:01 ppsw-1 freshclam[12059]: OK (IMS) May 29 03:45:01 ppsw-1 freshclam[12059]: main.cld is up to date (version: 51, sigs: 545035, f-level: 42, builder: sven) May 29 03:45:01 ppsw-1 freshclam[12059]: If-Modified-Since: Thu, 28 May 2009 22:08:10 GMT May 29 03:45:01 ppsw-1 freshclam[12059]: Reading CVD header (daily.cvd): May 29 03:45:01 ppsw-1 freshclam[12059]: Connected to database.clamav.net (IP: 81.91.100.173). May 29 03:45:01 ppsw-1 freshclam[12059]: Trying to retrieve CVD header of http://database.clamav.net/daily.cvd May 29 03:45:01 ppsw-1 freshclam[12059]: OK (IMS) May 29 03:45:01 ppsw-1 freshclam[12059]: daily.cld is up to date (version: 9403, sigs: 24407, f-level: 42, builder: ccordes) May 29 03:45:01 ppsw-1 freshclam[12059]: If-Modified-Since: Fri, 29 May 2009 01:46:18 GMT May 29 03:45:01 ppsw-1 freshclam[12059]: Reading CVD header (safebrowsing.cvd): May 29 03:45:01 ppsw-1 freshclam[12059]: Connected to database.clamav.net (IP: 81.91.100.173). May 29 03:45:01 ppsw-1 freshclam[12059]: Trying to retrieve CVD header of http://database.clamav.net/safebrowsing.cvd May 29 03:45:01 ppsw-1 freshclam[12059]: OK May 29 03:45:02 ppsw-1 freshclam[12059]: Retrieving http://database.clamav.net/safebrowsing-3656.cdiff May 29 03:45:02 ppsw-1 freshclam[12059]: Trying to download http://database.clamav.net/safebrowsing-3656.cdiff (IP: 81.91.100.173) May 29 03:45:02 ppsw-1 freshclam[12059]: Downloading safebrowsing-3656.cdiff [100%] May 29 03:45:02 ppsw-1 freshclam[12059]: cdiff_apply: Parsed 363 lines and executed 363 commands May 29 03:45:02 ppsw-1 clamd[28279]: reload db failed: Can't open file or directory May 29 03:45:02 ppsw-1 freshclam[12059]: safebrowsing.cld updated (version: 3656, sigs: 966899, f-level: 42, builder: google) May 29 03:45:02 ppsw-1 freshclam[12059]: Database updated (1536341 signatures) from database.clamav.net (IP: 81.91.100.173) May 29 03:45:02 ppsw-1 clamd[28279]: Terminating because of a fatal error. May 29 03:45:02 ppsw-1 clamd[28279]: Waiting for all threads to finish May 29 03:45:02 ppsw-1 clamd[28279]: Shutting down the main socket. May 29 03:45:02 ppsw-1 clamd[28279]: Pid file removed. May 29 03:45:02 ppsw-1 clamd[28279]: --- Stopped at Fri May 29 03:45:02 2009 May 29 03:45:02 ppsw-1 clamd[28279]: Closing the main socket. May 29 03:45:02 ppsw-1 clamd[28279]: Socket file removed. May 29 03:53:06 ppsw-1 freshclam[28139]: Received signal: wake up

Tony. -- f.anthony.n.finch <dot_at_dotat.at> http://dotat.at/ GERMAN BIGHT HUMBER: SOUTHWEST 5 TO 7. MODERATE OR ROUGH. SQUALLY SHOWERS. MODERATE OR GOOD. _______________________________________________ Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net http://www.clamav.net/support/ml