On 11.6.2012, at 11.09, Jesper Dahl Nyerup wrote:
Stracing the processes in D state from before they hang has just revealed something interesting, however, pointing to an issue with inotify rather than epoll.
[snip] [...] 15414 23:27:36 inotify_init() = 12 <0.000024> [...] 15414 23:27:36 close(12
15414 23:28:51 <... close resumed> ) = 0 <74.593917> 15414 23:28:51 close(9 15414 23:28:51 <... close resumed> ) = 0 <0.000080> 15414 23:28:51 exit_group(0) = ? [/snip] In short, as far as we can tell, all the processes in D state appear to be waiting to close the file handle they got from their inotify_init(), and eventually all these close()s go through almost simultaneously.
Yeah. Looks like a kernel bug. You could try if it goes away by disabling inotify in Dovecot. Either recompile with "configure --with-notify=none" or maybe you can disable inotify globally with:
echo 0 > /proc/sys/fs/inotify/max_user_watches echo 0 > /proc/sys/fs/inotify/max_user_instances