Bug 12755 - systemctl reload amavisd causes daemon to crash
Summary: systemctl reload amavisd causes daemon to crash
Status: RESOLVED INVALID
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 4
Hardware: x86_64 Linux
Priority: Normal critical
Target Milestone: ---
Assignee: Thomas Spuhler
QA Contact:
URL:
Whiteboard:
Keywords: Triaged
Depends on:
Blocks:
 
Reported: 2014-02-13 16:02 CET by Daniel McDonald
Modified: 2014-02-22 13:13 CET (History)
1 user (show)

See Also:
Source RPM: amavisd-new-2.8.2-0.rc1.4.mga4.src.rpm
CVE:
Status comment:


Attachments

Description Daniel McDonald 2014-02-13 16:02:29 CET
Description of problem:
Each morning when the /usr/share/spamassassin/sa-update.cron script is run, one step is to issue this command:
	 [ -f /run/amavis/amavis.pid ] && /usr/bin/systemctl reload amavisd  >& /dev/null
The result is that the amavisd daemon crashes

Version-Release number of selected component (if applicable):
2.8.2-0.rc1.4

How reproducible:

Every time

Steps to Reproduce:
1. $ sudo systemctl reload amavisd
2. $ sudo systemctl status amavisd
amavisd.service - AMAVIS interface between MTA and content checkers
   Loaded: loaded (/usr/lib/systemd/system/amavisd.service; enabled)
   Active: failed (Result: exit-code) since Thu 2014-02-13 08:52:03 CST; 1s ago
  Process: 585 ExecReload=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf -P /run/amavis/amavis.pid reload (code=exited, status=0/SUCCESS)
  Process: 32562 ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf -P /run/amavis/amavis.pid (code=exited, status=0/SUCCESS)
 Main PID: 32563 (code=exited, status=13)

Feb 13 08:52:03 ns1.austinnetworkdesign.com amavis[585]: Valid PID file (younger than sys uptime 4 13:34:00)
Feb 13 08:52:03 ns1.austinnetworkdesign.com amavis[585]: Signalling a SIGHUP to a running daemon [32563]
Feb 13 08:52:03 ns1.austinnetworkdesign.com amavis[32563]: Net::Server: Received a SIG HUP
Feb 13 08:52:03 ns1.austinnetworkdesign.com amavisd[585]: Signalling a SIGHUP to a running daemon [32563]
Feb 13 08:52:03 ns1.austinnetworkdesign.com amavis[32563]: Net::Server: 2014/02/13-08:52:03 Server closing!
Feb 13 08:52:03 ns1.austinnetworkdesign.com amavis[32563]: Net::Server: Sending children hup signal
Feb 13 08:52:03 ns1.austinnetworkdesign.com amavis[32563]: (!)Net::Server: 2014/02/13-08:52:03 Re-exec server during HUP
Feb 13 08:52:03 ns1.austinnetworkdesign.com systemd[1]: Reloaded AMAVIS interface between MTA and content checkers.
Feb 13 08:52:03 ns1.austinnetworkdesign.com systemd[1]: amavisd.service: main process exited, code=exited, status=13/n/a
Feb 13 08:52:03 ns1.austinnetworkdesign.com systemd[1]: Unit amavisd.service entered failed state.


Reproducible: 

Steps to Reproduce:
Daniel McDonald 2014-02-13 16:24:06 CET

Summary: systemdctl reload amavisd causes daemon to crash => systemctl reload amavisd causes daemon to crash

Manuel Hiebel 2014-02-16 18:32:03 CET

Keywords: (none) => Triaged
Assignee: bugsquad => thomas

Comment 1 Colin Guthrie 2014-02-22 12:12:33 CET
Yeah I am seeing this problem too. Will try and work out why.

CC: (none) => mageia

Comment 2 Colin Guthrie 2014-02-22 12:37:24 CET
Got it.

The /etc/amavisd/amavisd.conf file needs to be group owned+readable by amavis user. Out of the box, this is how the RPM is configured, but my system got out of sync at some point over the years.

I got the hint from this post: http://lists.amavis.org/pipermail/amavis-users/2012-July/001738.html

After correcting this, the reload works fine.

Status: NEW => RESOLVED
Resolution: (none) => INVALID

Comment 3 Colin Guthrie 2014-02-22 13:13:57 CET
I've closed this bug but I've also added a workaround in the package and submitted it to updates/testing. All it does is do a chgrp+chmod in the %post - nothing too complex!

As we've got an update pending already for MGA3, I've (currently) bundled it in there so the update will come through bug #11246 (unless QA want to keep it separate in which case this bug will likely be reopened).

All the best.

Note You need to log in before you can comment on or make changes to this bug.