#1134489 clamav-freshclam-once.service fails to start

Package:
clamav-freshclam
Source:
clamav-freshclam
Description:
anti-virus utility for Unix - virus database update utility
Submitter:
Timo van Roermund
Date:
2026-06-28 15:54:07 UTC
Severity:
normal
#1134489#5
Date:
2026-04-20 19:48:14 UTC
From:
To:
Dear Maintainer,

All clamav-freshclam services are enabled by default (see 'preset'):

$ systemctl status clamav-freshclam.service | grep preset
     Loaded: loaded (/usr/lib/systemd/system/clamav-freshclam.service; enabled; preset: enabled)

$ systemctl status clamav-freshclam-once.service | grep preset
     Loaded: loaded (/usr/lib/systemd/system/clamav-freshclam-once.service; enabled; preset: enabled)

$ systemctl status clamav-freshclam-once.timer | grep preset
     Loaded: loaded (/usr/lib/systemd/system/clamav-freshclam-once.timer; enabled; preset: enabled)

My understanding is that:
- clamav-freshclam.service runs clamav-freshclam in the background (as daemon), constantly checking for updates.
- clamav-freshclam-once.service runs clamav-freshclam only when triggered via clamav-freshclam-once.timer.

However, these two services seem to be incompatible: when both are enabled, clamav-freshclam-once.service fails with the following error:

systemd[1]: Starting clamav-freshclam-once.service - Update ClamAV virus database once...
freshclam[2549]: ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
freshclam[2549]: ERROR: initialize: libfreshclam init failed.
freshclam[2549]: ERROR: Initialization error!
freshclam[2549]: ERROR: Failed to lock the log file /var/log/clamav/freshclam.log: Resource temporarily unavailable
systemd[1]: clamav-freshclam-once.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
systemd[1]: clamav-freshclam-once.service: Failed with result 'exit-code'.
systemd[1]: Failed to start clamav-freshclam-once.service - Update ClamAV virus database once.

What seems to happen is that the log file is locked by the instance of clamav-freshclam that is started by clamav-freshclam.service. And the (second) instance of clamav-freshclam, started afterwards by clamav-freshclam-once.service, fails.

Should one of these services not be disabled by default?

#1134489#10
Date:
2026-06-26 18:04:31 UTC
From:
To:
Metoo. Here is a more detailed log, providing a bigger picture:

# journalctl -b -u clamav-freshclam-once.service -u clamav-freshclam-once.timer -u clamav-freshclam.service | cat
Jun 26 19:31:05 ppcl003.ac.aixigo.de systemd[1]: Started clamav-freshclam-once.timer - Daily ClamAV virus database update.
Jun 26 19:33:07 ppcl003.ac.aixigo.de systemd[1]: Starting clamav-freshclam-once.service - Update ClamAV virus database once...
Jun 26 19:33:07 ppcl003.ac.aixigo.de systemd[1]: Started clamav-freshclam.service - ClamAV virus database updater.
Jun 26 19:33:07 ppcl003.ac.aixigo.de freshclam[2411]: freshclam daemon 1.4.4 (OS: Linux, ARCH: x86_64, CPU: x86_64)
Jun 26 19:33:07 ppcl003.ac.aixigo.de freshclam[2411]: ClamAV update process started at Fri Jun 26 19:33:07 2026
Jun 26 19:33:07 ppcl003.ac.aixigo.de freshclam[2411]: Fri Jun 26 19:33:07 2026 -> ClamAV update process started at Fri Jun 26 19:33:07 2026
Jun 26 19:33:07 ppcl003.ac.aixigo.de freshclam[2410]: ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
Jun 26 19:33:07 ppcl003.ac.aixigo.de freshclam[2410]: ERROR: initialize: libfreshclam init failed.
Jun 26 19:33:07 ppcl003.ac.aixigo.de freshclam[2410]: ERROR: Initialization error!
Jun 26 19:33:07 ppcl003.ac.aixigo.de freshclam[2410]: ERROR: Failed to lock the log file /var/log/clamav/freshclam.log: Resource temporarily unavailable
Jun 26 19:33:07 ppcl003.ac.aixigo.de systemd[1]: clamav-freshclam-once.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jun 26 19:33:07 ppcl003.ac.aixigo.de systemd[1]: clamav-freshclam-once.service: Failed with result 'exit-code'.
Jun 26 19:33:07 ppcl003.ac.aixigo.de systemd[1]: Failed to start clamav-freshclam-once.service - Update ClamAV virus database once.
Jun 26 19:33:07 ppcl003.ac.aixigo.de freshclam[2411]: Fri Jun 26 19:33:07 2026 -> daily.cld database is up-to-date (version: 28043, sigs: 355476, f-level: 90, builder: svc.clamav-publisher)
Jun 26 19:33:07 ppcl003.ac.aixigo.de freshclam[2411]: daily.cld database is up-to-date (version: 28043, sigs: 355476, f-level: 90, builder: svc.clamav-publisher)
Jun 26 19:33:07 ppcl003.ac.aixigo.de freshclam[2411]: Fri Jun 26 19:33:07 2026 -> main.cld database is up-to-date (version: 63, sigs: 3287027, f-level: 90, builder: tomjudge)
Jun 26 19:33:07 ppcl003.ac.aixigo.de freshclam[2411]: Fri Jun 26 19:33:07 2026 -> bytecode.cvd database is up-to-date (version: 339, sigs: 80, f-level: 90, builder: nrandolp)
Jun 26 19:33:07 ppcl003.ac.aixigo.de freshclam[2411]: main.cld database is up-to-date (version: 63, sigs: 3287027, f-level: 90, builder: tomjudge)
Jun 26 19:33:07 ppcl003.ac.aixigo.de freshclam[2411]: bytecode.cvd database is up-to-date (version: 339, sigs: 80, f-level: 90, builder: nrandolp)
Jun 26 19:33:07 ppcl003.ac.aixigo.de freshclam[2411]: --------------------------------------


