<<< Date Index >>>     <<< Thread Index >>>

imap and large mailboxes



I am trying to open INBOX with 190,000 messages, tag around 8000, and
tagged-copy them to another folder (http).

Without the patch in #3000, mutt(-hg head) and the cyrus imap server
end up stuck both trying to read, because write() wrote fewer bytes
than mutt expected in one go. At this point, one should attempt to
write the remaining bytes rather than give up, which is the nature
of the patch.

Given that communication now works, the next problem is that the
tagged-copy copies far more messages than were actually tagged.
(Need to see whether the UIDs tally...)

Opening mailbox http, I then tag the messages that were copied
unexpectly, tag delete, and expunge them. In this case, imapd.log
says:

Oct 12 13:46:11 quartz master[27376]: about to exec /usr/cyrus/bin/imapd
Oct 12 13:46:11 quartz imap[27376]: executed
Oct 12 13:46:11 quartz imap[27376]: accepted connection
Oct 12 13:46:15 quartz imap[27376]: login: localhost [::1] prlw1 DIGEST-MD5 
User logged in
Oct 12 13:46:16 quartz imap[27376]: seen_db: user prlw1 opened 
/var/imap/user/p/prlw1.seen
Oct 12 13:46:17 quartz imap[27376]: open: user prlw1 opened http
Oct 12 13:54:04 quartz imap[27376]: open: user prlw1 opened http
Oct 12 14:03:52 quartz imap[27376]: Expunged 1 messages from user.prlw1.http
Oct 12 14:12:45 quartz imap[27376]: Expunged 118620 messages from 
user.prlw1.http

yet mutt appears stuck with the message "Expunging messages.." (or whatever).

Connecting gdb to the apparently stuck process says:


0x080ae265 in imap_cmd_step (idata=0xbb77f0c0) at command.c:577
577         if (h->index+1 == expno)
(gdb) bt
#0  0x080ae265 in imap_cmd_step (idata=0xbb77f0c0) at command.c:577
#1  0x080aee51 in imap_exec (idata=0xbb77f0c0, cmdstr=0x80c6a04 "EXPUNGE", 
    flags=0) at command.c:219
#2  0x080b041d in imap_sync_mailbox (ctx=0xbb720680, expunge=1, 
    index_hint=0xbfbfd8f0) at imap.c:1289
#3  0x0807ef7c in mx_sync_mailbox (ctx=0xbb720680, index_hint=0xbfbfd8f0)
    at mx.c:1159
#4  0x0805f94f in mutt_index_menu () at curs_main.c:1023
#5  0x0807627e in main (argc=3, argv=0xbfbfe638) at main.c:1018
(gdb) frame 0
#0  0x080ae265 in imap_cmd_step (idata=0xbb77f0c0) at command.c:577
577         if (h->index+1 == expno)
(gdb) list
572        * nullify the gains */
573       for (cur = 0; cur < idata->ctx->msgcount; cur++)
574       {
575         h = idata->ctx->hdrs[cur];
576     
577         if (h->index+1 == expno)
578           h->index = -1;
579         else if (h->index+1 > expno)
580           h->index--;
581       }
(gdb) print expno
No symbol "expno" in current context.
(gdb) print *h
No symbol "h" in current context.
(gdb) print cur
No symbol "cur" in current context.
...
(gdb) print *idata->ctx
$2 = {path = 0xb3bca040 "imap://localhost/http", fp = 0x0, mtime = 0, 
  size = 1412861299, vsize = 1476107224, pattern = 0x0, limit_pattern = 0x0, 
  hdrs = 0xb3a48000, last_tag = 0x0, tree = 0xba8df2a0, id_hash = 0x0, 
  subj_hash = 0xba8da400, thread_hash = 0xb455d060, v2r = 0xb3b01000, 
  hdrmax = 119528, msgcount = 119502, vcount = 119502, tagged = 0, new = 0, 
  unread = 109933, deleted = 107737, flagged = 0, msgnotreadyet = -1, 
  magic = 5, rights = "�\a", locked = 0, changed = 0, readonly = 0, 
  dontwrite = 0, append = 0, quiet = 0, collapsed = 0, closing = 0, 
  data = 0xbb77f0c0, mx_close = 0x80af97c <imap_close_mailbox>}

at which point, all I can do is kill mutt. The folder is OK, and the messages
did disappear from the disk..

Thoughts?

Cheers,

Patrick