Re: [Dovecot] Coredump using virtual folder.

2009-04-16 Thread Matthias Rieber

Hi,

On Wed, 15 Apr 2009, Timo Sirainen wrote:


On Thu, 2009-04-09 at 08:18 +0200, Matthias Rieber wrote:

#0  0x080a542b in search_index_arg (arg=0x973da68, ctx=0xa13b140) at
index-search.c:123
123 for (i = 0; i  search_kws-count; i++) {
(gdb) bt


Committed some more fixes to hg that should fix this and other bugs.


it's much better now, but after adding and removing keywords on many mails 
I got an assert again:


Core was generated by `imap'.
Program terminated with signal 6, Aborted.
[New process 5924]
#0  0xb7eeb556 in raise () from /lib/libc.so.6
(gdb) bt
#0  0xb7eeb556 in raise () from /lib/libc.so.6
#1  0xb7eecd78 in abort () from /lib/libc.so.6
#2  0x080eec25 in default_fatal_finish (type=value optimized out, status=0) 
at failures.c:161
#3  0x080eec92 in i_internal_fatal_handler (type=LOG_TYPE_PANIC, status=0, fmt=0xb7eb6e18 
file %s: line %d (%s): assertion failed: (%s), args=0xbfe23f64 Ds\002)
at failures.c:441
#4  0x080ee619 in i_panic (format=0xb7eb6e18 file %s: line %d (%s): assertion 
failed: (%s)) at failures.c:208
#5  0xb7eb489f in virtual_sync_mailbox_box_add (ctx=0xa2087e0, bbox=0x9b14b90, 
added_uids=0xbfe241cc) at virtual-sync.c:570
#6  0xb7eb5fa9 in virtual_storage_sync_init (box=0x9b149d0, flags=65) at 
virtual-sync.c:687
#7  0x080b3c82 in mailbox_sync (box=0x1724, flags=65, status_items=239, 
status_r=0xbfe242a8) at mail-storage.c:574
#8  0x08064708 in cmd_select_full (cmd=0x9b0c240, readonly=false) at 
cmd-select.c:273
#9  0x08064e69 in cmd_select (cmd=0x9b0c240) at cmd-select.c:388
#10 0x0806700c in client_command_input (cmd=0x9b0c240) at client.c:603
#11 0x080670a9 in client_command_input (cmd=0x9b0c240) at client.c:652
#12 0x080676ed in client_handle_input (client=0x9b0bfb0) at client.c:693
#13 0x08067ba3 in client_input (client=0x9b0bfb0) at client.c:748
#14 0x080f7620 in io_loop_handler_run (ioloop=0x9b079b0) at ioloop-epoll.c:208
#15 0x080f6ab0 in io_loop_run (ioloop=0x9b079b0) at ioloop.c:338
#16 0x080704c5 in main (argc=Cannot access memory at address 0x1724) at 
main.c:320

log entry:

dovecot: Panic: IMAP(matthias): file virtual-sync.c: line 570 
(virtual_sync_mailbox_box_add): assertion failed: (src  rec_count)
dovecot: Error: IMAP(matthias): Raw backtrace: imap [0x80eec11] - imap 
[0x80eec92] - imap [0x80ee619] - 
/usr/local/lib/dovecot/imap/lib20_virtual_plugin.so [0xb7e4889f] - 
/usr/local/lib/dovecot/imap/lib20_virtual_plugin.so(virtual_storage_sync_init+0x1699) 
[0xb7e49fa9] - imap(mailbox_sync+0x32) [0x80b3c82] - 
imap(cmd_select_full+0x3d8) [0x8064708] - imap(cmd_select+0x19) 
[0x8064e69] - imap [0x806700c] - imap [0x80670a9] - 
imap(client_handle_input+0x1d) [0x80676ed] - imap(client_input+0x63) 
[0x8067ba3] - imap(io_loop_handler_run+0xe0) [0x80f7620] - 
imap(io_loop_run+0x20) [0x80f6ab0] - imap(main+0x5e5) [0x80704c5] - 
/lib/libc.so.6(__libc_start_main+0xe5) [0xb7e6b455] - imap [0x805fb71]

dovecot: Error: child 5921 (imap) killed with signal 6 (core dumped)

I've seen another issue (maybe relatet to that bug). It seems that the 
virtual folder a just increasing. There are 4 KEYWORD Mails. I see all the 
mails in the virtual keyword folder. After the removal of the keywords 
form two mails, there are still 4 mails in the virtual folder, but two are 
shown without the keyword. I think the two mails should be removed from 
the virtual folder.


kind regards,

Matthias


Re: [Dovecot] Coredump using virtual folder.

2009-04-16 Thread Timo Sirainen
On Thu, 2009-04-16 at 20:28 +0200, Matthias Rieber wrote:
 #5  0xb7eb489f in virtual_sync_mailbox_box_add (ctx=0xa2087e0, 
 bbox=0x9b14b90, added_uids=0xbfe241cc) at virtual-sync.c:570

This should help: http://hg.dovecot.org/dovecot-1.2/rev/91da114598f1

Hopefully we're running out of bugs soon :)

 I've seen another issue (maybe relatet to that bug). It seems that the 
 virtual folder a just increasing. There are 4 KEYWORD Mails. I see all the 
 mails in the virtual keyword folder. After the removal of the keywords 
 form two mails, there are still 4 mails in the virtual folder, but two are 
 shown without the keyword. I think the two mails should be removed from 
 the virtual folder.

Is this while the mailbox is still open? I had decided that messages
shouldn't immediately be removed when they don't match (e.g. reading a
mail in unseen virtual mailbox would set \seen flag and the mail would
disappear before you had a chance to read it). So messages are removed
only when EXPUNGE command is given or mailbox is reopened.


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Coredump using virtual folder.

2009-04-15 Thread Timo Sirainen
On Thu, 2009-04-09 at 08:18 +0200, Matthias Rieber wrote:
 #0  0x080a542b in search_index_arg (arg=0x973da68, ctx=0xa13b140) at 
 index-search.c:123
 123 for (i = 0; i  search_kws-count; i++) {
 (gdb) bt

Committed some more fixes to hg that should fix this and other bugs.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Coredump using virtual folder.

2009-04-09 Thread Matthias Rieber

Hello,

On Wed, 8 Apr 2009, Timo Sirainen wrote:


On Wed, 2009-04-08 at 18:46 +0200, Matthias Rieber wrote:

I guess x-references2 has been renamed to refs. When I'm using I that, I
got a coredump again:

[New process 24135]
#0  0x080a3038 in index_header_lookup_init (box=0x9b05d28, headers=0x0) at
index-mail-headers.c:864
864 i_assert(*headers != NULL);
(gdb) bt


Fixed this and another bug:
http://hg.dovecot.org/dovecot-1.2/rev/e5633843c336


it partly fixes the bug. When I access the folder for the first time it 
works now.


I've a virtual folder 'unseen' and one 'keyword'. When I mark some mails 
seen that are in the search folders of unseen and I access the folder 
unseen, the status will be updated and the messages disappear. So far so 
good, but when I access the keyword folder, I get a coredump again:


Core was generated by `imap'.
Program terminated with signal 11, Segmentation fault.
[New process 22081]
#0  0x080a542b in search_index_arg (arg=0x973da68, ctx=0xa13b140) at 
index-search.c:123

123 for (i = 0; i  search_kws-count; i++) {
(gdb) bt
#0  0x080a542b in search_index_arg (arg=0x973da68, ctx=0xa13b140) at 
index-search.c:123
#1  0x080b0ea2 in search_arg_foreach (arg=0x973da68, callback=0x80a52e0 
search_index_arg, context=0xa13b140) at mail-search.c:316
#2  0x080b0ff0 in mail_search_args_foreach (args=0x973da68, callback=0x80a52e0 
search_index_arg, context=0xa13b140) at mail-search.c:329
#3  0x080a528a in index_storage_search_next_update_seq (_ctx=0xa13b140) at 
index-search.c:1266
#4  0xb7f64666 in fts_mailbox_search_next_update_seq (ctx=0xa13b140) at 
fts-storage.c:683
#5  0x080a5544 in index_storage_search_next_nonblock (_ctx=0xa13b140, 
mail=0xa13b2b0, tryagain_r=0xbfaccbbb) at index-search.c:1189
#6  0xb7f64f02 in fts_mailbox_search_next_nonblock (ctx=0xa13b140, 
mail=0xa13b2b0, tryagain_r=0xbfaccbbb) at fts-storage.c:631
#7  0x080b3d4d in mailbox_search_next_nonblock (ctx=0xa13b140, mail=0xa13b2b0, 
tryagain_r=0xbfaccbbb) at mail-storage.c:751
#8  0x080b3da8 in mailbox_search_next (ctx=0xa13b140, mail=0xa13b2b0) at 
mail-storage.c:737
#9  0x080af66a in index_search_result_update_flags (result=0xa139ff8, 
changes=0xbfacce64) at index-search-result.c:78
#10 0xb7f5cd16 in virtual_storage_sync_init (box=0x97399d0, flags=65) at 
virtual-sync.c:677
#11 0x080b3b02 in mailbox_sync (box=0x0, flags=65, status_items=239, 
status_r=0xbfaccf48) at mail-storage.c:574
#12 0x08064708 in cmd_select_full (cmd=0x9731240, readonly=false) at 
cmd-select.c:273
#13 0x08064e69 in cmd_select (cmd=0x9731240) at cmd-select.c:388
#14 0x0806700c in client_command_input (cmd=0x9731240) at client.c:603
#15 0x080670a9 in client_command_input (cmd=0x9731240) at client.c:652
#16 0x080676ed in client_handle_input (client=0x9730fb0) at client.c:693
#17 0x08067ba3 in client_input (client=0x9730fb0) at client.c:748
#18 0x080f7390 in io_loop_handler_run (ioloop=0x972c9b0) at ioloop-epoll.c:208
#19 0x080f6820 in io_loop_run (ioloop=0x972c9b0) at ioloop.c:338
#20 0x080704c5 in main (argc=Cannot access memory at address 0x0) at main.c:320

