Imap process crashes when search in virtual mailbox
Hi,
When searching in a virtual mailbox imap process crashes if the virtual mailbox has a lot of physical mailboxes behind (more than 80 - 100 mailboxes).
Dovecot 2.2.18 build from sources ./configure --prefix=/opt/dovecot2 --with-mysql --with-sqlite --with-solr --with-ssl --disable-rpath --disable-static. Debian Wheezy 3.2.63-2 x86_64. Filesystem is ZFS.
docecot -n : # 2.2.18: /services/dovecot1/etc/dovecot.conf # OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.7 auth_master_user_separator = * auth_mechanisms = plain login base_dir = /services/dovecot1/var/run default_client_limit = 10240 default_login_user = dovecot dict { quotadict = mysql:/services/dovecot1/etc/quota.conf } disable_plaintext_auth = no log_path = login_log_format_elements = user=%u session=%{session} mpid=%e rip=%r rrip=%{real_rip} mail_location = mdbox:~/mails mail_log_prefix = "store107: %s(%u): %{session}: " mail_max_userip_connections = 0 mail_plugins = quota virtual fts fts_solr notify mail_log mailbox_list_index = yes mdbox_rotate_size = 256 k mmap_disable = yes namespace inbox { inbox = yes location = mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox Junk { auto = subscribe special_use = \Junk } mailbox Sent { auto = subscribe special_use = \Sent } mailbox Trash { auto = subscribe special_use = \Trash } prefix = separator = / } namespace virtual { hidden = yes list = no location = virtual:/services/dovecot1/etc/virtual:INDEX=~/mails/virtual mailbox all { auto = create special_use = \All } mailbox unseen { auto = create } prefix = virtual/ separator = / } passdb { args = /services/dovecot1/etc/passwd.masterusers driver = passwd-file master = yes pass = yes } passdb { args = /services/dovecot1/etc/mysql.conf driver = sql } plugin { fts = solr fts_solr = break-imap-search url=http://10.78.18.127:8080/solr/ mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename flag_change save mailbox_create mail_log_fields = uid box msgid flags quota = dict:user::proxy::quotadict quota_rule = *:storage=1GB quota_rule2 = Trash:storage=+152M quota_rule3 = Trash:messages=+5 } protocols = imap service auth { unix_listener auth-client { mode = 0666 } unix_listener auth-master { group = nogroup mode = 0660 } } service dict { process_limit = 400 unix_listener dict { mode = 0600 user = nobody } } service imap-login { chroot = login client_limit = 2048 inet_listener imap { address = 10.78.18.127 port = 143 } process_limit = 1024 service_count = 0 } service imap { process_limit = 10240 vsz_limit = 320 M } service indexer-worker { process_limit = 4 process_min_avail = 2 service_count = 1 vsz_limit = 1 G } shutdown_clients = no ssl = no syslog_facility = local3 userdb { args = /services/dovecot1/etc/mysql.conf driver = sql } protocol imap { mail_plugins = quota virtual fts fts_solr notify mail_log imap_quota } protocol lda { auth_socket_path = /services/dovecot1/var/run/auth-master mail_plugins = quota virtual fts fts_solr notify mail_log sieve event_broker submission_host = osmtp:8090 }
/services/dovecot1/etc/virtual/all/dovecot-virtual : * -Trash -Junk all
Error log: 2015-06-16T12:49:25.502864+02:00 sr-be-store07 dovecot: store107: imap( mihaiush@sunrise.ch): hCdxU6AY/wAKThJr: Panic: file mail-index-map.c: line 547 (mail_index_map_lookup_seq_range): assertion failed: (first_uid > 0) 2015-06-16T12:49:25.503429+02:00 sr-be-store07 dovecot: store107: imap( mihaiush@sunrise.ch): hCdxU6AY/wAKThJr: Error: Raw backtrace: /opt/dovecot2/lib/dovecot/libdovecot.so.0(+0x7c13f) [0x7fe2e433713f] -> /opt/dovecot2/lib/dovecot/libdovecot.so.0(+0x7c19e) [0x7fe2e433719e] -> /opt/dovecot2/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7fe2e42e5555] -> /opt/dovecot2/lib/dovecot/libdovecot-storage.so.0(+0xc4d32) [0x7fe2e466fd32] -> /opt/dovecot2/lib/dovecot/libdovecot-storage.so.0(mail_index_lookup_seq_range+0xa) [0x7fe2e46817fa] -> /opt/dovecot2/lib/dovecot/lib20_fts_plugin.so(+0xd0b1) [0x7fe2e30c40b1] -> /opt/dovecot2/lib/dovecot/lib20_fts_plugin.so(+0xd963) [0x7fe2e30c4963] -> /opt/dovecot2/lib/dovecot/lib20_fts_plugin.so(fts_search_lookup+0xa6) [0x7fe2e30c4c36] -> /opt/dovecot2/lib/dovecot/lib20_fts_plugin.so(+0xfdef) [0x7fe2e30c6def] -> dovecot/imap(imap_search_start+0x70) [0x41dec0] -> dovecot/imap(cmd_sort+0x205) [0x414565] -> dovecot/imap(command_exec+0x4c) [0x418aec] -> dovecot/imap() [0x417ad0] -> dovecot/imap() [0x417b64] -> dovecot/imap(client_handle_input+0x115) [0x417e45] -> dovecot/imap(client_input+0x72) [0x418212] -> /opt/dovecot2/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x5b) [0x7fe2e43494fb] -> /opt/dovecot2/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0xbb) [0x7fe2e434a54b] -> /opt/dovecot2/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0x9) [0x7fe2e4349589] -> /opt/dovecot2/lib/dovecot/libdovecot.so.0(io_loop_run+0x38) [0x7fe2e4349608] -> /opt/dovecot2/lib/dovecot/libdovecot.so.0(master_service_run+0x13) [0x7fe2e42eabc3] -> dovecot/imap(main+0x27b) [0x40c60b] -> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7fe2e3f4eead] -> dovecot/imap() [0x40c769] 2015-06-16T12:49:25.552150+02:00 sr-be-store07 dovecot: store107: imap( mihaiush@sunrise.ch): hCdxU6AY/wAKThJr: Fatal: master: service(imap): child 3923 killed with signal 6 (core dumped)
IMAP session: # telnet store107 143 Escape character is '^]'.
- OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready. x login mihaiush@sunrise.ch XXX x OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SEARCH=FUZZY NOTIFY SPECIAL-USE QUOTA] Logged in x select virtual/all
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft $Label3 $Label2 $Label5 $Label1 $Label4 parsed attachment)
- OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft $Label3 $Label2 $Label5 $Label1 $Label4 parsed attachment \*)] Flags permitted.
- 1963 EXISTS
- 1256 RECENT
- OK [UNSEEN 2] First unseen.
- OK [UIDVALIDITY 1434024437] UIDs valid
- OK [UIDNEXT 2677] Predicted next UID
- OK [HIGHESTMODSEQ 76] Highest x OK [READ-WRITE] Select completed (0.087 secs). x sort (reverse arrival) utf-8 text vpopmail Connection closed by foreign host.
GDB: # gdb /opt/dovecot2/libexec/dovecot/imap /services/dovecot1/var/data/ sunrise.ch/m/mihaiush/core GNU gdb (GDB) 7.4.1-debian Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /opt/dovecot2/libexec/dovecot/imap...done. [New LWP 3923]
warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `dovecot/imap'.
Program terminated with signal 6, Aborted.
#0 0x00007fe2e3f62165 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb)
(gdb) bt full
#0 0x00007fe2e3f62165 in raise () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1 0x00007fe2e3f653e0 in abort () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#2 0x00007fe2e4337135 in default_fatal_finish (type=<optimized out>,
status=status@entry=0) at failures.c:202
backtrace = 0x2166c38
"/opt/dovecot2/lib/dovecot/libdovecot.so.0(+0x7c13f) [0x7fe2e433713f] ->
/opt/dovecot2/lib/dovecot/libdovecot.so.0(+0x7c19e) [0x7fe2e433719e] ->
/opt/dovecot2/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x"...
#3 0x00007fe2e433719e in i_internal_fatal_handler (ctx=0x7fffa5660ea0,
format=<optimized out>, args=<optimized out>) at failures.c:671
status = 0
#4 0x00007fe2e42e5555 in i_panic (format=format@entry=0x7fe2e468d068 "file
%s: line %d (%s): assertion failed: (%s)") at failures.c:276
ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0,
timestamp_usecs = 0}
args = {{gp_offset = 40, fp_offset = 48, overflow_arg_area =
0x7fffa5660f90, reg_save_area = 0x7fffa5660ed0}}
#5 0x00007fe2e466fd32 in mail_index_map_lookup_seq_range (map=<optimized
out>, first_uid=0, last_uid=<optimized out>, first_seq_r=<optimized out>,
last_seq_r=<optimized out>) at mail-index-map.c:547
__FUNCTION__ = "mail_index_map_lookup_seq_range"
#6 0x00007fe2e46817fa in mail_index_lookup_seq_range (view=<optimized
out>, first_uid=<optimized out>, last_uid=<optimized out>,
first_seq_r=first_seq_r@entry=0x7fffa5660fe8, last_seq_r=last_seq_r@entry
=0x7fffa5660fec)
at mail-index-view.c:513
No locals.
#7 0x00007fe2e45f819c in mailbox_get_seq_range (box=<optimized out>,
uid1=<optimized out>, uid2=<optimized out>, seq1_r=seq1_r@entry=0x7fffa5660fe8,
seq2_r=seq2_r@entry=0x7fffa5660fec) at mailbox-get.c:11
No locals.
#8 0x00007fe2e30c40b1 in uid_range_to_seqs
(uid_range=uid_range@entry=0x7fffa56610b0,
seq_range=seq_range@entry=0x25e4840, fctx=
If necessary I can provide the mailbox, it has 7MB.
On 16 Jun 2015, at 15:17, mihaiush mihaiush@gmail.com wrote:
Hi,
When searching in a virtual mailbox imap process crashes if the virtual mailbox has a lot of physical mailboxes behind (more than 80 - 100 mailboxes).
2015-06-16T12:49:25.502864+02:00 sr-be-store07 dovecot: store107: imap( mihaiush@sunrise.ch): hCdxU6AY/wAKThJr: Panic: file mail-index-map.c: line 547 (mail_index_map_lookup_seq_range): assertion failed: (first_uid > 0)
participants (2)
-
mihaiush
-
Timo Sirainen