The app-antivirus/clamav-1.2.1 OpenRC initscript specifies the wrong path for the daemon's pid file Details of the clamav package installed: meshedgedx /home/fitzcarraldo # eix -I clamav [I] acct-group/clamav Available versions: 0-r2 Installed versions: 0-r2(03:58:28 04/08/23) Description: System group: clamav [I] acct-user/clamav Available versions: 0-r2 Installed versions: 0-r2(04:06:23 04/08/23) Description: System user: clamav [I] app-antivirus/clamav Available versions: 0.103.8(0/lts)^t (~)0.103.11(0/lts)^t (~)1.0.3(0/lts)^t 1.1.0(0/sts)^t (~)1.1.3(0/sts)^t (~)1.2.1(0/sts)^t {bzip2 +clamapp clamdtop clamonacc clamsubmit debug doc experimental iconv ipv6 jit libclamav-only metadata-analysis-api milter rar selinux +system-mspack systemd test xml} Installed versions: 1.2.1(0/sts)^t(12:16:37 30/12/23)(clamapp rar system-mspack -clamonacc -debug -doc -experimental -jit -libclamav-only -milter -selinux -systemd -test) Homepage: https://www.clamav.net/ Description: Clam Anti-Virus Scanner Found 3 matches rc-status reports that clamd has crashed: meshedgedx /home/fitzcarraldo # /etc/init.d/clamd status * status: crashed However, the clamav daemon appears to be running: meshedgedx /home/fitzcarraldo # ps -ef | grep clam clamav 4885 1 0 12:04 ? 00:00:00 /usr/bin/freshclam -p /run/freshclam.pid --daemon clamav 12813 1 4 12:55 ? 00:00:55 /usr/sbin/clamd root 24382 6591 0 13:14 pts/1 00:00:00 grep --colour=auto clam I looked in /etc/init.d/clamd and noticed the line: pidfile="/run/${RC_SVCNAME}.pid" However, for this version of clamav (and any earlier versions after upstream changed the pid file location) it should be: pidfile="/run/clamav/${RC_SVCNAME}.pid" I edited /etc/init.d/clamd and changed the line as shown above, then restarted clamd: meshedgedx /home/fitzcarraldo # nano /etc/init.d/clamd meshedgedx /home/fitzcarraldo # rc-service clamd restart * Caching service dependencies ... [ ok ] * Stopping clamd ... [ ok ] * Starting clamd ... [ ok ] meshedgedx /home/fitzcarraldo # /etc/init.d/clamd status * status: started Problem solved. Reproducible: Always Steps to Reproduce: 1. Install app-antivirus/clamav-1.2.1 in Gentoo Testing 2. Reboot or restart clamd 3. Check service status
(In reply to Fitzcarraldo from comment #0) > > I looked in /etc/init.d/clamd and noticed the line: > > pidfile="/run/${RC_SVCNAME}.pid" > > However, for this version of clamav (and any earlier versions after upstream > changed the pid file location) it should be: > > pidfile="/run/clamav/${RC_SVCNAME}.pid" > > I edited /etc/init.d/clamd and changed the line as shown above, then > restarted clamd: Upstream didn't change the default, they only changed a comment in config file -- the Gentoo ebuild uncomments it. But, the new (commented) location is insecure: https://github.com/Cisco-Talos/clamav/issues/1076 The old value of /run/${RC_SVCNAME}.pid is correct. The newer ebuilds should be tweaked to use it rather than the commented-out line from upstream.