Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 518753 - dovecot not restarted after yum update
Summary: dovecot not restarted after yum update
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dovecot
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Michal Hlavinka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-22 11:03 UTC by Mads Kiilerich
Modified: 2009-12-05 00:05 UTC (History)
1 user (show)

Fixed In Version: 1.2.8-2.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-12-05 00:05:37 UTC


Attachments (Terms of Use)

Description Mads Kiilerich 2009-08-22 11:03:07 UTC
Description of problem:

I have dovecot running on my laptop and thunderbird connected to it.

After a yum update dovecot wasn't running any longer. It should have been restarted with condrestart. The behaviour I saw would be very unpleasant on a server.

The packaging and the scriptlets looks fine, so I really don't know what is going on. 

I have seen it happen before, but I can't reproduce it.

# grep -h dovecot /var/log/maillog /var/log/messages| sort
...
Aug 19 23:19:45 localhost dovecot: Dovecot v1.2.2 starting up (core dumps disabled)
Aug 19 23:26:22 localhost yum: Updated: 1:dovecot-1.2.3-1.fc11.i586
Aug 19 23:26:44 localhost dovecot: Dovecot v1.2.3 starting up (core dumps disabled)
Aug 19 23:26:44 localhost dovecot: Killed with signal 15 (by pid=17307 uid=0 code=kill)
Aug 19 23:28:50 localhost dovecot: Killed with signal 15 (by pid=22458 uid=0 code=kill)
Aug 19 23:30:18 localhost dovecot: Dovecot v1.2.3 starting up (core dumps disabled)
Aug 19 23:32:32 localhost dovecot: imap-login: Login: user=<mk>, method=PLAIN, rip=::1, lip=::1, TLS
...
Aug 22 12:11:53 localhost dovecot: imap-login: Login: user=<mk>, method=PLAIN, rip=::1, lip=::1, TLS
Aug 22 12:27:28 localhost yum: Updated: 1:dovecot-1.2.4-1.fc11.i586
Aug 22 12:29:47 localhost dovecot: dovecot: Killed with signal 15 (by pid=19793 uid=0 code=kill)
[and no more - apparently the initscript didn't get as far as starting it again ...]


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

dovecot-1.2.4-1.fc11.i586

Comment 1 Michal Hlavinka 2009-08-26 15:13:42 UTC
thanks for report, I'll fix it

Comment 2 Michal Hlavinka 2009-08-27 06:10:47 UTC
(In reply to comment #1)
> thanks for report, I'll fix it  

well... it seems there is nothing to fix

(In reply to comment #0)
> Description of problem:
> 
> I have dovecot running on my laptop and thunderbird connected to it.
> 
> After a yum update dovecot wasn't running any longer. It should have been
> restarted with condrestart. The behaviour I saw would be very unpleasant on a
> server.

condrestart is there in %postun 1 section, which means condrestart is called after dovecot has been updated. Also all other sections contains correct scripts.

> The packaging and the scriptlets looks fine, so I really don't know what is
> going on. 

yes, they looks fine

> I have seen it happen before, but I can't reproduce it.

I've tried to reproduce this several times upgrading, downgrading,... but was not able to reproduce this.

When this occur next time, check if lock file exists ( /var/lock/subsys/dovecot ) and what chkconfig says ( chkconfig --list dovecot ).

Comment 3 Mads Kiilerich 2009-08-29 18:35:27 UTC
Something slightly different. I have upgraded to F12/rawhide and it works ok.

Suddenly immediately after a reboot:

[root@localhost ~]# service dovecot status
dovecot is stopped
[root@localhost ~]# chkconfig --list|grep dove
dovecot        	0:off	1:off	2:on	3:on	4:on	5:on	6:off
[root@localhost ~]# runlevel
N 5
[root@localhost ~]# rpm -q dovecot
dovecot-1.2.4-1.fc12.i686
[root@localhost ~]# find /var/{lib,lock} | grep dovecot
/var/lib/dovecot
/var/lib/dovecot/ssl-parameters.dat
/var/lib/dovecot/auth-success

Nothing about dovecot in /var/log/messages or /var/log/maillog

Comment 4 Mads Kiilerich 2009-08-29 22:21:13 UTC
Bah - forget the comment 3. I had disabled ipv6, so

[root@localhost ~]# service dovecot restart
Stopping Dovecot Imap:                                     [FAILED]
Starting Dovecot Imap: Fatal: listen(::, 143) failed: Address already in use
                                                           [FAILED]

(It could have been nice if the message had been written to maillog or messages, though.)

Comment 5 Michal Hlavinka 2009-09-01 14:59:02 UTC
I've asked upstream for using syslog sooner in starting process.
See:
http://www.dovecot.org/list/dovecot/2009-September/042564.html

Comment 6 Mads Kiilerich 2009-09-03 23:48:56 UTC
Oh. Now I start thinking.

If dovecot startup failures are sent to stdout only and %postuninstall has 
    /sbin/service dovecot condrestart >/dev/null 2>&1 || :
then that explains the "no traces" part of "stops running with no traces".

Perhaps my "condrestarts" failures were because of something like thish or TIMEWAIT issues or races or something like that. It could be nice to find out.

I suggest piping stdout from dovecot through "logger". Or perhaps removing the muting from the scripts until this issue has been resolved.

Comment 7 Mads Kiilerich 2009-09-04 00:30:43 UTC
Sorry. I'm too slow. Now I saw that my conclusion is exactly what you said on the dovecot list.

Comment 8 Michal Hlavinka 2009-09-07 12:39:28 UTC
status: see dovecot mailing list, upstream introduced change for sooner logging, but it crashes. I hope it will be included in dovecot 1.2.5



--------------

all:

if anyone gets into this problem:

check if lock file exists

/var/lock/subsys/dovecot

try to start dovecot manually with

service dovecot start

if it produces any error message

Comment 9 Mads Kiilerich 2009-09-17 20:26:52 UTC
[root@localhost ~]# date
Thu Sep 17 22:24:23 CEST 2009
[root@localhost ~]# grep dovecot /var/log/messages|tail -n1
Sep 17 22:12:13 localhost yum: Updated: 1:dovecot-1.2.4-3.fc12.i686
[root@localhost ~]# service dovecot status
dovecot is stopped
[root@localhost ~]# tail -n2 /var/log/maillog
Sep 17 22:11:05 localhost dovecot: imap-login: Login: user=<mk>, method=PLAIN, rip=::1, lip=::1, TLS
Sep 17 22:21:43 localhost dovecot: dovecot: Killed with signal 15 (by pid=372 uid=0 code=kill)
[root@localhost ~]# ll /var/lock/subsys/dovecot
ls: cannot access /var/lock/subsys/dovecot: No such file or directory
[root@localhost ~]# service dovecot start
Starting Dovecot Imap:                                     [  OK  ]
[root@localhost ~]#

Comment 10 Michal Hlavinka 2009-09-18 06:37:10 UTC
unfortunately, this version still does not contain improved logging, I'll update dovecot to 1.2.5 now then we'll finally see what's happening there

Comment 11 Mads Kiilerich 2009-11-21 00:10:27 UTC
Bingo. After upgrade from dovecot-1.2.6-4.fc12.i686.rpm to dovecot-1.2.7-2.fc12.i686 I got the problem and an explanation:

Nov 21 00:43:15 localhost dovecot: dovecot: Killed with signal 15 (by pid=26611 uid=0 code=kill)
Nov 21 00:43:16 localhost dovecot: Fatal: listen(0.0.0.0, 143) failed: Address already in use

I am pretty sure nothing was connected to port 143, so I guess it wasn't timewait. I guess it simply was because the kill signal hadn't been delivered and fully executed before dovecot was started again. I assume that the simplest fix would be to add a sleep to cond-restart (and restart!?) like in /etc/rc.d/init.d/sshd.

Comment 12 Michal Hlavinka 2009-11-24 16:18:40 UTC
yes, it looks like some child? process is blocking this port. I'll ask upstream about this and add sleep meanwhile

Comment 13 Michal Hlavinka 2009-11-24 16:31:47 UTC
fixed in:
dovecot-1.2.8-2.fc11
dovecot-1.2.8-2.fc12
dovecot-1.2.8-3.fc13

Comment 14 Fedora Update System 2009-11-27 21:39:41 UTC
dovecot-1.2.8-2.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update dovecot'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-11873

Comment 15 Fedora Update System 2009-12-05 00:05:28 UTC
dovecot-1.2.8-2.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


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