Crash in service imap with version 2.2.13

Urban Loesch bind at enas.net
Tue Jun 24 08:40:31 UTC 2014


Hi,

yesterday  I upgraded to version 2.2.13 under Debian Squeeze.

Since today morning sometimes my logfile shows the folling error:

..
Jun 24 10:14:16 mailstore dovecot: imap(user at domain.net pid:23434 session:<jf6yi5D8TADD/vzh>): Fatal: master: service(imap): child 23434 killed with
signal 11 (core dumped)
...

The kernel error log shows:
...
Jun 24 10:14:16 mailstore kernel: [13959701.899726] imap[23434]: segfault at 1012acec0 ip 00007f7dd89b5e52 sp 00007ffffd33d9b0 error 4 in
libdovecot-storage.so.0.0.0[7f7dd88ed000+10d000]
...

This seems only to happen in conjunction with Horde Webmail. Other IMAP clients aren't affected.

I made a backtrace:

-----> start backtrace <-----
Core was generated by `dovecot/imap'.
Program terminated with signal 11, Segmentation fault.
#0  mail_index_strmap_uid_exists (ctx=0x7ffffd33d9f0, uid=8442) at mail-index-strmap.c:395
395	mail-index-strmap.c: No such file or directory.
	in mail-index-strmap.c
(gdb) bt full
#0  mail_index_strmap_uid_exists (ctx=0x7ffffd33d9f0, uid=8442) at mail-index-strmap.c:395
        rec = 0x1012acec0
#1  0x00007f7dd89b79ab in mail_index_strmap_view_renumber (_sync=<value optimized out>) at mail-index-strmap.c:842
        ctx = {view = 0x12b2d80, input = 0x0, end_offset = 0, highest_str_idx = 0, uid_lookup_seq = 0, lost_expunged_uid = 0, data = 0x0, end = 0x0,
str_idx_base = 0x0, rec = {uid = 0, ref_index = 0, str_idx = 0}, next_ref_index = 0,
          rec_size = 0, too_large_uids = 0}
        str_idx = 0
        count = 1
        ret = <value optimized out>
        prev_uid = 8442
        i = 0
        dest = 0
        count2 = <value optimized out>
#2  mail_index_strmap_write (_sync=<value optimized out>) at mail-index-strmap.c:1189
        ret = <value optimized out>
#3  mail_index_strmap_view_sync_commit (_sync=<value optimized out>) at mail-index-strmap.c:1236
        sync = <value optimized out>
        view = <value optimized out>
#4  0x00007f7dd899fc23 in mail_thread_index_map_build (box=<value optimized out>, args=<value optimized out>, ctx_r=<value optimized out>) at
index-thread.c:332
        last_uid = 8442
        search_ctx = <value optimized out>
        mail = <value optimized out>
        seq1 = 0
        tbox = 0x12af2e0
        headers_ctx = 0x12b7e50
        search_args = <value optimized out>
        seq2 = <value optimized out>
        wanted_headers = {0x7f7dd89d8542 "message-id", 0x7f7dd89d9f96 "in-reply-to", 0x7f7dd89d9fa2 "references", 0x0}
#5  mail_thread_init (box=<value optimized out>, args=<value optimized out>, ctx_r=<value optimized out>) at index-thread.c:569
        tbox = 0x12af2e0
        ctx = 0x12afc10
        search_ctx = 0x12b2b20
        ret = <value optimized out>
        __FUNCTION__ = "mail_thread_init"
#6  0x0000000000414ef3 in imap_thread (cmd=0x12a7eb0) at cmd-thread.c:90
        ctx = <value optimized out>
        str = 0x12afbd0
#7  cmd_thread (cmd=0x12a7eb0) at cmd-thread.c:281
        client = 0x12a72b0
        thread_type = MAIL_THREAD_REFERENCES
        sargs = 0x12b04a0
        args = 0x128faf8
        charset = 0x128fc18 "US-ASCII"
        str = 0x128fc08 "REFERENCES"
        ret = <value optimized out>
#8  0x00000000004181fd in command_exec (cmd=0x12a7eb0) at imap-commands.c:158
        hook = 0x128d110
        ret = <value optimized out>
#9  0x00000000004172e0 in client_command_input (cmd=0x12a7eb0) at imap-client.c:778
        client = 0x12a72b0
        command = <value optimized out>
        __FUNCTION__ = "client_command_input"
#10 0x0000000000417376 in client_command_input (cmd=0x12a7eb0) at imap-client.c:839
        client = 0x12a72b0
        command = 0x12acd00
        __FUNCTION__ = "client_command_input"
#11 0x000000000041765d in client_handle_next_command (client=0x12a72b0) at imap-client.c:877
No locals.
#12 client_handle_input (client=0x12a72b0) at imap-client.c:889
        _data_stack_cur_id = 3
        ret = 80
        remove_io = <value optimized out>
        handled_commands = false
---Type <return> to continue, or q <return> to quit---
        __FUNCTION__ = "client_handle_input"
#13 0x00000000004179ef in client_input (client=0x12a72b0) at imap-client.c:931
        cmd = <value optimized out>
        output = 0x12a7cf0
        bytes = <value optimized out>
        __FUNCTION__ = "client_input"
#14 0x00007f7dd869808e in io_loop_call_io (io=0x12a7dc0) at ioloop.c:441
        ioloop = 0x128c760
        t_id = 2
        __FUNCTION__ = "io_loop_call_io"
#15 0x00007f7dd869923f in io_loop_handler_run_internal (ioloop=<value optimized out>) at ioloop-epoll.c:220
        ctx = 0x128d3f0
        event = 0x128e260
        list = 0x128ee50
        io = 0x12acde0
        tv = {tv_sec = 4, tv_usec = 996567}
        msecs = <value optimized out>
        ret = 1
        i = 0
        call = false
        __FUNCTION__ = "io_loop_handler_run_internal"
#16 0x00007f7dd8698119 in io_loop_handler_run (ioloop=0x12acde0) at ioloop.c:488
No locals.
#17 0x00007f7dd86981a8 in io_loop_run (ioloop=0x128c760) at ioloop.c:465
        __FUNCTION__ = "io_loop_run"
#18 0x00007f7dd8645153 in master_service_run (service=0x128c5f0, callback=0x20fa) at master-service.c:566
No locals.
#19 0x0000000000420f87 in main (argc=1, argv=0x128c3a0) at main.c:410
        set_roots = {0x428fc0, 0x0}
        login_set = {auth_socket_path = 0x1284050 "\210@(\001", postlogin_socket_path = 0x0, postlogin_timeout_secs = 60, callback = 0x421180
<login_client_connected>, failure_callback = 0x421120 <login_client_failed>,
          request_auth_token = 1}
        service_flags = <value optimized out>
        storage_service_flags = MAIL_STORAGE_SERVICE_FLAG_DISALLOW_ROOT
        username = 0x0
        c = <value optimized out>

-----> end backtrace <-----

Have you any idea how I can solve this?

Many thanks
Urban Loesch

doveconf -n:

...
# 2.2.13 (38cd37cea8b1): /etc/dovecot/dovecot.conf
# OS: Linux 3.4.67-vs2.3.3.9-rol-em64t-efigpt x86_64 Debian 6.0.9 ext4
auth_cache_negative_ttl = 0
auth_cache_size = 80 M
auth_cache_ttl = 1 weeks
auth_mechanisms = plain login
auth_verbose = yes
default_client_limit = 2000
deliver_log_format = msgid=%m: %$ %p %w
disable_plaintext_auth = no
login_trusted_networks = INTERNAL_IPS
mail_gid = mailstore
mail_location = mdbox:/home/vmail/%d/%n:INDEX=/home/dovecotindex/%d/%n
mail_log_prefix = "%s(%u pid:%p session:<%{session}>): "
mail_plugins = " quota mail_log notify zlib"
mail_uid = mailstore
mailbox_idle_check_interval = 1 mins
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags
copy include variables body enotify environment mailbox date ihave duplicate imapflags notify
mdbox_rotate_size = 10 M
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Items" {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix =
  separator = /
  type = private
}
passdb {
  args = /etc/dovecot/dovecot-sql-account.conf
  driver = sql
}
plugin {
  mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename flag_change save mailbox_create append
  mail_log_fields = uid box msgid size from
  mail_log_group_events = no
  quota = dict:Storage used::file:%h/dovecot-quota
  quota_rule2 = Trash:storage=+100M
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=80%% quota-warning 80 %u
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  sieve_extensions = +notify +imapflags
  sieve_max_redirects = 15
  zlib_save = gz
  zlib_save_level = 9
}
protocols = imap pop3 lmtp sieve
service auth-worker {
  service_count = 0
  vsz_limit = 512 M
}
service auth {
  unix_listener auth-userdb {
    group = mailstore
    mode = 0660
    user = root
  }
}
service imap-login {
  inet_listener imap {
    port = 143
  }
  process_limit = 256
  process_min_avail = 50
  service_count = 1
}
service imap {
  process_limit = 2048
  process_min_avail = 50
  service_count = 1
  vsz_limit = 512 M
}
service lmtp {
  inet_listener lmtp {
    address = *
    port = 24
  }
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0666
    user = postfix
  }
}
service pop3-login {
  inet_listener pop3 {
    port = 110
  }
  process_limit = 256
  process_min_avail = 25
  service_count = 1
}
service pop3 {
  process_limit = 256
  process_min_avail = 25
  service_count = 1
}
service quota-warning {
  executable = script /usr/local/rol/dovecot/quota-warning.sh
  unix_listener quota-warning {
    user = mailstore
  }
  user = mailstore
}
ssl = no
ssl_cert = </etc/dovecot/ssl/dovecot.pem
ssl_key = </etc/dovecot/ssl/dovecot.key
userdb {
  args = /etc/dovecot/dovecot-sql-account.conf
  driver = sql
}
protocol lmtp {
  mail_fsync = optimized
  mail_plugins = " quota mail_log notify zlib sieve zlib"
}
protocol imap {
  imap_client_workarounds = tb-extra-mailbox-sep
  imap_id_log = *
  imap_logout_format = bytes=%i/%o session=<%{session}>
  mail_max_userip_connections = 40
  mail_plugins = " quota mail_log notify zlib imap_quota imap_zlib"
}
protocol pop3 {
  mail_plugins = " quota mail_log notify zlib"
  pop3_logout_format = bytes_sent=%o top=%t/%p, retr=%r/%b, del=%d/%m, size=%s uidl_hash=%u session=<%{session}>
}

....


More information about the dovecot mailing list