Regards
Harri

#1134489#15
Date:
2026-06-26 19:36:17 UTC
From:
To:
Jun 26 20:08:00 ppcl003.ac.aixigo.de systemd[1]: Starting clamav-freshclam-once.service - Update ClamAV virus database once...
Jun 26 20:08:00 ppcl003.ac.aixigo.de systemd[1]: Started clamav-freshclam.service - ClamAV virus database updater.
Jun 26 20:08:00 ppcl003.ac.aixigo.de freshclam[2403]: freshclam daemon 1.4.4 (OS: Linux, ARCH: x86_64, CPU: x86_64)
Jun 26 20:08:00 ppcl003.ac.aixigo.de freshclam[2403]: ClamAV update process started at Fri Jun 26 20:08:00 2026
Jun 26 20:08:00 ppcl003.ac.aixigo.de freshclam[2403]: Fri Jun 26 20:08:00 2026 -> ClamAV update process started at Fri Jun 26 20:08:00 2026
Jun 26 20:08:00 ppcl003.ac.aixigo.de freshclam[2402]: ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
Jun 26 20:08:00 ppcl003.ac.aixigo.de freshclam[2402]: ERROR: initialize: libfreshclam init failed.
Jun 26 20:08:00 ppcl003.ac.aixigo.de freshclam[2402]: ERROR: Initialization error!
Jun 26 20:08:00 ppcl003.ac.aixigo.de freshclam[2402]: ERROR: Failed to lock the log file /var/log/clamav/freshclam.log: Resource temporarily unavailable
Jun 26 20:08:00 ppcl003.ac.aixigo.de systemd[1]: clamav-freshclam-once.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jun 26 20:08:00 ppcl003.ac.aixigo.de systemd[1]: clamav-freshclam-once.service: Failed with result 'exit-code'.
Jun 26 20:08:00 ppcl003.ac.aixigo.de systemd[1]: Failed to start clamav-freshclam-once.service - Update ClamAV virus database once.
Jun 26 20:08:00 ppcl003.ac.aixigo.de freshclam[2403]: Fri Jun 26 20:08:00 2026 -> daily.cld database is up-to-date (version: 28043, sigs: 355476, f-level: 90, builder: svc.clamav-publisher)
Jun 26 20:08:00 ppcl003.ac.aixigo.de freshclam[2403]: Fri Jun 26 20:08:00 2026 -> main.cld database is up-to-date (version: 63, sigs: 3287027, f-level: 90, builder: tomjudge)
Jun 26 20:08:00 ppcl003.ac.aixigo.de freshclam[2403]: Fri Jun 26 20:08:00 2026 -> bytecode.cvd database is up-to-date (version: 339, sigs: 80, f-level: 90, builder: nrandolp)
Jun 26 20:08:00 ppcl003.ac.aixigo.de freshclam[2403]: daily.cld database is up-to-date (version: 28043, sigs: 355476, f-level: 90, builder: svc.clamav-publisher)
Jun 26 20:08:00 ppcl003.ac.aixigo.de freshclam[2403]: main.cld database is up-to-date (version: 63, sigs: 3287027, f-level: 90, builder: tomjudge)
Jun 26 20:08:00 ppcl003.ac.aixigo.de freshclam[2403]: bytecode.cvd database is up-to-date (version: 339, sigs: 80, f-level: 90, builder: nrandolp)
Jun 26 20:08:00 ppcl003.ac.aixigo.de freshclam[2403]: --------------------------------------
Jun 26 20:16:59 ppcl003.ac.aixigo.de freshclam[2403]: Fri Jun 26 20:16:59 2026 -> Update process terminated
Jun 26 20:16:59 ppcl003.ac.aixigo.de freshclam[2403]: Update process terminated
Jun 26 20:16:59 ppcl003.ac.aixigo.de systemd[1]: Stopping clamav-freshclam.service - ClamAV virus database updater...
Jun 26 20:16:59 ppcl003.ac.aixigo.de systemd[1]: clamav-freshclam.service: Deactivated successfully.
Jun 26 20:16:59 ppcl003.ac.aixigo.de systemd[1]: Stopped clamav-freshclam.service - ClamAV virus database updater.