When I delete the dovecot.index.* files in the virtual folder it works 
again, till the unseen messages change.


regards,

matthias


Re: [Dovecot] Coredump using virtual folder.

2009-04-08 Thread Matthias Rieber

Hi,

another backtrace:

dovecot-virtual:

INBOX
INBOX.Some.Folder.*
 KEYWORD $MAILING

Core was generated by `imap'.
Program terminated with signal 6, Aborted.
[New process 20853]
#0  0xb7fbe556 in raise () from /lib/libc.so.6
(gdb) bt
#0  0xb7fbe556 in raise () from /lib/libc.so.6
#1  0xb7fbfd78 in abort () from /lib/libc.so.6
#2  0x080ee9a5 in default_fatal_finish (type=value optimized out, status=0) 
at failures.c:161
#3  0x080eea12 in i_internal_fatal_handler (type=LOG_TYPE_PANIC, status=0, fmt=0x810632c file 
%s: line %d (%s): assertion failed: (%s), args=0xbf9f6b54 \002) at failures.c:441
#4  0x080ee399 in i_panic (format=0x810632c file %s: line %d (%s): assertion 
failed: (%s)) at failures.c:208
#5  0x080b1def in mail_search_args_init_sub (args=0x9eee200, arg=0x9eee220, 
change_uidsets=false, search_saved_uidset=0x0) at mail-search.c:86
#6  0xb7f8f7e3 in virtual_storage_sync_init (box=0x9eea188, flags=65) at 
virtual-sync.c:451
#7  0x080b3b12 in mailbox_sync (box=0x5175, flags=65, status_items=239, 
status_r=0xbf9f6e88) at mail-storage.c:574
#8  0x08064708 in cmd_select_full (cmd=0x9ee19f8, readonly=false) at 
cmd-select.c:273
#9  0x08064e69 in cmd_select (cmd=0x9ee19f8) at cmd-select.c:388
#10 0x0806700c in client_command_input (cmd=0x9ee19f8) at client.c:603
#11 0x080670a9 in client_command_input (cmd=0x9ee19f8) at client.c:652
#12 0x080676ed in client_handle_input (client=0x9ee1768) at client.c:693
#13 0x08067ba3 in client_input (client=0x9ee1768) at client.c:748
#14 0x080f73a0 in io_loop_handler_run (ioloop=0x9edd9b0) at ioloop-epoll.c:208
#15 0x080f6830 in io_loop_run (ioloop=0x9edd9b0) at ioloop.c:338
#16 0x080704c5 in main (argc=Cannot access memory at address 0x5175) at 
main.c:320

regards,

matthias


Re: [Dovecot] Coredump using virtual folder.

2009-04-08 Thread Timo Sirainen
On Wed, 2009-04-08 at 18:46 +0200, Matthias Rieber wrote:
 I guess x-references2 has been renamed to refs. When I'm using I that, I 
 got a coredump again:
 
 [New process 24135]
 #0  0x080a3038 in index_header_lookup_init (box=0x9b05d28, headers=0x0) at 
 index-mail-headers.c:864
 864 i_assert(*headers != NULL);
 (gdb) bt

Fixed this and another bug: 
http://hg.dovecot.org/dovecot-1.2/rev/e5633843c336



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Coredump using virtual folder.

2009-04-08 Thread Timo Sirainen
On Thu, 2009-04-09 at 00:09 +0200, Matthias Rieber wrote:
 INBOX
 INBOX.Some.Folder.*
   KEYWORD $MAILING
..
 #5  0x080b1def in mail_search_args_init_sub (args=0x9eee200, arg=0x9eee220, 
 change_uidsets=false, search_saved_uidset=0x0) at mail-search.c:86
 #6  0xb7f8f7e3 in virtual_storage_sync_init (box=0x9eea188, flags=65) at 
 virtual-sync.c:451

This fixes it (and hopefully doesn't break anything else..):
http://hg.dovecot.org/dovecot-1.2/rev/99ecc7f748a8



signature.asc
Description: This is a digitally signed message part


[Dovecot] Coredump using virtual folder.

2009-04-07 Thread Matthias Rieber

Hi,

I'm using dovecot 1.2rc2 and I have the following issues with the virtual 
folder:


1. The virtual folders are flagged with \Noselect and at least thunderbird 
does not offer to select them. Adding them to the subscriptions file works 
fine and the folder can be used after that.


2. Two basic virtual work just fine like:

$ cat virtual/all/dovecot-virtual
INBOX
INBOX.Ordner.work.archive.*
  all

and

$ cat virtual/unseen/dovecot-virtual
INBOX
  unseen

But the third one does not work:

$ cat virtual/talk/dovecot-virtual
virtual.all
  inthread x-references2 x-mailbox INBOX

The IMAP Client says Unkown server error, the server logs look like this:

...
dovecot: Info: IMAP(matthias): virtual: data=~/Maildir/virtual
dovecot: Info: IMAP(matthias): fs: root=/home/matthias/Maildir/virtual, index=, 
control=, inbox=
dovecot: Info: IMAP(matthias): Namespace INBOX.: Using permissions from 
/home/matthias/Maildir: mode=0700 gid=-1
access happens here
dovecot: Info: IMAP(matthias): Loading modules from directory: 
/usr/local/lib/dovecot/imap
dovecot: Info: IMAP(matthias): Module loaded: 
/usr/local/lib/dovecot/imap/lib20_fts_plugin.so
dovecot: Info: IMAP(matthias): Module loaded: 
/usr/local/lib/dovecot/imap/lib20_virtual_plugin.so
dovecot: Info: IMAP(matthias): Module loaded: 
/usr/local/lib/dovecot/imap/lib20_zlib_plugin.so
dovecot: Info: IMAP(matthias): Module loaded: 
/usr/local/lib/dovecot/imap/lib21_fts_squat_plugin.so
...

kind regards,

matthias


Re: [Dovecot] Coredump using virtual folder.

2009-04-07 Thread Matthias Rieber


Note: The core dump does not occur anymore. I think I had some weird 
whitespaces in the dovecot-virtual file.


matthias