[From nobody Sun Jun 28 16:54:09 2026
Received: (at submit) by bugs.debian.org; 20 Apr 2026 19:54:06 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
 (2024-03-25) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-19.2 required=4.0 tests=BAYES_00,
 BODY_INCLUDES_PACKAGE,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,
 DKIM_VALID_EF,HAS_PACKAGE,SPF_HELO_NONE,SPF_PASS,XMAILER_REPORTBUG
 autolearn=ham autolearn_force=no
 version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 47; hammy, 150; neutral, 63; spammy,
 0. spammytokens: hammytokens:0.000-+--HTo:N*Debian,
 0.000-+--H*Ad:N*Bug, 0.000-+--H*Ad:N*Tracking, 0.000-+--HTo:N*System,
 0.000-+--HTo:N*Bug
Return-path: &lt;timo@van-roermund.nl&gt;
Received: from outfw-0.mailport.nl ([87.239.8.177]:51393)
 by buxtehude.debian.org with esmtps
 (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.96) (envelope-from &lt;timo@van-roermund.nl&gt;)
 id 1wEuh2-005MHM-23 for submit@bugs.debian.org;
 Mon, 20 Apr 2026 19:54:06 +0000
Received: from localhost (localhost [127.0.0.1])
 by outfw-1.mailport.nl (Postfix) with ESMTP id 35E0B20054E4
 for &lt;submit@bugs.debian.org&gt;; Mon, 20 Apr 2026 21:48:18 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=van-roermund.nl;
 s=sign-a; t=1776714498;
 bh=5esWIwFrX8B8qiO6EXC5/0pHti7DL9CsvSK4+1d2bZs=;
 h=From:To:Subject:Date;
 b=MWhHUJNPqf1bAt2nGGuGDwsUAcQLxYPPKBeHYQkGgW8Ohhk16pQ8xBtFXjrRDUW7p
 pm2NVt1cXYWc/IrdUHcA07TqLwgCOUGQUPIOtEZGAz6BptlfFkzRzZLpljjDbSswRv
 ZYeolycJ8OCY9xGkjn6DZBbDzJeW1N2jWqdK8OT4=
X-Virus-Scanned: Spamfilter at mailport.nl
Received: from outfw-1.mailport.nl ([127.0.0.1])
 by localhost (outfw-1.mailport.nl [127.0.0.1]) (amavis, port 10024)
 with ESMTP id w6CRBcb26KeB for &lt;submit@bugs.debian.org&gt;;
 Mon, 20 Apr 2026 21:48:16 +0200 (CEST)
Received: from mailcluster-1.intention.nl (m2.cl1.intention.nl [87.239.8.64])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by outfw-1.mailport.nl (Postfix) with ESMTPS id C653F2053481
 for &lt;submit@bugs.debian.org&gt;; Mon, 20 Apr 2026 21:48:16 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=van-roermund.nl;
 s=sign-a; t=1776714496;
 bh=5esWIwFrX8B8qiO6EXC5/0pHti7DL9CsvSK4+1d2bZs=;
 h=From:To:Subject:Date;
 b=Mj2ur1kSOb+SYK59RNRRNYkMLKltMSA/UPcHGrAE/wJO6n0EJ1mfS9IUp9IpAEjEk
 hE/QaWVl8W3I+mV0D2hxco600xIk6oCSSrOgXXJ7j+2EN/qD7lr0ITCKmCZpdUN8W5
 d6eA0fFjbtw3evA+bIzaVyaSdxCbKzklloRpaZDQ=
Received: from van-roermund.nl (unknown
 [IPv6:2003:ff:27ff:c78:4020:cd28:72cc:6ddf])
 (Authenticated sender: timo@van-roermund.nl)
 by mailcluster-1.intention.nl (ESMTP) with ESMTPA id 9553BC009B82
 for &lt;submit@bugs.debian.org&gt;; Mon, 20 Apr 2026 21:48:16 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=van-roermund.nl;
 s=sign-a; t=1776714496;
 bh=5esWIwFrX8B8qiO6EXC5/0pHti7DL9CsvSK4+1d2bZs=;
 h=From:To:Subject:Date;
 b=Mj2ur1kSOb+SYK59RNRRNYkMLKltMSA/UPcHGrAE/wJO6n0EJ1mfS9IUp9IpAEjEk
 hE/QaWVl8W3I+mV0D2hxco600xIk6oCSSrOgXXJ7j+2EN/qD7lr0ITCKmCZpdUN8W5
 d6eA0fFjbtw3evA+bIzaVyaSdxCbKzklloRpaZDQ=
Received: from root by van-roermund.nl with local (Exim 4.99.1)
 (envelope-from &lt;timo@van-roermund.nl&gt;) id 1wEubO-00000000D9E-2VJ8;
 Mon, 20 Apr 2026 21:48:14 +0200
Content-Type: text/plain; charset=&quot;us-ascii&quot;
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Timo van Roermund &lt;timo@van-roermund.nl&gt;
To: Debian Bug Tracking System &lt;submit@bugs.debian.org&gt;
Subject: clamav-freshclam-once.service fails to start
Message-ID: &lt;177671449458.48970.5977838851664063373.reportbug@lan0.localnet&gt;
X-Mailer: reportbug 13.2.0
Date: Mon, 20 Apr 2026 21:48:14 +0200
X-Greylist: delayed 341 seconds by postgrey-1.37 at buxtehude;
 Mon, 20 Apr 2026 19:54:04 UTC
Delivered-To: submit@bugs.debian.org

Package: clamav-freshclam
Version: 1.4.4+dfsg-1
Severity: normal

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?

-- debconf information:
  clamav-freshclam/Bytecode: true
  clamav-freshclam/SafeBrowsing: false
  clamav-freshclam/proxy_user:
  clamav-freshclam/PrivateMirror:
  clamav-freshclam/NotifyClamd: false
  clamav-freshclam/autoupdate_freshclam: daemon
  clamav-freshclam/http_proxy:
  clamav-freshclam/internet_interface:
  clamav-freshclam/LogRotate: true
  clamav-freshclam/local_mirror: db.local.clamav.net
  clamav-freshclam/update_interval: 24
]