[Dovecot] Problems with Virtual and mail-search.c
Levent Dane
limon at koli.be
Mon Oct 29 23:26:48 EET 2012
On 10/29, Timo Sirainen wrote:
>On 29.10.2012, at 20.17, Levent Dane wrote:
>
>> On 10/29, Timo Sirainen wrote:
>>> On 18.10.2012, at 9.03, Levent Dane wrote:
>>>
>>>>> I can't reproduce this. What contents do you have in dovecot-virtual files? Also doveconf -n output and gdb backtrace would be helpful: http://dovecot.org/bugreport.html
>>>>
>>>> in Code/dovecot-virtual:
>>>> Archive
>>>> inthread refs keyword code not deleted
>>>
>>> I still couldn't reproduce with this.
>>
>> I think the problem is mail-search.c is corrupting the index files.
>
>Not that itself, but yeah looks like if virtual plugin assert-crashes in mail-search.c it leaves the indexes so that the next access will segfault.
>
>> I compiled with -ggdb flag. I'm getting this informations
>> /var/log/messages: http://pastebin.com/bpkvp4Ak
>> and from gdb: http://pastebin.com/HY0mVYBS
>
>Better backtrace than last time, but still no debug information in the backtrace. Maybe that got stripped somewhere between compiling and installing? You can check with "file ..../imap" to see if it's there.
>
>Also backtrace from both the mail-search.c assert crash and the segfault would be useful.
I think I get correct backtrace. I attached this mail and uploaded
pastebin.
http://pastebin.com/L41e6AXY
--
Levent Dane
832 356 7771
4604 Spruce St,
Bellaire, TX 77401
-------------- next part --------------
Oct 29 16:21:40 widder dovecot: imap(limon): Panic: file mail-search.c: line 90 (mail_search_args_init_sub): assertion failed: (arg->value.keywords == NULL)
Oct 29 16:21:40 widder dovecot: imap(limon): Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(+0x451b1) [0xb76911b1] -> /usr/lib/dovecot/libdovecot.so.0(+0x4521f) [0xb769121f] -> /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0xb7660d4e] -> /usr/lib/dovecot/libdovecot-storage.so.0(+0x3b845) [0xb770a845] -> /usr/lib/dovecot/libdovecot-storage.so.0(index_search_result_update_flags+0xe3) [0xb77320d3] -> /usr/lib/dovecot/libdovecot-storage.so.0(index_sync_search_results_update+0x69) [0xb77394f9] -> /usr/lib/dovecot/libdovecot-storage.so.0(index_mailbox_sync_deinit+0x1f5) [0xb7738855] -> /usr/lib/dovecot/lib20_fts_plugin.so(+0xa0a6) [0xb74970a6] -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_sync_deinit+0x3a) [0xb770f7fa] -> /usr/lib/dovecot/lib20_virtual_plugin.so(virtual_storage_sync_init+0xbf2) [0xb7487ac2] -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_sync_init+0x39) [0xb770f769] -> dovecot/imap(imap_sync_init+0x54) [0x8060294] -> dovecot/imap() [0x8052262] -> dovecot/imap(cmd_idle+0xc3) [0x80523f3] -> dovecot/imap(command_exec+0x3d) [0x80591cd] -> dovecot/imap() [0x805815f] -> dovecot/imap() [0x8058230] -> dovecot/imap(client_handle_input+0x12d) [0x805847d] -> dovecot/imap(client_input+0x5f) [0x8058daf] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x42) [0xb769ff92] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0xd3) [0xb76a0f43] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x40) [0xb769fa30] -> /usr/lib/dovecot/libdovecot.so.0(master_service_run+0x2d) [0xb768880d] -> dovecot/imap(main+0x2b1) [0x8061c71] -> /lib/libc.so.6(__libc_start_main+0xe7) [0xb74de573] -> dovecot/imap() [0x804fa51]
Oct 29 16:21:40 widder dovecot: imap(limon): Fatal: master: service(imap): child 8060 killed with signal 6 (core dumped)
-------------- next part --------------
#0 0xf57fe416 in __kernel_vsyscall ()
No symbol table info available.
#1 0xb74f1a1a in raise () from /lib/libc.so.6
No symbol table info available.
#2 0xb74f3014 in abort () from /lib/libc.so.6
No symbol table info available.
#3 0xb76911c5 in default_fatal_finish (type=<optimized out>, status=<optimized out>) at failures.c:191
backtrace = 0x8df75a8 "/usr/lib/dovecot/libdovecot.so.0(+0x451b1) [0xb76911b1] -> /usr/lib/dovecot/libdovecot.so.0(+0x4521f) [0xb769121f] -> /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0xb7660d4e] -> /usr/lib/dovecot/libdo"...
#4 0xb769121f in i_internal_fatal_handler (ctx=0xbfaff584,
format=0xb7767320 "file %s: line %d (%s): assertion failed: (%s)", args=0xbfaff5a4 "?v\267Z")
at failures.c:649
status = 0
#5 0xb7660d4e in i_panic (format=0xb7767320 "file %s: line %d (%s): assertion failed: (%s)")
at failures.c:263
ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0}
args = 0xbfaff5a4 "?v\267Z"
#6 0xb770a845 in mail_search_args_init_sub (args=<optimized out>, arg=0x8e6cee8, change_uidsets=false,
search_saved_uidset=0x0) at mail-search.c:90
thread_args = <optimized out>
keywords = {0x8e6cf40 "lists", 0x0}
__FUNCTION__ = "mail_search_args_init_sub"
#7 0xb77320d3 in search_result_update_search (changed_uids_arr=0x8e87030, result=0x8e58ed0)
at index-search-result.c:69
search_ctx = <optimized out>
changed_uids = 0x8e46b30
next_uid = 29224
ret = <optimized out>
t = <optimized out>
mail = <optimized out>
changed_count = 1
changed_idx = 0
#8 index_search_result_update_flags (result=0x8e58ed0, uids=0x8e87030) at index-search-result.c:131
search_arg = {next = 0x8e6cee8, type = SEARCH_UIDSET, value = {subargs = 0x0, seqset = {arr = {
buffer = 0x8e740e8, element_size = 8}, v = 0x8e740e8, v_modifiable = 0x8e740e8}, str = 0x0,
time = 0, size = 0, flags = 0, search_flags = 0, date_type = 0, thread_type = MAIL_THREAD_NONE,
keywords = 0x0, modseq = 0x0, search_args = 0x0, search_result = 0x0, mailbox_glob = 0x0},
context = 0x0, hdr_field_name = 0x0, match_not = 0, match_always = 0, nonmatch_always = 0,
fuzzy = 0, result = 0}
ret = 0
__FUNCTION__ = "index_search_result_update_flags"
#9 0xb77394f9 in search_result_update (result=0x8e58ed0, ctx=0x8e87010) at index-sync-search.c:75
No locals.
#10 index_sync_search_results_update (ctx=0x8e87010) at index-sync-search.c:88
results = 0x9060740
i = <optimized out>
count = 3
#11 0xb7738855 in index_mailbox_sync_deinit (_ctx=0x8e87010, status_r=0xbfaffa3c) at index-sync.c:386
ctx = 0x8e87010
sync_rec = {seq1 = 3077094660, seq2 = 148987872, type = 0}
delayed_expunges = false
ret = 0
#12 0xb74970a6 in fts_sync_deinit (ctx=0x8e87010, status_r=0xbfaffa3c) at fts-storage.c:584
box = 0x9060580
fbox = 0x9060898
flist = 0x8e16060
ret = 0
#13 0xb770f7fa in mailbox_sync_deinit (_ctx=0xbfaffa40, status_r=0xbfaffa3c) at mail-storage.c:1347
ctx = <optimized out>
box = 0x9060580
errormsg = <optimized out>
error = <optimized out>
ret = <optimized out>
#14 0xb7487ac2 in virtual_sync_backend_box_sync (sync_flags=<optimized out>, bbox=0x8e632a8, ctx=0x8e8dda8)
at virtual-sync.c:973
uidmap = <optimized out>
sync_rec = {seq1 = 22114, seq2 = 22114, type = MAILBOX_SYNC_TYPE_FLAGS}
idx1 = <optimized out>
vuid = <optimized out>
sync_ctx = 0x0
sync_status = {sync_delayed_expunges = 0}
idx2 = <optimized out>
vseq = 149273152
#15 virtual_sync_backend_box (bbox=0x8e632a8, ctx=0x8e8dda8) at virtual-sync.c:1067
sync_flags = <optimized out>
status = {messages = 3077174859, recent = 148890672, unseen = 152726112, uidvalidity = 3215980904,
uidnext = 3077353460, first_unseen_seq = 149046960, first_recent_uid = 149450720,
last_cached_seq = 543664, highest_modseq = 13217152038154990465, keywords = 0x8df63a0,
permanent_flags = 3077174635, nonpermanent_modseqs = 0, permanent_keywords = 0,
allow_new_keywords = 1}
ret = <optimized out>
#16 virtual_sync_backend_boxes (ctx=0x8e8dda8) at virtual-sync.c:1399
bboxes = 0x9079798
i = <optimized out>
count = 1
#17 virtual_sync (flags=0, mbox=0x8e62e18) at virtual-sync.c:1496
ctx = 0x8e8dda8
index_sync_flags = <optimized out>
ret = <optimized out>
#18 virtual_storage_sync_init (box=0x8e62e18, flags=0) at virtual-sync.c:1516
mbox = 0x8e62e18
sync_ctx = <optimized out>
ret = <optimized out>
#19 0xb770f769 in mailbox_sync_init (box=0x8e62e18, flags=0) at mail-storage.c:1324
_data_stack_cur_id = 4
ctx = <optimized out>
#20 0x08060294 in imap_sync_init (client=0x8e17628, box=0x8e62e18, imap_flags=0, flags=0) at imap-sync.c:142
ctx = 0x8e5ba40
__FUNCTION__ = "imap_sync_init"
#21 0x08052262 in idle_sync_now (box=<optimized out>, ctx=0x8e17eb8) at cmd-idle.c:145
__FUNCTION__ = "idle_sync_now"
#22 0x080523f3 in cmd_idle (cmd=0x8e17e30) at cmd-idle.c:276
client = 0x8e17628
ctx = 0x8e17eb8
#23 0x080591cd in command_exec (cmd=0x8e17e30) at imap-commands.c:148
hook = 0x8dff260
ret = <optimized out>
#24 0x0805815f in client_command_input (cmd=0x8e17e30) at imap-client.c:682
client = 0x8e17628
command = <optimized out>
__FUNCTION__ = "client_command_input"
#25 0x08058230 in client_command_input (cmd=0x8e17e30) at imap-client.c:733
client = 0x8e17628
command = <optimized out>
__FUNCTION__ = "client_command_input"
#26 0x0805847d in client_handle_next_command (remove_io_r=<optimized out>, client=0x8e17628)
at imap-client.c:774
size = 12
#27 client_handle_input (client=0x8e17628) at imap-client.c:786
_data_stack_cur_id = 3
ret = false
remove_io = false
handled_commands = false
__FUNCTION__ = "client_handle_input"
#28 0x08058daf in client_input (client=0x8e17628) at imap-client.c:825
cmd = <optimized out>
output = 0x8e16bfc
bytes = 12
__FUNCTION__ = "client_input"
#29 0xb769ff92 in io_loop_call_io (io=0x8f49090) at ioloop.c:379
ioloop = 0x8dfe400
t_id = 2
#30 0xb76a0f43 in io_loop_handler_run (ioloop=0x8dfe400) at ioloop-epoll.c:213
ctx = 0x8dfe5e0
events = <optimized out>
event = 0x8dfe620
list = 0x8e16c90
io = <optimized out>
tv = {tv_sec = 1791, tv_usec = 756031}
events_count = 148991120
msecs = 1
ret = 1
i = <optimized out>
j = <optimized out>
call = <optimized out>
#31 0xb769fa30 in io_loop_run (ioloop=0x8dfe400) at ioloop.c:398
No locals.
#32 0xb768880d in master_service_run (service=0x8dfe330, callback=0x80612f0 <client_connected>)
at master-service.c:543
No locals.
#33 0x08061c71 in main (argc=1, argv=0x8dfe1c0) at main.c:389
set_roots = {0x80645e0, 0x0}
login_set = {auth_socket_path = 0x8df6060 "/var/run/dovecot/auth-master",
postlogin_socket_path = 0x0, postlogin_timeout_secs = 60,
callback = 0x8061720 <login_client_connected>, failure_callback = 0x8061430 <login_client_failed>}
service_flags = <optimized out>
storage_service_flags = <optimized out>
username = <optimized out>
c = <optimized out>
More information about the dovecot
mailing list