Package: dovecot-imapd
Version: 1:2.2.21-1
Severity: important
Dear Maintainer,
I am seeing a reproducible crash upon selection of one of my virtual folders.
Only one of these virtual folders leads to a crash.
The core dump occurs on my kirkwood box, I am not able to obtain a crash on an
x86_64 VPS with a similar setup.
This setup was working flawlessly before upgrading from 1:2.2.18-2+b1 to
1:2.2.21-1.
This is what appears in syslog:
Mar 19 09:18:20 donkeykong dovecot: imap(sleveque): Fatal: master:
service(imap): child 15037 killed with signal 11 (core dumped)
Mar 19 09:18:21 donkeykong dovecot: imap(sleveque): Fatal: master:
service(imap): child 15040 killed with signal 11 (core dumped)
Mar 19 09:18:22 donkeykong dovecot: imap(sleveque): Fatal: master:
service(imap): child 15042 killed with signal 11 (core dumped)
Mar 19 09:18:22 donkeykong dovecot: imap(sleveque): Fatal: master:
service(imap): child 15044 killed with signal 11 (core dumped)
Mar 19 09:24:55 donkeykong dovecot: imap(sleveque): Fatal: master:
service(imap): child 15242 killed with signal 11 (core dumped)
Mar 19 09:25:14 donkeykong dovecot: imap(sleveque): Fatal: master:
service(imap): child 15257 killed with signal 11 (core dumped)
Mar 19 09:25:31 donkeykong dovecot: imap(sleveque): Fatal: master:
service(imap): child 15276 killed with signal 11 (core dumped)
Mar 19 09:25:38 donkeykong dovecot: imap(sleveque): Fatal: master:
service(imap): child 15288 killed with signal 11 (core dumped)
Mar 19 09:25:41 donkeykong dovecot: imap(sleveque): Fatal: master:
service(imap): child 15292 killed with signal 11 (core dumped)
Here is the content of the imapfilter script I run to test dovecot.
$ cat test_dovecot_crash.lua
options.certificates = false
localhost = IMAP {
server = 'localhost',
username = 'sleveque',
password = 'password',
ssl = 'tls1'
}
mails = localhost['Tous les messages']:is_newer(1)
mails = localhost['Raccourcis/Feeds récents']:is_newer(1)
-- Crash on next select
mails = localhost['Raccourcis/Messages récents']:is_newer(1)
Here is the output until a Ctrl+C when it starts reissuing the request several
times.
$ imapfilter -v -c test_dovecot_crash.lua
S (4): * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
IDLE AUTH=PLAIN] Dovecot ready.
C (4): 1000 CAPABILITY
S (4): 1000 OK Pre-login capabilities listed, post-login capabilities have more.
C (4): 1001 LOGIN "sleveque" *
S (4): 1001 OK Logged in
C (4): 1002 CAPABILITY
S (4): 1002 OK Capability completed.
C (4): 1003 NAMESPACE
S (4): 1003 OK Namespace completed.
C (4): 1004 SELECT "Tous les messages"
S (4): 1004 OK [READ-WRITE] Select completed (0.000 + 0.000 secs).
C (4): 1005 UID SEARCH ALL SINCE 18-Mar-2016
S (4): 1005 OK Search completed (5.658 + 0.001 secs).
C (4): 1006 SELECT "Raccourcis/Feeds r&AOk-cents"
S (4): 1006 OK [READ-WRITE] Select completed (0.000 + 0.000 secs).
C (4): 1007 UID SEARCH ALL SINCE 18-Mar-2016
S (4): 1007 OK Search completed (0.295 + 0.000 secs).
C (4): 1008 SELECT "Raccourcis/Messages r&AOk-cents"
imapfilter: reading data through SSL; the connection has been closed cleanly
S (5): * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
IDLE AUTH=PLAIN] Dovecot ready.
C (5): 1009 CAPABILITY
S (5): 1009 OK Pre-login capabilities listed, post-login capabilities have more.
C (5): 100A LOGIN "sleveque" *
S (5): 100A OK Logged in
C (5): 100B CAPABILITY
S (5): 100B OK Capability completed.
C (5): 100C NAMESPACE
S (5): 100C OK Namespace completed.
C (5): 100D SELECT "Raccourcis/Feeds r&AOk-cents"
S (5): 100D OK [READ-WRITE] Select completed (0.000 + 0.000 secs).
C (5): 100E SELECT "Raccourcis/Messages r&AOk-cents"
imapfilter: reading data through SSL; the connection has been closed cleanly
S (6): * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
IDLE AUTH=PLAIN] Dovecot ready.
C (6): 100F CAPABILITY
S (6): 100F OK Pre-login capabilities listed, post-login capabilities have more.
C (6): 1010 LOGIN "sleveque" *
S (6): 1010 OK Logged in
C (6): 1011 CAPABILITY
S (6): 1011 OK Capability completed.
C (6): 1012 NAMESPACE
S (6): 1012 OK Namespace completed.
C (6): 1013 SELECT "Raccourcis/Feeds r&AOk-cents"
S (6): 1013 OK [READ-WRITE] Select completed (0.000 + 0.000 secs).
C (6): 1014 SELECT "Raccourcis/Messages r&AOk-cents"
imapfilter: reading data through SSL; the connection has been closed cleanly
S (7): * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
IDLE AUTH=PLAIN] Dovecot ready.
C (7): 1015 CAPABILITY
S (7): 1015 OK Pre-login capabilities listed, post-login capabilities have more.
C (7): 1016 LOGIN "sleveque" *
S (7): 1016 OK Logged in
C (7): 1017 CAPABILITY
S (7): 1017 OK Capability completed.
C (7): 1018 NAMESPACE
S (7): 1018 OK Namespace completed.
C (7): 1019 SELECT "Raccourcis/Feeds r&AOk-cents"
S (7): 1019 OK [READ-WRITE] Select completed (0.000 + 0.000 secs).
C (7): 101A SELECT "Raccourcis/Messages r&AOk-cents"
^Cimapfilter: killed by signal 2
The syslog line appears when the imapfilter log shows the "connection has been
closed cleanly" message.
dovecot dumps a core, here is the backtrace:
$ gdb /usr/lib/dovecot/imap core.imap
GNU gdb (Debian 7.10-1+b1) 7.10
Copyright (C) 2015 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 "arm-linux-gnueabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/lib/dovecot/imap...Reading symbols from
/usr/lib/debug/.build-id/0f/3e1dc57c3acbce46de4375d8272ea0ac71bb99.debug...done.
done.
[New LWP 15044]
Core was generated by `dovecot/imap'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 mail_search_args_equal (args1=0x0, args2=0x0) at mail-search.c:674
674 mail-search.c: No such file or directory.
(gdb) bt
#0 mail_search_args_equal (args1=0x0, args2=0x0) at mail-search.c:674
#1 0xb6e45440 in mail_search_args_have_equal (wanted_arg=<optimized out>,
args=<optimized out>) at mail-search-args-simplify.c:274
#2 mail_search_args_simplify_extract_common (argsp=argsp@entry=0x7fd11000,
pool=0x7fd10fd0, pool@entry=0xb6e45710 <mail_search_simplify_prev_arg_cmp>,
and_arg=and_arg@entry=160) at mail-search-args-simplify.c:428
#3 0xb6e4591c in mail_search_args_simplify_sub (box=0x7fd10fd0,
pool=0xb6e45710 <mail_search_simplify_prev_arg_cmp>,
argsp=argsp@entry=0x7fd10ff0,
parent_and=parent_and@entry=true) at mail-search-args-simplify.c:522
#4 0xb6e45f00 in mail_search_args_simplify (args=0x7fd10fe0) at
mail-search-args-simplify.c:672
#5 0xb6e43598 in mail_search_args_init (args=0x7fd10fe0, box=<optimized out>,
change_uidsets=<optimized out>, search_saved_uidset=0x7fd0d268) at
mail-search.c:140
#6 0xb6baf5e0 in virtual_sync_backend_box_continue (bbox=0x7fd0d268,
ctx=<optimized out>) at virtual-sync.c:734
#7 virtual_sync_backend_box (bbox=0x7fd0d268, ctx=0x7fd2f668) at
virtual-sync.c:1173
#8 virtual_sync_backend_boxes (ctx=0x7fd2f668) at virtual-sync.c:1566
#9 virtual_sync (flags=(MAILBOX_SYNC_FLAG_FULL_READ |
MAILBOX_SYNC_FLAG_FULL_WRITE | MAILBOX_SYNC_FLAG_FAST), mbox=<optimized out>)
at virtual-sync.c:1677
#10 virtual_storage_sync_init (box=<optimized out>,
flags=(MAILBOX_SYNC_FLAG_FULL_READ | MAILBOX_SYNC_FLAG_FULL_WRITE |
MAILBOX_SYNC_FLAG_FAST)) at virtual-sync.c:1697
#11 0xb6e4a8e0 in mailbox_sync_init (box=0x7fd0cdd8,
flags=(MAILBOX_SYNC_FLAG_FULL_READ | MAILBOX_SYNC_FLAG_FIX_INCONSISTENT)) at
mail-storage.c:1657
#12 0xb6e4aa78 in mailbox_sync (box=0x7fd0cdd8,
flags=(MAILBOX_SYNC_FLAG_FULL_READ | MAILBOX_SYNC_FLAG_FIX_INCONSISTENT),
flags@entry=MAILBOX_SYNC_FLAG_FULL_READ)
at mail-storage.c:1705
#13 0x7f594104 in select_open (readonly=false, mailbox=<optimized out>,
ctx=0x7fd0a298) at cmd-select.c:303
#14 cmd_select_full (cmd=<optimized out>, readonly=<optimized out>) at
cmd-select.c:426
#15 0x7f59b4c4 in command_exec (cmd=cmd@entry=0x7fd0a1c0) at imap-commands.c:169
#16 0x7f599554 in client_command_input (cmd=0xb6f58ce8 <__stack_chk_guard>,
cmd@entry=0x7fd0a1c0) at imap-client.c:947
#17 0x7f5995f0 in client_command_input (cmd=0x7f5990a8
<client_command_alloc+56>) at imap-client.c:1007
#18 0x7f5999e4 in client_handle_next_command (remove_io_r=<synthetic pointer>,
client=0x7fd09760) at imap-client.c:1045
#19 client_handle_input (client=0x7fd09760) at imap-client.c:1057
#20 0x7f59a004 in client_input (client=0x7fd09760) at imap-client.c:1104
#21 0xb6dc1310 in io_loop_call_io (io=0x7fd0a138) at ioloop.c:559
#22 0xb6dc2b04 in io_loop_handler_run_internal (ioloop=ioloop@entry=0x7fcf14c0)
at ioloop-epoll.c:220
#23 0xb6dc13d0 in io_loop_handler_run (ioloop=ioloop@entry=0x7fcf14c0) at
ioloop.c:607
#24 0xb6dc160c in io_loop_run (ioloop=0x7fcf14c0) at ioloop.c:583
#25 0xb6d52e2c in master_service_run (service=0x7fcf13f0, callback=<optimized
out>) at master-service.c:640
#26 0x7f58c5fc in main (argc=-1225501504, argv=0xb6f58ce8 <__stack_chk_guard>)
at main.c:442
(gdb)
At the filesystem level:
~/.Mail/virtual$ ls -la
total 40
drwxr-xr-x 8 sleveque sleveque 4096 mars 4 2013 .
drwx------ 19 sleveque sleveque 4096 mars 16 17:26 ..
drwxr-xr-x 2 sleveque sleveque 4096 mars 13 09:43 Doublons
-rw-r--r-- 1 sleveque sleveque 360 mars 4 2013 dovecot.mailbox.log
drwx------ 2 sleveque sleveque 4096 mars 18 18:43 Feeds non lus
drwx------ 2 sleveque sleveque 4096 mars 19 03:12 Feeds r&AOk-cents
drwxr-xr-x 2 sleveque sleveque 4096 mars 19 06:40 Messages flagg&AOk-s
drwx------ 2 sleveque sleveque 4096 mars 19 09:25 Messages non lus
drwx------ 2 sleveque sleveque 4096 mars 13 22:50 Messages r&AOk-cents
-rw-r--r-- 1 sleveque sleveque 100 mars 4 2013 .virtual-subscriptions
In case you are not familiar with it, accentuated letters are UTF7 encoded, the
"&AOk-" represents "é" and is expected.
doveconf -n below is amended to show relevant parts.
Thank you
--
Sylvain
-- Package-specific info:
dovecot configuration
---------------------
# 2.2.21 (5345f22): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.12 (c1c0a23)
# OS: Linux 4.3.0-1-kirkwood armv5tel Debian stretch/sid
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:~/.Mail
mail_plugins = virtual
mail_privileged_group = mail
namespace {
location = virtual:~/.Mail/virtual
prefix = Raccourcis/
separator = /
type = private
name =
}
namespace {
inbox = yes
location =
mailbox {
special_use = \Drafts
name = Drafts
}
mailbox {
special_use = \Junk
name = Junk
}
mailbox {
special_use = \Sent
name = Sent
}
mailbox {
special_use = \Sent
name = Sent Messages
}
mailbox {
special_use = \All
name = Tous les messages
}
mailbox {
special_use = \Trash
name = Trash
}
prefix =
separator = /
name = inbox
}
passdb {
driver = pam
}
plugin {
sieve = ~/.Mail/sieve/dovecot.sieve
sieve_dir = ~/.Mail/sieve/scripts
}
protocols = imap
service replication-notify-fifo {
name = aggregator
}
service imap-hibernate {
name = imap-hibernate
}
service {
inet_listener {
address = 127.0.0.1
port = 143
name = imap
}
inet_listener {
address = 0.0.0.0
port = 993
name = imaps
}
name = imap-login
}
service imap-urlauth {
name = imap-urlauth-login
}
service imap-urlauth-worker {
name = imap-urlauth-worker
}
service token-login/imap-urlauth {
name = imap-urlauth
}
service imap-master {
name = imap
}
protocol imap {
mail_max_userip_connections = 30
mail_plugins = virtual
service replication-notify-fifo {
name = aggregator
}
service anvil-auth-penalty {
name = anvil
}
service auth-worker {
name = auth-worker
}
service auth-client {
name = auth
}
service config {
name = config
}
service dict-async {
name = dict-async
}
service dict {
name = dict
}
service login/proxy-notify {
name = director
}
service dns-client {
name = dns_client
}
service doveadm-server {
name = doveadm
}
service imap-hibernate {
name = imap-hibernate
}
service imap {
name = imap-login
}
service imap-urlauth {
name = imap-urlauth-login
}
service imap-urlauth-worker {
name = imap-urlauth-worker
}
service token-login/imap-urlauth {
name = imap-urlauth
}
service imap-master {
name = imap
}
service indexer-worker {
name = indexer-worker
}
service indexer {
name = indexer
}
service ipc {
name = ipc
}
service lmtp {
name = lmtp
}
service log-errors {
name = log
}
service pop3 {
name = pop3-login
}
service login/pop3 {
name = pop3
}
service replicator-doveadm {
name = replicator
}
service login/ssl-params {
name = ssl-params
}
service stats-mail {
name = stats
}
}
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (990, 'testing'), (50, 'unstable'), (40, 'experimental')
Architecture: armel (armv5tel)
Kernel: Linux 4.3.0-1-kirkwood
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages dovecot-imapd depends on:
ii dovecot-core 1:2.2.21-1
ii libbz2-1.0 1.0.6-8
ii libc6 2.22-3
ii liblz4-1 0.0~r131-2
ii liblzma5 5.1.1alpha+20120614-2.1
ii ucf 3.0035
ii zlib1g 1:1.2.8.dfsg-2+b1
dovecot-imapd recommends no packages.
dovecot-imapd suggests no packages.
Versions of packages dovecot-imapd is related to:
ii dovecot-core [dovecot-common] 1:2.2.21-1
ii dovecot-dbg 1:2.2.21-1
pn dovecot-dev <none>
pn dovecot-gssapi <none>
ii dovecot-imapd 1:2.2.21-1
pn dovecot-ldap <none>
pn dovecot-lmtpd <none>
pn dovecot-managesieved <none>
pn dovecot-mysql <none>
pn dovecot-pgsql <none>
pn dovecot-pop3d <none>
ii dovecot-sieve 1:2.2.21-1
pn dovecot-sqlite <none>
-- no debconf information