Hi,
I have a mailbox where indexing fails with the following error:
# /opt/dovecot2/bin/doveadm -c /tmp/dovecot.conf -o
mail_location=/tmp/skesselring index '*'
doveadm(root): Panic: file charset-iconv.c: line 132 (charset_to_utf8):
assertion failed: (*src_size - pos <= CHARSET_MAX_PENDING_BUF_SIZE)
doveadm(root): Error: Raw backtrace:
/opt/dovecot2/lib/dovecot/libdovecot.so.0(+0x7c13f) [0x7f1b7376f13f] ->
/opt/dovecot2/lib/dovecot/libdovecot.so.0(default_fatal_handler+0x2a)
[0x7f1b7376f21a] -> /opt/dovecot2/lib/dovecot/libdovecot.so.0(i_fatal+0)
[0x7f1b7371d555] -> /opt/dovecot2/lib/dovecot/libdovecot.so.0(+0x754a7)
[0x7f1b737684a7] ->
/opt/dovecot2/lib/dovecot/libdovecot.so.0(message_decoder_decode_next_block+0x528)
[0x7f1b7375d8d8] ->
/opt/dovecot2/lib/dovecot/lib20_fts_plugin.so(fts_build_mail+0x19e)
[0x7f1b726fbe3e] -> /opt/dovecot2/lib/dovecot/lib20_fts_plugin.so(+0xfa20)
[0x7f1b72701a20] ->
/opt/dovecot2/lib/dovecot/libdovecot-storage.so.0(mail_precache+0x19)
[0x7f1b73a1fad9] -> /opt/dovecot2/bin/doveadm() [0x4246b1] ->
/opt/dovecot2/bin/doveadm() [0x4201d0] ->
/opt/dovecot2/bin/doveadm(doveadm_mail_try_run+0x261) [0x421131] ->
/opt/dovecot2/bin/doveadm(main+0x34f) [0x41413f] ->
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7f1b73386ead] ->
/opt/dovecot2/bin/doveadm() [0x414235]
Aborted (core dumped)
Dovecot 2.2.18 build from sources ./configure --prefix=/opt/dovecot2
--with-mysql --with-sqlite --with-solr --with-ssl --disable-rpath
--disable-static.
Filesystem is ext4
# /opt/dovecot2/bin/doveadm -c /tmp/dovecot.conf config
-n
# 2.2.18: /tmp/dovecot.conf
# OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.8
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
}
# gdb /opt/dovecot2/bin/doveadm 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_clean/bin/doveadm...done.
[New LWP 4172]
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 `/opt/dovecot2/bin/doveadm -c /tmp/dovecot.conf -o
mail_location=/tmp/skesselrin'.
Program terminated with signal 6, Aborted.
#0 0x00007f1b7339a165 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb)
(gdb)
(gdb) bt full
#0 0x00007f1b7339a165 in raise () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1 0x00007f1b7339d3e0 in abort () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#2 0x00007f1b7376f135 in default_fatal_finish (type=<optimized out>,
status=status at entry=0) at failures.c:202
backtrace = 0x2304560
"/opt/dovecot2/lib/dovecot/libdovecot.so.0(+0x7c13f) [0x7f1b7376f13f] ->
/opt/dovecot2/lib/dovecot/libdovecot.so.0(default_fatal_handler+0x2a)
[0x7f1b7376f21a] -> /opt/dovecot2/lib/dovecot/libdovecot.s"...
#3 0x00007f1b7376f21a in default_fatal_handler (ctx=0x7fff678c4510,
format=<optimized out>, args=<optimized out>) at failures.c:216
status = 0
#4 0x00007f1b7371d555 in i_panic (format=format at entry=0x7f1b73799298
"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
0x7fff678c4600, reg_save_area = 0x7fff678c4540}}
#5 0x00007f1b737684a7 in charset_to_utf8 (t=0x2371a50,
src=src at entry=0x23845e0
"\213h\201\347/\364\322*\303\307YpG\a\207\002\222\276\364z\301\350\201\227\335\360<\016(20~\365\254A\373?\326\070ir\364S\270-\006\245\360\237\250\242}iz]ph`<\026T9H\325F\033\301\354\333K\270|\353\345rF3-\277\211\003XOT\375\347\241\273\256\360<\330cy0\327",
src_size=src_size at entry=0x7fff678c4668, dest=0x2369320) at
charset-iconv.c:132
result = CHARSET_RET_INVALID_INPUT
pos = 8226
size = 2183
prev_invalid_pos = 9595
ret = <optimized out>
__FUNCTION__ = "charset_to_utf8"
#6 0x00007f1b7375d8d8 in message_decode_body (output=0x7fff678c4780,
ctx=0x2370b60, input=<optimized out>) at message-decoder.c:342
data = 0x23845e0
"\213h\201\347/\364\322*\303\307YpG\a\207\002\222\276\364z\301\350\201\227\335\360<\016(20~\365\254A\373?\326\070ir\364S\270-\006\245\360\237\250\242}iz]ph`<\026T9H\325F\033\301\354\333K\270|\353\345rF3-\277\211\003XOT\375\347\241\273\256\360<\330cy0\327"
ret = <optimized out>
pos = 6042
size = 6042
error = 0x7fff678c4760 "\020B0\002"
#7 message_decoder_decode_next_block (ctx=0x2370b60,
input=input at entry=0x7fff678c4760,
output=output at entry=0x7fff678c4780) at message-decoder.c:375
No locals.
#8 0x00007f1b726fbe3e in fts_build_mail_real (mail=0x23639b0,
update_ctx=0x2355980) at fts-build-mail.c:543
ctx = {mail = 0x23639b0, update_ctx = 0x2355980, content_type 0x2371540
"text/*", content_disposition = 0x2371fa0 "attachment;
filename=\"PTT-20141109-WA0001.amr\"", body_parser = 0x23832a0,
word_buf 0x0, pending_input = 0x0, cur_user_lang = 0x0}
parser = 0x2371130
decoder = 0x0
raw_block = {part = 0x2304210, hdr = 0x0,
data = 0x236eb50
"\ni2iB5y/00irDx1lwRweHApK+9HrB6IGX3fA8DigyMH71rEH7P9Y4aXL0U7gtBqXwn6iifWl6XXBo\nYDwWVDlI1UYbwezbS7h86+VyRjMtv4kDWE9U/eehu67wPNhjeTDXABPB8tdUnMju+InvVF0WrHjV\ns4DPnnWsU/A8QHFtQIZOQyH2OXXwA/i5uBFaqadFhd/L4"...,
size = 8162}
prev_part = 0x2304210
skip_body = false
block = {part = 0x2304210, hdr = 0x0, data = 0x2391a60 "",
size = 0}
binary_body = <optimized out>
ret = <optimized out>
input = 0x2370fa0
parts = 0x7f1b73ab63c1
body_part = true
body_added = true
#9 fts_build_mail (update_ctx=0x2355980, mail=mail at entry=0x23639b0) at
fts-build-mail.c:592
_data_stack_cur_id = 5
ret = 1
#10 0x00007f1b72701a20 in fts_mail_index (_mail=0x23639b0) at
fts-storage.c:484
ft = 0x235bdf0
flist = 0x2326868
#11 fts_mail_precache (_mail=0x23639b0) at fts-storage.c:501
_data_stack_cur_id = 4
mail = 0x23639b0
fmail = <optimized out>
ft = <optimized out>
#12 0x00007f1b73a1fad9 in mail_precache (mail=0x23639b0) at mail.c:401
_data_stack_cur_id = 3
p = 0x23639b0
#13 0x00000000004246b1 in cmd_index_box_precache (box=0x233a360) at
doveadm-mail-index.c:75
ctx = 0x235ca40
metadata = {guid = '\000' <repeats 15 times>, virtual_size
= 0,
cache_fields = 0x0, precache_fields = 2359788, backend_ns_prefix = 0x0,
backend_ns_type = 0}
counter = 0
max = 1574
status = {messages = 13892, recent = 0, unseen = 0, uidvalidity
1426760059, uidnext = 20447, first_unseen_seq = 0, first_recent_uid = 1,
last_cached_seq = 12318, highest_modseq = 0, highest_pvt_modseq = 0,
keywords = 0x0, permanent_flags = 0,
permanent_keywords = 0, allow_new_keywords = 0,
nonpermanent_modseqs = 0, no_modseq_tracking = 0, have_guids = 1,
have_save_guids = 1, have_only_guid128 = 0}
mail = 0x23639b0
ret = 0
trans = 0x23536d0
search_args = 0x0
seq = <optimized out>
#14 cmd_index_box (ctx=0x2318910, info=<optimized out>) at
doveadm-mail-index.c:130
box = 0x233a360
status = {messages = 36801008, recent = 0, unseen = 36838224,
uidvalidity = 0, uidnext = 1, first_unseen_seq = 0, first_recent_uid 36805392,
last_cached_seq = 0, highest_modseq = 36801016,
highest_pvt_modseq = 0, keywords = 0x0, permanent_flags = 1939790736,
permanent_keywords = 1, allow_new_keywords = 1,
nonpermanent_modseqs = 0, no_modseq_tracking = 1, have_guids = 1,
have_save_guids = 0, have_only_guid128 = 0}
ret = 0
---Type <return> to continue, or q <return> to quit---
#15 cmd_index_run (user=0x2321b50, _ctx=0x2318910) at
doveadm-mail-index.c:201
_data_stack_cur_id = 2
iter = 0x2332360
info = <optimized out>
ret = 0
#16 cmd_index_run (_ctx=0x2318910, user=0x2321b50) at
doveadm-mail-index.c:173
ctx = 0x2318910
i = <optimized out>
#17 0x00000000004201d0 in doveadm_mail_next_user (error_r=0x7fff678c4aa8,
input=<optimized out>, ctx=0x2318910) at doveadm-mail.c:380
error = <optimized out>
ret = 0
#18 doveadm_mail_next_user (ctx=0x2318910, input=<optimized out>,
error_r=0x7fff678c4aa8) at doveadm-mail.c:333
ip = <optimized out>
ret = <optimized out>
#19 0x0000000000421131 in doveadm_mail_cmd (argv=0x23093c0, argc=2,
cmd=0x2317b90) at doveadm-mail.c:608
input = {module = 0x0, service = 0x44f7aa "doveadm", username
0x2309600 "root", session_id = 0x0, local_ip = {family = 0, u = {ip6
{__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 =
{0, 0, 0,
0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}},
ip4 = {s_addr = 0}}}, remote_ip = {family = 0, u = {ip6 {__in6_u =
{__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0,
0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, ip4 = {s_addr = 0}}},
local_port = 0, remote_port = 0, userdb_fields = 0x0,
flags_override_add = 0, flags_override_remove = 0,
no_userdb_lookup = 0}
ctx = 0x2318910
getopt_args = 0x2301688 "qn:AF:S:u:"
ret = <optimized out>
c = <optimized out>
wildcard_user = 0x0
error = <optimized out>
#20 doveadm_mail_try_run (cmd_name=cmd_name at entry=0x2309421
"index",
argc=2, argv=0x23093b8) at doveadm-mail.c:704
cmd = 0x2317b90
#21 0x000000000041413f in main (argc=2, argv=0x23093b8) at doveadm.c:346
cmd_name = 0x2309421 "index"
quick_init = false
c = <optimized out>
(gdb)