[SRU] amavis start-stop script fails to stop amavisd
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| amavisd-new (Debian) |
Fix Released
|
Unknown
|
||
| amavisd-new (Ubuntu) |
High
|
James Page | ||
| Precise |
High
|
James Page | ||
| Quantal |
High
|
James Page |
Bug Description
[Impact]
sudo service amavis restart completely fails to restart the amavis daemon.
[Development Fix]
Drop use of --name flag with start-stop-daemon as this is surplus to requirements and is the root cause of this issue. This was applied in Debian in revision 1:2.7.0-1
[Stable Fix]
Cherry pick same changes to init script from latest version.
[Test Case]
Running the unfixed version of the package
1) sudo apt-get install amavisd-new
2) sudo service amavis restart
3) Observe
Stopping amavisd: (not running).
Starting amavisd: The amavisd daemon is already running, PID: [{xxx}] (failed).
With the version of the package in -proposed step 2/3 should not fail.
[Regression Potential]
Minimal - very isolated change in init script which only impacts this package.
[Original Bug Report]
On Ubuntu 12.04 Precise Pangolin using amavisd-new 2.6.5-0ubuntu3 the amavis start-stop script fails to stop the daemon.
What occurs is the following:
sudo service amavis restart
Stopping amavisd: (not running).
Starting amavisd: The amavisd daemon is already running, PID: [{xxx}] (failed).
The installer script for amavisd-new has some errors as well probably related(?).
Apparently this behavior has been reported for Debian:
http://
Related branches
albatros (jda) wrote : | #1 |
Serge Hallyn (serge-hallyn) wrote : | #2 |
Marking confirmed based on debian report.
Changed in amavisd-new (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in amavisd-new (Debian): | |
status: | Unknown → Fix Released |
Vibhav Pant (vibhavp) wrote : | #3 |
Attached Fix.
Daniel Holbach (dholbach) wrote : | #4 |
Thanks Vibhav for your work on this.
Can you verify that in your patch you replaced the old debian/
Vibhav Pant (vibhavp) wrote : | #5 |
I have verified the patch again.
albatros (jda) wrote : | #6 |
Looking at it & reading the Debian package's changelog I think the only thing to fix this has been removing the check for the uid of the running process when stopping the process. The necessary patch might be limited to something like the attached file.
albatros (jda) wrote : | #7 |
Sorry I have not put the correct paths in the patch....
Daniel Holbach (dholbach) wrote : | #8 |
What I found was the following:
daniel@daydream:~$ diff -ruN amavisd-
--- amavisd-
+++ amavisd-
@@ -41,8 +41,8 @@
set -e
-START="--start --quiet --pidfile $PIDFILE --name ${DAEMONNAME} --startas ${DAEMON}"
-STOP="--stop --quiet --pidfile $PIDFILE --name ${DAEMONNAME}"
+START="--start --quiet --pidfile $PIDFILE --startas ${DAEMON}"
+STOP="--stop --quiet --pidfile $PIDFILE"
PARAMS=
check_
daniel@daydream:~$
Daniel Holbach (dholbach) wrote : | #9 |
Can somebody please go and test the current amavisd-new in Ubuntu precise and make sure it still works with the init script changes above?
Daniel Holbach (dholbach) wrote : | #10 |
Until then I'll unsubscribe the 'ubuntu-sponsors' team, please re-subscribe when ready.
tags: | added: rls-p-tracking |
albatros (jda) wrote : | #11 |
The changes in #8 work.
Mike C (mconigliaro) wrote : | #12 |
The changes in #8 work for me too.
Changed in amavisd-new (Ubuntu): | |
assignee: | nobody → Clint Byrum (clint-fewbar) |
Thomas M Steenholdt (tmus) wrote : | #13 |
Any reason why this fix has not gone into "final" precise?
Changed in amavisd-new (Ubuntu): | |
assignee: | Clint Byrum (clint-fewbar) → James Page (james-page) |
Changed in amavisd-new (Ubuntu Quantal): | |
status: | Confirmed → Fix Released |
Changed in amavisd-new (Ubuntu Precise): | |
importance: | Undecided → High |
assignee: | nobody → James Page (james-page) |
status: | New → In Progress |
summary: |
- amavis start-stop script fails to stop amavisd + [SRU] amavis start-stop script fails to stop amavisd |
description: | updated |
James Page (james-page) wrote : | #14 |
Uploaded to precise-proposed ready for SRU team review.
Hello albatros, or anyone else affected,
Accepted amavisd-new into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https:/
Changed in amavisd-new (Ubuntu Precise): | |
status: | In Progress → Fix Committed |
tags: | added: verification-needed |
description: | updated |
Vibhav Pant (vibhavp) wrote : | #16 |
amavisd-new in proposed works for me
tags: |
added: verification-done removed: verification-needed |
Changed in amavisd-new (Ubuntu Precise): | |
milestone: | none → ubuntu-12.04.1 |
Launchpad Janitor (janitor) wrote : | #17 |
This bug was fixed in the package amavisd-new - 1:2.6.5-0ubuntu3.1
---------------
amavisd-new (1:2.6.
* Fix init script so that 'service amavisd restart' works (LP: #930916):
- d/amavisd-new.init: Remove use of --name flag with start-stop-daemon
to ensure that service can be restarted.
Cherry picked from packaging in 1:2.7.1-1.
-- James Page <email address hidden> Tue, 22 May 2012 18:48:19 +0100
Changed in amavisd-new (Ubuntu Precise): | |
status: | Fix Committed → Fix Released |
An easy fix:
In /etc/init.d/amavis:
replace the line
STOP="--stop --quiet --pidfile $PIDFILE --name ${DAEMONNAME}"
with
STOP="--stop --quiet --pidfile $PIDFILE"