wenjie zheng
2007-Aug-04 15:25 UTC
[Dovecot] A few dovecot 1.1 bugs - sort, flag reset and etc.
I installed dovecot 1.1 on our system yesterday, and found a few bugs so far.
Here is the list:
BUG #1: can't access some folders
Details:
a select "RSS.A List Apart"
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft $$$INDEXED###)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft
$$$INDEXED### \*)] Flags permitted.
* 52 EXISTS
* 0 RECENT
* OK [UNSEEN 50] First unseen.
* OK [UIDVALIDITY 1166644056] UIDs valid
* OK [UIDNEXT 65] Predicted next UID
a OK [READ-WRITE] Select completed.
a SORT (DATE) UTF-8 UNSEEN
imap(jing at webmail.us <javascript:void(0);>): Panic: file
mail-cache-lookup.c: line 70: unreached
imap(jing at webmail.us <javascript:void(0);>): Error: Raw backtrace:
/usr/libexec/dovecot/imap [0x80be647] -> /usr/libexec/dovecot/imap
[0x80be82f] -> /usr/libexec/dovecot/imap [0x809849b] ->
/usr/libexec/dovecot/imap(mail_cache_lookup_iter_init+0x6c)
[0x809857c] -> /usr/libexec/dovecot/imap(mail_cache_lookup_headers+0xf7)
[0x8098c77] -> /usr/libexec/dovecot/imap [0x8091ac7] ->
/usr/libexec/dovecot/imap(index_mail_get_first_header+0x17)
[0x8091dff] -> /usr/libexec/dovecot/imap(mail_get_first_header+0x12)
[0x80b054a] -> /usr/libexec/dovecot/imap [0x8093b5a] ->
/usr/libexec/dovecot/imap [0x8093cee] -> /usr/libexec/dovecot/imap
[0x8093eff] -> /usr/libexec/dovecot/imap(bsearch_insert_pos+0x40)
[0x80bd794] -> /usr/libexec/dovecot/imap [0x8094660] ->
/usr/libexec/dovecot/imap [0x8094759] ->
/usr/libexec/dovecot/imap(index_sort_list_finish+0x2f) [0x8094a27] ->
/usr/libexec/dovecot/imap(index_storage_search_next_nonblock+0x119)
[0x8093819] -> /usr/libexec/dovecot/imap(mailbox_search_next_nonblock+0x17)
[0x80b21f3] -> /usr/libexec/dovecot/imap(mailbox_search_next+0x1d)
[0x80b21c5] -> /usr/libexec/dovecot/imap(imap_sort+0xb5) [0x8064529]
-> /usr/libexec/dovecot/imap(cmd_sort+0x10e) [0x805e356] ->
/usr/libexec/dovecot/imap [0x805fe82] -> /usr/libexec/dovecot/imap
[0x805fda1] -> /usr/libexec/dovecot/imap [0x805ff11] ->
/usr/libexec/dovecot/imap(_client_input+0x56) [0x805ffce] ->
/usr/libexec/dovecot/imap(io_loop_handler_run+0x100) [0x80c3e38] ->
/usr/libexec/dovecot/imap(io_loop_run+0x2d) [0x8069339] ->
/usr/libexec/dovecot/imap(main+0x64) [0x8068d30] ->
/lib/tls/libc.so.6(__libc_start_main+0xda) [0x73978a]
Program received signal SIGABRT, Aborted.
0x0074bcdf in raise () from /lib/tls/libc.so.6
(gdb) bt full
#0 0x0074bcdf in raise () from /lib/tls/libc.so.6
No symbol table info available.
#1 0x0074d4e5 in abort () from /lib/tls/libc.so.6
No symbol table info available.
#2 0x080be666 in default_panic_handler (format=0x80cdbdd "file %s:
line %d: unreached", args=0xbfff9cb4 "MP\r\bF") at failures.c:136
backtrace = 0x8d2ac38 "/usr/libexec/dovecot/imap [0x80be647]
-> /usr/libexec/dovecot/imap [0x80be82f] -> /usr/libexec/dovecot/imap
[0x809849b] -> /usr/libexec/dovecot/imap(mail_cache_lookup_iter_init+0x6c)
[0x809857c] -> /u"...
#3 0x080be82f in i_panic (format=0x80cdbdd "file %s: line %d:
unreached") at failures.c:213
No locals.
#4 0x0809849b in mail_cache_lookup_offset (cache=0x8d4a9b8,
view=0x8d4d460, seq=18, offset_r=0x0) at mail-cache-lookup.c:70
map = (struct mail_index_map *) 0x8d4a898
data = (const void *) 0x8d4f4a4
idx = 148024040
i = -1073767072
ret = 0
#5 0x0809857c in mail_cache_lookup_iter_init (view=0x8d4d558, seq=18,
ctx_r=0xbfff9d60) at mail-cache-lookup.c:125
ctx = (struct mail_cache_lookup_iterate_ctx *) 0xbfff9d60
ret = 0
#6 0x08098c77 in mail_cache_lookup_headers (view=0x8d4d558,
dest=0x8d52038, seq=18, field_idxs=0xbfff9de4, fields_count=1) at
mail-cache-lookup.c:470
cache = (struct mail_cache *) 0x8d4a9b8
iter = {view = 0x8d4d558, remap_counter = 0, seq = 18, rec 0x0, pos = 0,
rec_size = 0, offset = 0, stop = 0, failed = 0,
appends_checked = 0}
field = {field_idx = 12, data = 0x8d4dbc0, size = 0}
ctx = {view = 0x8d4d558, lines = {arr = {buffer = 0x8d2aae8,
element_size = 8}, v = 0x8d2aae8, v_modifiable = 0x8d2aae8}}
lines = (struct header_lookup_line *) 0x1
p = (const unsigned char *) 0x0
start = (const unsigned char *) 0xbfff9d60 "X??\b"
end = (const unsigned char *) 0x42a5 <Address 0x42a5 out of
bounds>
field_state = (uint8_t *) 0x8d2aab8 ""
i = 1
max_field = 10
hdr_size = 3221200208
want = 1 '\001'
buf = (buffer_t *) 0xbfff9d50
ret = 0
#7 0x08091ac7 in index_mail_get_raw_headers (mail=0x8d3d3b8,
field=0x80ce56b "Subject") at index-mail-headers.c:568
headers = {0xbfff9e18 "8\236??J\005\v\b???\bk?\f\b", 0x809059c
"\213\216(\001"}
value = 0x0
headers_ctx = (struct mailbox_header_lookup_ctx *) 0x8d3d3b8
data = (unsigned char *) 0x8d4b1a8 "h??\b
*?\b\224X\t\b?X\t\b?\200\006\b\204?\006\b?2\a\b?3\a\b??\006\b??\006\bT?\006\b"
field_idx = 10
dest = (string_t *) 0x8d52038
i = 148100024
len = 148100132
ret = 148156840
header_values = {arr = {buffer = 0xac, element_size 3221200392}, v =
0xac, v_modifiable = 0xac}
#8 0x08091dff in index_mail_get_first_header (_mail=0x8d3d3b8,
field=0x80ce56b "Subject", decode_to_utf8=false) at
index-mail-headers.c:673
list = (const char * const *) 0x6
#9 0x080b054a in mail_get_first_header (mail=0x0, field=0x80ce56b
"Subject") at mail.c:96
No locals.
#10 0x08093b5a in sort_header_get (sort_type=MAIL_SORT_SUBJECT,
mail=0x8d3d3b8, seq=18) at index-sort.c:180
str = 0x8d3d3b8 "???\b8??\b\022"
buf = (string_t *) 0x20
#11 0x08093cee in sort_node_cmp_type (ctx=0x80e62e0,
sort_program=0x8d3d334, n1=0xbfff9f20, n2=0x8d3d850) at
index-sort.c:223
sort_type = MAIL_SORT_SUBJECT
str1 = 0x8d2aa50 "NEVER USE A WARNING WHEN YOU MEAN UNDO"
str2 = 0x0
time1 = 32
time2 = 6
size1 = 148023856
size2 = 73276437037062
ret = 148023888
#12 0x08093eff in sort_node_cmp_no_sort_id (p1=0xbfff9f20,
p2=0x8d3d850) at index-sort.c:309
No locals.
---Type <return> to continue, or q <return> to quit---
#13 0x080bd794 in bsearch_insert_pos (key=0xbfff9f20, base=0x8d3d798,
nmemb=46, size=8, cmp=0x8093ee0 <sort_node_cmp_no_sort_id>,
idx_r=0xbfff9f1c) at bsearch-insert-pos.c:20
p = (const void *) 0x0
idx = 23
left_idx = 0
right_idx = 46
ret = 0
#14 0x08094660 in index_sort_headers (program=0x8d3d330, last_seq=52)
at index-sort.c:590
node = {seq = 47, sort_id = 0}
count = 46
idx = 15
#15 0x08094759 in index_sort_build (program=0x8d3d330, last_seq=52) at
index-sort.c:637
ibox = (struct index_mailbox *) 0x8d4b1a8
node = {seq = 1, sort_id = 0}
data = (const void *) 0x0
i = 6
#16 0x08094a27 in index_sort_list_finish (program=0x8d3d330) at index-sort.c:743
No locals.
#17 0x08093819 in index_storage_search_next_nonblock (_ctx=0x8d3d2c8,
mail=0x8d50440, tryagain_r=0xbfffa01b) at index-search.c:1058
box = (struct mailbox *) 0x8d4b1a8
count = 12
ret = 0
#18 0x080b21f3 in mailbox_search_next_nonblock (ctx=0x6,
mail=0x8d50440, tryagain_r=0xbfffa01b) at mail-storage.c:598
No locals.
#19 0x080b21c5 in mailbox_search_next (ctx=0x8d3d2c8, mail=0x8d50440)
at mail-storage.c:589
tryagain = false
ret = 0
#20 0x08064529 in imap_sort (cmd=0x8d35f40, charset=0x8d3a2e0 "UTF-8",
args=0x8d4b7b0, sort_program=0x8d292c0) at imap-sort.c:90
client = (struct client *) 0x8d345d0
wanted_headers = {0x80ce56b "Subject", 0x0}
wanted_fields = 0
search_ctx = (struct mail_search_context *) 0x8d3d2c8
t = (struct mailbox_transaction_context *) 0x8d4c738
headers_ctx = (struct mailbox_header_lookup_ctx *) 0x8d3c9b0
mail = (struct mail *) 0x8d50440
str = (string_t *) 0x8d292c0
written = false
ret = 148070208
#21 0x0805e356 in cmd_sort (cmd=0x8d35f40) at cmd-sort.c:134
client = (struct client *) 0x8d345d0
sargs = (struct mail_search_arg *) 0x0
sorting = {MAIL_SORT_SUBJECT, MAIL_SORT_END, 3221201096,
7656935, 148070264, 135062878, 20, 18}
args = (const struct imap_arg *) 0x8d3a1e8
args_count = 0
pool = 0x8d4b798
error = 0x0
charset = 0x8d3a2e0 "UTF-8"
#22 0x0805fe82 in client_command_input (cmd=0x8d35f40) at client.c:488
client = (struct client *) 0x8d345d0
#23 0x0805fda1 in client_command_input (cmd=0x8d35f40) at client.c:545
client = (struct client *) 0x8d345d0
#24 0x0805ff11 in client_handle_next_command (client=0x8d345d0) at client.c:556
size = 27
#25 0x0805ffce in _client_input (client=0x8d345d0) at client.c:616
cmd = (struct client_command_context *) 0x2
ret = 2
#26 0x080c3e38 in io_loop_handler_run (ioloop=0x8d31a68) at ioloop-poll.c:200
ctx = (struct ioloop_handler_context *) 0x8d31aa8
pollfd = (struct pollfd *) 0x2
tv = {tv_sec = 4, tv_usec = 199377}
io = (struct io_file *) 0x8d340c8
t_id = 2
msecs = 0
ret = 0
---Type <return> to continue, or q <return> to quit---
call = 165
#27 0x08069339 in io_loop_run (ioloop=0x8d31a68) at ../../src/lib/ioloop.c:351
No locals.
#28 0x08068d30 in main (argc=1, argv=0xbfffa264, envp=0xbfffa26c) at main.c:301
No locals.
BUG #2: Some flags are reset after they were set a while ago,
like messages that has been read are randomly becoming unread again.
Bug #3: CRLF in the email file on disk is shown like "=0A", which
causes display problem in wireless access.
=0A
=0A
=0A
=0A
=0AHey all,
=0A=C2=A0
Thanks,
Wenjie
Timo Sirainen
2007-Aug-06 14:36 UTC
[Dovecot] A few dovecot 1.1 bugs - sort, flag reset and etc.
On Sat, 2007-08-04 at 11:25 -0400, wenjie zheng wrote:> imap(jing at webmail.us <javascript:void(0);>): Panic: file > mail-cache-lookup.c: line 70: unreachedThis should be fixed now in hg.> BUG #2: Some flags are reset after they were set a while ago, > like messages that has been read are randomly becoming unread again.I haven't noticed this myself. When you see this, could you look up the message's UID and then check with logview program (in libexec/dovecot/) what flag changes there have been for this UID. The only parameter logview needs is path to the dovecot.index.log file.> Bug #3: CRLF in the email file on disk is shown like "=0A", which > causes display problem in wireless access. > =0A > =0A > =0A > =0A > =0AHey all, > =0A=C2=A0Dovecot doesn't do any line feed conversions, I think that email was just sent like that? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20070806/c5ac9c63/attachment-0002.bin>
Jasper Bryant-Greene
2007-Aug-06 23:48 UTC
[Dovecot] A few dovecot 1.1 bugs - sort, flag reset and etc.
On Aug 06, 2007 17:36:02, Timo Sirainen wrote:> On Sat, 2007-08-04 at 11:25 -0400, wenjie zheng wrote: > > BUG #2: Some flags are reset after they were set a while ago, > > like messages that has been read are randomly becoming unread again. > > I haven't noticed this myself. When you see this, could you look up the > message's UID and then check with logview program (in libexec/dovecot/) > what flag changes there have been for this UID. The only parameter > logview needs is path to the dovecot.index.log file.I'm seeing this problem too. Message was marked 'O' in mutt - I believe this means 'seen'. Here's the logview output when I open the message (which should mark it as 'read'): record: offset=13532, type=flag-update (ext), size=20 - 223-223 (flags +0-1f) record: offset=13552, type=keyword-reset (ext), size=24 - 228-228, 230-240, record: offset=13576, type=header-update (ext), size=16 - offset = 64, size = 4: 18350000 (dec=13592) Let me know if you need anything else. Cheers, J
Timo Sirainen
2007-Aug-07 08:43 UTC
[Dovecot] A few dovecot 1.1 bugs - sort, flag reset and etc.
On Sat, 2007-08-04 at 11:25 -0400, wenjie zheng wrote:> BUG #2: Some flags are reset after they were set a while ago, > like messages that has been read are randomly becoming unread again.Fixed: http://hg.dovecot.org/dovecot/rev/65e12fa51d4d -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20070807/16a09ff3/attachment-0002.bin>