Bug 3065

Summary: Crash loading large INBOX from Dovecot IMAP server
Product: Claws Mail (GTK 2) Reporter: Bart Schaefer <barton.schaefer>
Component: Folders/IMAPAssignee: users
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 3.9.3   
Hardware: PC   
OS: Linux   

Description Bart Schaefer 2014-01-23 07:42:36 UTC
[Data here was collected from version 3.8.0, but the same problem occurs after upgrading to 3.9.3]

Opening large (7000+ messages, but reviews on Ubuntu software center say similar things happen with as few as 1000) IMAP INBOX.  This is a very old folder (messages from as long ago as 1999) with thousands of additions/deletions every day, and probably has *very* large UID values, in case that is pertinent.

Network log output shows lots of 1024-byte FETCHes followed by one smaller FETCH (unable to cut/paste log due to hang/crash).

Claws consumes 99% of CPU for several minutes after the network log stops updating, then crashes.

ltrace during the hang shows it doing this repeatedly:

g_int_hash(0x7fff63461e7c, 0x7fff63461e7c, 2262, 8, 0x66a8c0) = 0x7fffffff
<... g_hash_table_lookup resumed> )              = 0
strrchr("folder.c", '/')                         = NULL
g_hash_table_lookup(0x11a7d20, 0x7fff63461e7c, 2262, 8, 0x66a8c0 <unfinished ...>
g_int_hash(0x7fff63461e7c, 0x7fff63461e7c, 2262, 8, 0x66a8c0) = 0x7fffffff
<... g_hash_table_lookup resumed> )              = 0
strrchr("folder.c", '/')                         = NULL
g_hash_table_lookup(0x11a7d20, 0x7fff63461e7c, 2262, 8, 0x66a8c0 <unfinished ...>
g_int_hash(0x7fff63461e7c, 0x7fff63461e7c, 2262, 8, 0x66a8c0) = 0x7fffffff
<... g_hash_table_lookup resumed> )              = 0
strrchr("folder.c", '/')                         = NULL
g_hash_table_lookup(0x11a7d20, 0x7fff63461e7c, 2262, 8, 0x66a8c0 <unfinished ...>

If Alpine can be believed, the text "folder.c" does not appear anywhere in the folder in question, so I suspect that strrchr() is being called on random data from a pointer gone astray.

Ubuntu error report dialog says "crashed with signal 5 in msgcache_remove_msg()".   Called from folder_item_scan_full() from folder_item_open().

Ubuntu 12.04.