stopping freshclam doesn't remove pidfile

Bug #829944 reported by Imre Gergely
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ClamAV
Fix Released
Medium
clamav (Ubuntu)
Fix Released
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)
Changed in clamav (Ubuntu):
status: New → Confirmed
Dave Walker (davewalker)
Changed in clamav (Ubuntu):
importance: Undecided → Low
Revision history for this message
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

Revision history for this message
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.

Revision history for this message
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

Revision history for this message
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

Revision history for this message
In , Imre Gergely (cemc) wrote :

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
Revision history for this message
In , Tkojm (tkojm) wrote :

Fixed in master, thanks

Changed in clamav:
status: Confirmed → Fix Released
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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