#1134489#20
Date:
2026-06-26 20:54:08 UTC
From:
To:
Sorry for the double post. I thought the unwanted line wrapping
happened on my side, but it didn't.

Regards
Harri

#1134489#25
Date:
2026-06-28 15:53:43 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
clamav, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1134489@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sebastian Andrzej Siewior <sebastian@breakpoint.cc> (supplier of updated clamav package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 28 Jun 2026 17:24:13 +0200
Source: clamav
Architecture: source
Version: 1.4.4+dfsg-2
Distribution: unstable
Urgency: medium
Maintainer: ClamAV Team <pkg-clamav-devel@lists.alioth.debian.org>
Changed-By: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Closes: 1043428 1089046 1092882 1103001 1123913 1134489 1136481 1138312 1138938
Changes:
 clamav (1.4.4+dfsg-2) unstable; urgency=medium
 .
   [ Sebastian Andrzej Siewior ]
   * Get it compiled aganst OpenSSL 4.0 (Closes: #1138312).
   * Depend on procps for pidof in tests (Closes: #1136481).
   * Update apparmor profile for clamd (Closes: #1092882, #1123913).
   * Remove Scott from the uploads. Thank you for all what you done
     (Closes: 1138938).
   * Don't Enable freshclam once+timer by default (Closes: #1134489).
   * Mention in the README.Debian that clamAV AppArmor profiles do not allow
     OnAccess scanning ("Closes: #1043428).
   * Add Romanian debconf templates translation (Closes: #1103001).
 .
   [ Helmut Grohne ]
   * Improve cross building: (Closes: #1089046)
     + Skip tests in arch-only build with DEB_BUILD_OPTIONS=nocheck.
     + Skip doxygen in arch-only build.
     + Demote/annotate conditional dependencies.
 .
   [ Pétur Ingi Egilsson ]
   * clamav-daemon.postinst.in: honour "none" as a way to disable
     the LogFile directive.
Checksums-Sha1:
 b40da3cf75caf275135885730688832882efa068 3042 clamav_1.4.4+dfsg-2.dsc
 70f79aa4c2ea4b1fa71ea8b2eb1b1cca98b5e316 521176 clamav_1.4.4+dfsg-2.debian.tar.xz
Checksums-Sha256:
 5706de641944f221c69068407f1c5d01c418369c0b3f3f8a9fa7683f41180d08 3042 clamav_1.4.4+dfsg-2.dsc
 101b1183c3faa6aeee7af74ea94fb8a3ea7b25908f43923953510a102a6169b0 521176 clamav_1.4.4+dfsg-2.debian.tar.xz
Files:
 f7db0c0b749b0e676867985b25cf9ea2 3042 utils optional clamav_1.4.4+dfsg-2.dsc
 970a0370a3c118dcc1ceaf1d5cf891e4 521176 utils optional clamav_1.4.4+dfsg-2.debian.tar.xz
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEEV4kucFIzBRM39v3RBWQfF1cS+lsFAmpBPPAACgkQBWQfF1cS
+lu+BAwAnKObBrkAFdfo30PvOUYOhrogKiXAuuc+VQF91UL2Qjh4VEYILXU0xxP0
evhAc+6hT8sJc7ykvtS4IuOgKPiTYjBx1K0XhUpEFSyIU1kCLhFcTDVoubHbtYA7
tco6uU3YNaV5nvZY3pr4LACcg147Ck4fsRnAZCmSgW9YKha7KKEO4xTTEFta8nuR
98H8b9F49GBEFx0rpD7CffUzE1t0jeZyx83mNekeb6jSHupHSOPx5EcMK7MMts6l
RGeE1QTU4JrbmcoZ6ftsjVAmOS5zvs0RHB/7uP/QIOTNDlNOF/likHNKdigQi0nV
TWtRasfP85ekBYNRJPk4pQofe1aiH15jh3mhF7lKv7zCvm/hzOJL1wFYVUiCbBwn
l2cV3aJFxsO+JbATxHkRI3hP3Gx6G77W3nmSmruTFZeVsCLZNMZa8bkgReTaO+T+
4efH52vbXNkalb4No6FGB8WkpLxkHTFa6S4dLqoMOh3gJ4PxEKXpPvUmFsQBLic8
PXmk9wvb
=bR0i
-----END PGP SIGNATURE-----