[Dovecot] core dump in mail_cache_header_fields_read()
We're seeing a core dump for a user connecting from IPHONE. The user mail are in NFS mount.
# dovecot --version 2.2.12
# doveconf -n
# 2.2.12: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.4
auth_cache_negative_ttl = 0
auth_cache_size = 20 M
auth_verbose = yes
default_client_limit = 4000
default_process_limit = 1000
default_vsz_limit = 2 G
director_mail_servers = # gdb /usr/lib/dovecot/imap ./5040
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 /usr/lib/dovecot/imap...Reading symbols from
/usr/lib/debug/usr/lib/dovecot/imap...done.
done.
[New LWP 5040] 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 imap-postlogin'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007fca22f0ca85 in mail_cache_header_fields_read
(cache=cache@entry=0x7fca24a04f70) at mail-cache-fields.c:369
369 for (p = names; p != end && *p != '\0'; p++) ;
(gdb) bt full
#0 0x00007fca22f0ca85 in mail_cache_header_fields_read
(cache=cache@entry=0x7fca24a04f70) at mail-cache-fields.c:369
field_hdr = 0x7fca21d37010
field = {name = 0x0, idx = 0, type =
MAIL_CACHE_FIELD_FIXED_SIZE, field_size = 0, decision =
MAIL_CACHE_DECISION_NO,
last_used = 0}
last_used = 0x7fca21d3701c
sizes = 0x7fca79d3701c
types = 0x7fcad1d3701c
On 23.4.2014, at 21.43, Wesley Huang huang@utsc.utoronto.ca wrote:
We're seeing a core dump for a user connecting from IPHONE. The user mail are in NFS mount.
Program terminated with signal 11, Segmentation fault. #0 0x00007fca22f0ca85 in mail_cache_header_fields_read (cache=cache@entry=0x7fca24a04f70) at mail-cache-fields.c:369 369 for (p = names; p != end && *p != '\0'; p++) ;
Looks like a corrupted dovecot.index.cache file. This should replace the crash with just an error message and cache recreation:
Hi Timo,
Thanks. Let me port in the bug fix and test it. FYI, previously when the problem occurred, I deleted the dovecot index and let dovecot regenerate the index, but it didn't help.
Cheers,
Wesley
On 14-05-02 05:13 AM, Timo Sirainen wrote:
On 23.4.2014, at 21.43, Wesley Huang huang@utsc.utoronto.ca wrote:
We're seeing a core dump for a user connecting from IPHONE. The user mail are in NFS mount.
Program terminated with signal 11, Segmentation fault. #0 0x00007fca22f0ca85 in mail_cache_header_fields_read (cache=cache@entry=0x7fca24a04f70) at mail-cache-fields.c:369 369 for (p = names; p != end && *p != '\0'; p++) ; Looks like a corrupted dovecot.index.cache file. This should replace the crash with just an error message and cache recreation:
Hi Timo,
The patch works. With the error log we identified a corrupted cache file for the Trash folder (not the cache file for the inbox we previously suspected). After having this cache removed, we don't see the error any more.
Thanks again!
Cheers,
Wesley
On 14-05-02 12:03 PM, Wesley Huang wrote:
Hi Timo,
Thanks. Let me port in the bug fix and test it. FYI, previously when the problem occurred, I deleted the dovecot index and let dovecot regenerate the index, but it didn't help.
Cheers,
Wesley
On 14-05-02 05:13 AM, Timo Sirainen wrote:
On 23.4.2014, at 21.43, Wesley Huang huang@utsc.utoronto.ca wrote:
We're seeing a core dump for a user connecting from IPHONE. The user mail are in NFS mount.
Program terminated with signal 11, Segmentation fault. #0 0x00007fca22f0ca85 in mail_cache_header_fields_read (cache=cache@entry=0x7fca24a04f70) at mail-cache-fields.c:369 369 for (p = names; p != end && *p != '\0'; p++) ; Looks like a corrupted dovecot.index.cache file. This should replace the crash with just an error message and cache recreation:
participants (2)
-
Timo Sirainen
-
Wesley Huang