Bug 436666 - dovecut master.pid isn't removed on system startup, occasionally causing dovecot not to start up
Summary: dovecut master.pid isn't removed on system startup, occasionally causing dove...
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts   
(Show other bugs)
Version: 8
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-03-08 23:37 UTC by Mads Kiilerich
Modified: 2014-03-17 03:12 UTC (History)
1 user (show)

Fixed In Version: Fedora 9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-27 22:40:10 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Mads Kiilerich 2008-03-08 23:37:09 UTC
Description of problem:

Version-Release number of selected component (if applicable):

How reproducible:
hard but explainable

Steps to Reproduce:
1. crash machine, leaving it with /var/run/dovecot/master.pid
2. start machine, let /etc/rc.sysinit remove /var/run/dovecot/*/*
3. let ntp start and let it get the pid from master.pid

Actual results:
Error: Dovecot is already running with PID 1835 (read from
Fatal: Invalid configuration in /etc/dovecot.conf

- which is pretty fatal if you are running an imap server...

Expected results:
Starting Dovecot Imap:                                     [  OK  ]

Additional info:
Seems to be fixed by
-               */dovecot)      rm -f $afile/*/* ;;
+               */dovecot)      rm -f $afile/*/* $afile/* ;;

Comment 1 Mads Kiilerich 2008-03-09 01:19:09 UTC
In my case selinux seems to have prevented dovecot from killing ntp:

host=localhost.localdomain type=AVC msg=audit(1205017755.529:33): avc: denied {
kill } for pid=6452 comm="dovecot" capability=5
tcontext=unconfined_u:system_r:dovecot_t:s0 tclass=capability
host=localhost.localdomain type=SYSCALL msg=audit(1205017755.529:33):
arch=40000003 syscall=37 success=no exit=-1 a0=72b a1=0 a2=72b a3=9970030
items=0 ppid=6451 pid=6452 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0
sgid=0 fsgid=0 tty=pts0 comm="dovecot" exe="/usr/sbin/dovecot"
subj=unconfined_u:system_r:dovecot_t:s0 key=(null) 

So an alternative decription of the problem could be "dovecot kills random
process when started after crash"

Comment 2 Mads Kiilerich 2008-05-27 22:40:10 UTC
Seems to be solved in initscripts-8.76.2-1.i386 in Fedora 9 by using
    find -L /var/lock /var/run ! -type d -exec rm -f {} \;

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