[Dovecot] Segfault when deselecting virtual folder 2.2.13+ HG TIP
Hello,
I'm seeing a segfault in the imap process with the current mercurial tip (including changeset 17382 e99cd21e1f92) when selecting a particular virtual mail folder (but no other virtual mailboxes) and then selecting a different mail folder as in the IMAP transcript below. The same segfaults are triggered with IMAP clients. The situation is worse with the 2.2.13 which segfaults when any virtual mailbox is deselected so the recent patch helps partially.
Configuration summary, IMAP session in gbd including backtrace and virtual mailbox spec follow.
Any ideas what's causing this?
Thank you Colin
======= GDB SESSION INCLUDING BACKTRACE
colin@xxxx [ ~ ]$ MAIL=maildir:/var/mail/colin gdb /usr/local/libexec/dovecot/imap GNU gdb (GDB) 7.6.1 Copyright (C) 2013 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-unknown-linux-gnu". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /usr/local/libexec/dovecot/imap...done. (gdb) r Starting program: /usr/local/libexec/dovecot/imap warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? process 21455 is executing new program: /usr/local/bin/doveconf warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? process 21455 is executing new program: /usr/local/libexec/dovecot/imap warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"?
- PREAUTH [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 SPECIAL-USE BINARY MOVE SEARCH=FUZZY NOTIFY METADATA] Logged in as colin a SELECT PERSONAL.Home
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
- OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted.
- 23 EXISTS
- 0 RECENT
- OK [UIDVALIDITY 1261140830] UIDs valid
- OK [UIDNEXT 24] Predicted next UID
- OK [HIGHESTMODSEQ 1] Highest a OK [READ-WRITE] Select completed (0.001 secs). a SELECT virtual.Conversations
- OK [CLOSED] Previous mailbox closed.
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
- OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted.
- 5 EXISTS
- 0 RECENT
- OK [UNSEEN 3] First unseen.
- OK [UIDVALIDITY 1400091139] UIDs valid
- OK [UIDNEXT 18] Predicted next UID a OK [READ-WRITE] Select completed (0.017 secs). a SELECT PERSONAL.Home
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff75f1c6c in mail_search_args_deinit_sub.30037.5970 () from
/usr/local/lib/dovecot/libdovecot-storage.so.0
(gdb) bt full
#0 0x00007ffff75f1c6c in mail_search_args_deinit_sub.30037.5970 () from
/usr/local/lib/dovecot/libdovecot-storage.so.0
No symbol table info available.
#1 0x00007ffff75f1d41 in mail_search_args_deinit () from
/usr/local/lib/dovecot/libdovecot-storage.so.0
No symbol table info available.
#2 0x00007ffff6ca3adb in virtual_mailbox_close_internal.9208 () from
/usr/local/lib/dovecot/lib20_virtual_plugin.so
No symbol table info available.
#3 0x00007ffff6ca3b39 in virtual_mailbox_close.9256 () from
/usr/local/lib/dovecot/lib20_virtual_plugin.so
No symbol table info available.
#4 0x00007ffff761daac in mailbox_close () from
/usr/local/lib/dovecot/libdovecot-storage.so.0
No symbol table info available.
#5 0x00007ffff75ff283 in mailbox_free () from
/usr/local/lib/dovecot/libdovecot-storage.so.0
No symbol table info available.
#6 0x0000000000410a2e in close_selected_mailbox.part.1
(client=client@entry=0x6577c0) at cmd-select.c:383
box = 0x0
#7 0x0000000000410b59 in close_selected_mailbox (client=0x6577c0) at
cmd-select.c:376
client = 0x6577c0
#8 cmd_select_full (cmd=0x6583e0, readonly=<optimized out>) at
cmd-select.c:427
client = 0x6577c0
ctx = 0x6584e0
args = 0x65ccd8
list_args = 0x632038
mailbox = 0x6322a8 "PERSONAL.Home"
error = 0x648748 ""
__FUNCTION__ = "cmd_select_full"
__FUNCTION__ = "cmd_select_full"
#9 0x00000000004129ac in command_exec (cmd=0x6583e0) at
imap-commands.c:158
hook = 0x63b5c0
ret = <optimized out>
#10 0x00000000004178ef in client_command_input (cmd=0x6583e0) at
imap-client.c:778
client = 0x6577c0
command = <optimized out>
__FUNCTION__ = "client_command_input"
__FUNCTION__ = "client_command_input"
#11 0x00000000004179a5 in client_command_input (cmd=0x6583e0) at
imap-client.c:839
client = 0x6577c0
command = <optimized out>
__FUNCTION__ = "client_command_input"
__FUNCTION__ = "client_command_input"
#12 0x0000000000417c65 in client_handle_next_command
(remove_io_r=<synthetic pointer>, client=0x6577c0) at imap-client.c:877
No locals.
#13 client_handle_input (client=client@entry=0x6577c0) at
imap-client.c:889
_data_stack_cur_id = 3
remove_io = false
handled_commands = false
__FUNCTION__ = "client_handle_input"
__FUNCTION__ = "client_handle_input"
#14 0x0000000000417e8f in client_input (client=0x6577c0) at
imap-client.c:931
cmd = 0x7ffff732abce
===================== DOVECONF -n
colin@xxxx [ /var/mail/colin/virtual ]$ doveconf -n # 2.2.13: /etc/dovecot/dovecot.conf # OS: Linux 3.14.4 x86_64 Linux From Scratch ext4 auth_socket_path = /var/run/dovecot/auth-userdb auth_username_format = %Ln first_valid_gid = 1000 first_valid_uid = 1000 hostname = mail.theknoxes.co.uk imap_metadata = yes last_valid_gid = 1100 last_valid_uid = 1100 listen = * login_trusted_networks = 127.0.0.1 mail_attribute_dict = file:/var/mail/%n/shared_metadata mail_location = maildir:/var/mail/%n mail_plugins = " fts fts_solr virtual" mail_temp_dir = /tmp/mail mailbox_list_index = yes 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 namespace { location = virtual:/var/mail/%n/virtual prefix = virtual. separator = . subscriptions = no } namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox "Junk E-mail" { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } mailbox virtual/All { special_use = \All } prefix = separator = . } passdb { driver = pam } plugin { fts = solr fts_autoindex = yes fts_decoder = decode2text fts_solr = url=http://localhost:8080/solr/dovecot/ break-imap-search sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } protocols = imap lmtp sieve sendmail_path = /usr/local/sbin/sendmail service auth { unix_listener auth-client { group = exim mode = 0660 } } service decode2text { executable = script /usr/local/libexec/dovecot/decode2text.sh unix_listener decode2text { mode = 0666 } user = dovecot } service imap-login { inet_listener imap { port = 143 } inet_listener imaps { port = 0 } } service lmtp { unix_listener lmtp { mode = 0666 } } service managesieve-login { inet_listener sieve { port = 4190 } } service managesieve { process_limit = 1024 } ssl = required ssl_cert =
=========================== VIRTUAL MAILBOX SPEC
colin@xxxx [ /var/mail/colin/virtual ]$ cat Conversations/dovecot-virtual virtual.All inthread refs x-mailbox Inbox
On 16.5.2014, at 16.33, Colin Knox colin@theknoxes.co.uk wrote:
I'm seeing a segfault in the imap process with the current mercurial tip (including changeset 17382 e99cd21e1f92) when selecting a particular virtual mail folder (but no other virtual mailboxes) and then selecting a different mail folder as in the IMAP transcript below. The same segfaults are triggered with IMAP clients. The situation is worse with the 2.2.13 which segfaults when any virtual mailbox is deselected so the recent patch helps partially.
http://hg.dovecot.org/dovecot-2.2/rev/5c6f49e2d8d9 should fix this.
On 26/05/2014 02:26, Timo Sirainen wrote:
On 16.5.2014, at 16.33, Colin Knox colin@theknoxes.co.uk wrote:
I'm seeing a segfault in the imap process with the current mercurial tip (including changeset 17382 e99cd21e1f92) when selecting a particular virtual mail folder (but no other virtual mailboxes) and then selecting a different mail folder as in the IMAP transcript below. The same segfaults are triggered with IMAP clients. The situation is worse with the 2.2.13 which segfaults when any virtual mailbox is deselected so the recent patch helps partially.
http://hg.dovecot.org/dovecot-2.2/rev/5c6f49e2d8d9 should fix this.
Fixed. Thank you.
participants (2)
-
Colin Knox
-
Timo Sirainen