[Dovecot] pop3-login: Fatal: io_loop_handle_add: epoll_ctl(1, 5):

Marco Nenciarini mnencia at prato.linux.it
Wed Sep 30 11:16:38 EEST 2009


Timo Sirainen ha scritto:
> On Sep 23, 2009, at 11:27 AM, Timo Sirainen wrote:
> 
>> On Sep 23, 2009, at 11:17 AM, Marco Nenciarini wrote:
>>
>>> First failure is:
>>>
>>> Sep 23 06:26:14 server dovecot: pop3-login: Fatal: 
>>> io_loop_handle_add: epoll_ctl(1, 5): Operation not permitted
>>
>> That's really the first one, and there's no kind of an error from 
>> dovecot master process? This sounds like wrong fd is being passed to 
>> pop3-login, but why it's being done only randomly I can't really think 
>> of..
> 
> It could be useful to know what the fd actually is. See what it logs 
> with the attached patch?

The problem happened again.

Sep 30 06:26:15 server dovecot: pop3-login: Fatal: io_loop_handle_add: 
epoll_ctl(1, 5): Operation not permitted

There is no additional information from Timo's patch, but if you compare 
it with the last one you can see a weird match on both time and weekday:

Sep 23 06:26:14 server dovecot: pop3-login: Fatal: io_loop_handle_add: 
epoll_ctl(1, 5): Operation not permitted

After some investigation I've found that the daily cron scripts are 
executed every day at 6:25 and the only thing related to dovecot in 
/etc/cron.daily is the call to expire plugin

---------------------------------------------------------------------
server:~# cat /etc/cron.dailyclean-expired-messages
#!/bin/sh

dovecot --exec-mail ext /usr/lib/dovecot/expire-tool.sh

server:~# cat /usr/lib/dovecot/expire-tool.sh
#!/bin/bash
MAIL_PLUGINS=${MAIL_PLUGINS//imap_quota/}
MAIL_PLUGINS=${MAIL_PLUGINS//mail_log/}

exec ${0%.sh} "$@"
---------------------------------------------------------------------

Moreover my expire plugin configuration is

expire: Trash 7 Trash/* 7 Cestino 7 Cestino/* 7 Junk 30 Spam 30

so the weekly periodicity can be explained with something happened in a 
Trash mailbox.

My configuration is

---------------------------------------------------------------------
# 1.2.5: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.26-2-xen-amd64 x86_64 Debian 5.0.3
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap imaps pop3 pop3s managesieve
ssl_cert_file: /etc/ssl/certs/delta01.pem
ssl_key_file: /etc/ssl/private/delta01.key
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
login_executable(managesieve): /usr/lib/dovecot/managesieve-login
first_valid_uid: 2000
last_valid_uid: 2000
first_valid_gid: 2000
last_valid_gid: 2000
mail_privileged_group: mail
mail_location: maildir:~/Maildir
mbox_write_locks: fcntl dotlock
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_executable(managesieve): /usr/lib/dovecot/managesieve
mail_plugins(default): quota imap_quota expire trash
mail_plugins(imap): quota imap_quota expire trash
mail_plugins(pop3): quota expire
mail_plugins(managesieve):
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve
imap_client_workarounds(default): delay-newmail
imap_client_workarounds(imap): delay-newmail
imap_client_workarounds(pop3):
imap_client_workarounds(managesieve):
pop3_save_uidl(default): no
pop3_save_uidl(imap): no
pop3_save_uidl(pop3): yes
pop3_save_uidl(managesieve): no
pop3_uidl_format(default): %08Xu%08Xv
pop3_uidl_format(imap): %08Xu%08Xv
pop3_uidl_format(pop3): %f
pop3_uidl_format(managesieve): %08Xu%08Xv
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
pop3_client_workarounds(managesieve):
namespace:
   type: private
   separator: .
   inbox: yes
   list: yes
   subscriptions: yes
namespace:
   type: private
   separator: .
   prefix: INBOX.
   hidden: yes
   list: no
   subscriptions: yes
lda:
   postmaster_address: postmaster at xcon.it
   mail_plugins: quota sieve expire
   auth_socket_path: /var/run/dovecot/auth-master
auth default:
   mechanisms: plain login
   passdb:
     driver: sql
     args: /etc/dovecot/dovecot-sql.conf
   userdb:
     driver: prefetch
   userdb:
     driver: sql
     args: /etc/dovecot/dovecot-sql.conf
   socket:
     type: listen
     client:
       path: /var/spool/postfix/private/auth
       mode: 432
       user: postfix
       group: postfix
     master:
       path: /var/run/dovecot/auth-master
       mode: 384
       user: vmail
       group: vmail
plugin:
   quota: dict:user::proxy::quota
   quota2: dict:domain:%d:proxy::quota_domain
   trash: /etc/dovecot/dovecot-trash.conf
   expire: Trash 7 Trash/* 7 Cestino 7 Cestino/* 7 Junk 30 Spam 30
   expire_dict: proxy::expire
   sieve: ~/.dovecot.sieve
   sieve_dir: ~/sieve
dict:
   quota: pgsql:/etc/dovecot/dovecot-dict-quota.conf
   quota_domain: pgsql:/etc/dovecot/dovecot-dict-quota-domain.conf
   expire: pgsql:/etc/dovecot/dovecot-dict-expire.conf
---------------------------------------------------------------------

The expire dictionary have the standard configuration taken from wiki
and the database have the required trigger.

Content of /etc/dovecot/dovecot-dict-expire.conf
---------------------------------------------------------------------
connect = host=localhost dbname=vmail user=vmail password=XXXXXXXX

map {
   pattern = shared/expire/$user/$mailbox
   table = expires
   value_field = expire_stamp

   fields {
     username = $user
     mailbox = $mailbox
   }
}
---------------------------------------------------------------------

I hope this is enough to catch the bug.

Ciao,
Marco

-- 
---------------------------------------------------------------------
|    Marco Nenciarini    | Debian/GNU Linux Developer - Plug Member |
| mnencia at prato.linux.it | http://www.prato.linux.it/~mnencia       |
---------------------------------------------------------------------
Key fingerprint = FED9 69C7 9E67 21F5 7D95  5270 6864 730D F095 E5E4



More information about the dovecot mailing list