[Dovecot] Stale imap processes

Brad brad at comstyle.com
Wed Aug 2 18:19:19 EEST 2006


On Wed, Aug 02, 2006 at 04:27:25PM +0200, Renaud Allard wrote:
> 
> 
> Brad wrote:
> > On Tue, Aug 01, 2006 at 05:38:00PM -0700, Pete Slagle wrote:
> >> Fran Fabrizio wrote:
> >>
> >>> Anyone have any theories or experiences as to why for a certain user, 
> >>> some of his imap processes hang, and stay around for days and days?  He 
> >>> just reported that his Thunderbird was timing out when trying to open 
> >>> folders, I looked on the server, and he had 3 old imap processes from 1 
> >>> week+ ago.  I killed those and his performance immediately improved.
> >>>
> >>> He checks mail with Thunderbird > 1.5 from both Win and Linux, 
> >>> Squirrelmail webmail, and pine.  Of those, pine is the only one that is 
> >>> somewhat rare around here - any specific problems with pine's imap 
> >>> client code that anyone knows about?
> >>>
> >>> We have been using the dovecot-1.0-0.beta2.7 rpm for Fedora Core 5, I'm 
> >>> updating to 1.0-0.beta8.2.fc5 to see if that helps, as well.  Just 
> >>> curious if anyone else has seen this lately.
> >>>
> >>> Thanks,
> >>> Fran
> >> I have just seen this problem, big time. I was poking around on a
> >> FreeBSD 6.1 server because of Thunderbird hangs (see thread
> >> "dovecot-1.0rc2 problems with Thunderbird" if you are interested), and I
> >> found over 900 (!) imap process. Only two users were using the dovecot
> >> server at the time.
> >>
> >> I restarted dovecot, but this did NOT kill the multitudinous imap
> >> processes. After another restart, with a 'killall imap' in the middle,
> >> things were temporarily fine, but the number of imap processes
> >> immediately started to grow again. Apparently they never exit. or use
> >> any CPU, but just sit around in KQREAD state, eventually getting swapped
> >> out. No error messages are generated.
> > 
> > Stop using the kqueue support! It is broken and has never fully worked
> > properly. This is a known issue if you back in the list archives.
> > 
> 
> Unfortunately, I had the problem on OpenBSD with dovecot 1.0rc2. Stale
> imap processes when _NOT_ using kqueue (using poll). Using kqueue solved
> the problem. Not sure if it's the same on FreeBSD, but it seems that
> using kqueue solves the stale processes problem both on OpenBSD and
> NetBSD. On linux, kqueue doesn't produce stale imap processes either.
 
I have had a number of reports that kqueue, specifically kqueue for
the file change mechanism (--with-notify=kqueue), causes the hanging
and disabling this allowed regular operation. kqueue for the I/O loop
mechanism causes dovecot processes to crash under certain (unknown)
conditions. If poll is causing problems then there are definitely some
nasty bugs lurking in the code base. The problem with the file change
mechanism and kqueue popped up somewhere between beta8 and rc2.


More information about the dovecot mailing list