stopping freshclam doesn't remove pidfile

Bug #829944 reported by Imre Gergely on 2011-08-20
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ClamAV
Fix Released
Medium
clamav (Ubuntu)
Low
Unassigned

Bug Description

In latest clamav 0.97.2, when stopping freshclam daemon the usual way, its pidfile doesn't get removed

root@utest-oos32:~# ps ax |grep freshclam
 6468 ? Ss 0:01 /usr/bin/freshclam -d --quiet
 6473 pts/0 S+ 0:00 grep --color=auto freshclam

root@utest-oos32:~# cat /var/run/clamav/freshclam.pid
6468

root@utest-oos32:~# /etc/init.d/clamav-freshclam stop
 * Stopping ClamAV virus database updater freshclam [ OK ]

root@utest-oos32:~# ps ax |grep freshclam
 6609 pts/0 S+ 0:00 grep --color=auto freshclam

root@utest-oos32:~# cat /var/run/clamav/freshclam.pid
6468
root@utest-oos32:~#

In contrast, when stopping clamav-daemon its pidfile does get removed.

Erik Simmesgård (ersi) on 2011-08-22
Changed in clamav (Ubuntu):
status: New → Confirmed
Dave Walker (davewalker) on 2011-08-22
Changed in clamav (Ubuntu):
importance: Undecided → Low
Erik Simmesgård (ersi) wrote :

I have confirmed to have the same issue with clamav-0.97+dfsg-2ubuntu1.1 on a fresh install of Ubuntu 11.04.

root@ubuntu:~# ps aux | grep clamav
clamav 1534 8.4 0.3 13244 1824 ? Ss 22:15 0:07 /usr/bin/freshclam -d --quiet
root@ubuntu:~# ls -l /var/run/clamav/freshclam.pid
-rw-rw---- 1 clamav clamav 4 2011-08-22 22:15 /var/run/clamav/freshclam.pid
root@ubuntu:~# cat /var/run/clamav/freshclam.pid
1534
root@ubuntu:~# /etc/init.d/clamav-freshclam stop
 * Stopping ClamAV virus database updater freshclam [ OK ]
root@ubuntu:~# ls -l /var/run/clamav/freshclam.pid
-rw-rw---- 1 clamav clamav 4 2011-08-22 22:15 /var/run/clamav/freshclam.pid
root@ubuntu:~# cat /var/run/clamav/freshclam.pid
1534
root@ubuntu:~# ls -l /var/run/clamav/freshclam.pid^Cid
root@ubuntu:~# ps aux | grep clam
root 1785 0.0 0.1 4148 852 pts/0 S+ 22:26 0:00 grep --color=auto clam

Erik Simmesgård (ersi) wrote :

I suggest setting "Importance: Low", since it does not impact the functionality of a running instance and is easily worked around.

Michael Tautschnig (mt-debian) wrote :

Note that both clamav-daemon and freshclam are supposed to do the removal of the pid file themselves, and indeed also freshclam does have an unlink call. I'm not sure whether we are killing it in the wrong way or running into some upstream bug. I'll try to investigate.

Best,
Michael

Michael Tautschnig (mt-debian) wrote :

freshclam does handle some signals with specific actions, but just terminates in case of SIGINT or SIGTERM. Therefore the unlink call is not reached. This is either and upstream bug or a design decision by upstream. I'd appreciate if this problem report were forwarded upstream.

Best,
Michael

Found this in Ubuntu when testing clamav 0.97.2.

https://bugs.launchpad.net/bugs/829944

In latest clamav 0.97.2, when stopping freshclam daemon the usual way, its pidfile doesn't get removed

root@utest-oos32:~# ps ax |grep freshclam
 6468 ? Ss 0:01 /usr/bin/freshclam -d --quiet
 6473 pts/0 S+ 0:00 grep --color=auto freshclam

root@utest-oos32:~# cat /var/run/clamav/freshclam.pid
6468

root@utest-oos32:~# /etc/init.d/clamav-freshclam stop
 * Stopping ClamAV virus database updater freshclam [ OK ]

root@utest-oos32:~# ps ax |grep freshclam
 6609 pts/0 S+ 0:00 grep --color=auto freshclam

root@utest-oos32:~# cat /var/run/clamav/freshclam.pid
6468
root@utest-oos32:~#

In contrast, when stopping clamav-daemon its pidfile does get removed.

Changed in clamav:
importance: Unknown → Medium
status: Unknown → Confirmed
In , Tkojm (tkojm) wrote :

Fixed in master, thanks

Changed in clamav:
status: Confirmed → Fix Released
Scott Kitterman (kitterman) wrote :

This was fixed in clamav 0.97.3.

Changed in clamav (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.