Bug 123804 - Large Maildir folders take extremely long time to delete messages
Summary: Large Maildir folders take extremely long time to delete messages
Status: RESOLVED DUPLICATE of bug 87857
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
Depends on:
Reported: 2006-03-17 20:42 UTC by Bob Tanner
Modified: 2007-09-14 12:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Bob Tanner 2006-03-17 20:42:47 UTC
Version:           3.5.1 (using KDE KDE 3.5.1)
Installed from:    Debian testing/unstable Packages
Compiler:          gcc 4.0.2 
OS:                Linux

I routinely get 10,000+ spam message filtered into my Maildir spam folder. Selecting all the message and shift-delete causes kmail large CPU utilization and can take hours to complete.

Similar operations on the same folder using Thunderbird and mutt take minutes.

I'm running kmail as a kpart in kontact, if that matters. But stand-alone kmail does the same thing.

 4775 tanner    25   0  146m  96m  31m R 89.8  9.5  45:24.63 kontact

strace on the pid shows (over 5 min period)
$ strace -p 4775
Process 4775 attached - interrupt to quit
gettimeofday({1142624313, 174935}, NULL) = 0
gettimeofday({1142624313, 181478}, NULL) = 0
gettimeofday({1142624313, 183122}, NULL) = 0
gettimeofday({1142624313, 188823}, NULL) = 0
gettimeofday({1142624313, 189389}, NULL) = 0
gettimeofday({1142624317, 955773}, NULL) = 0
gettimeofday({1142624317, 957834}, NULL) = 0
[snip repeats]

Killing kontact with segfault to get a bt is attached

$ kill -s SIGSEGV 4775
Using host libthread_db library "/lib/tls/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1241418048 (LWP 4775)]
[New Thread -1279562832 (LWP 4929)]
[New Thread -1271174224 (LWP 4928)]
[New Thread -1262785616 (LWP 4927)]
[New Thread -1254397008 (LWP 4926)]
[KCrash handler]
#5  0xb718d2cc in QListViewItem::itemAbove (this=0x9e37ed0)
    at widgets/qlistview.cpp:3920
#6  0xb56b2fba in KMHeaders::prepareMove (this=0x88af6e8, contentX=0x85, 
    at /tmp/buildd/kdepim-3.5.1/build-tree/kdepim-3.5.1/kmail/kmheaders.cpp:1442
#7  0xb56c25be in KMHeaders::msgRemoved (this=0x88af6e8, id=6090, 
    at /tmp/buildd/kdepim-3.5.1/build-tree/kdepim-3.5.1/kmail/kmheaders.cpp:1126
#8  0xb56c38c9 in KMHeaders::qt_invoke (this=0x88af6e8, _id=113, 
    _o=0xbfafc9f0) at kmheaders.moc:301
#9  0xb709c7ff in QObject::activate_signal (this=0x8657a78, clist=0x8a502e8, 
    o=0xbfafc9f0) at kernel/qobject.cpp:2356
#10 0xb56f2c0f in KMFolder::msgRemoved (this=0x8657a78, t0=162674712, 
    t1=@0x9b23818) at kmfolder.moc:254
#11 0xb56f6b9d in KMFolder::qt_emit (this=0x8657a78, _id=9, _o=0xbfafcae0)
    at kmfolder.moc:381
#12 0xb709c7d3 in QObject::activate_signal (this=0x8657bc8, clist=0x8658720, 
    o=0xbfafcae0) at kernel/qobject.cpp:2354
#13 0xb571072f in FolderStorage::msgRemoved (this=0x8657bc8, t0=162674712, 
    t1=@0x9b23818) at folderstorage.moc:320
#14 0xb5712051 in FolderStorage::removeMsg (this=0x8657bc8, idx=6090)
    at /tmp/buildd/kdepim-3.5.1/build-tree/kdepim-3.5.1/kmail/folderstorage.cpp:403
#15 0xb57a2394 in KMFolderImap::removeMsg (this=0x8657bc8, 
    msgList=@0xbfafcc70, quiet=false)
    at /tmp/buildd/kdepim-3.5.1/build-tree/kdepim-3.5.1/kmail/kmfolderimap.cpp:286
#16 0xb56f18c6 in KMFolder::removeMsg (this=0x9b23818, msgList=@0x9b23818, 
    at /tmp/buildd/kdepim-3.5.1/build-tree/kdepim-3.5.1/kmail/kmfolder.cpp:407
#17 0xb583a8cd in KMMoveCommand::execute (this=0x9bd4238)
    at /tmp/buildd/kdepim-3.5.1/build-tree/kdepim-3.5.1/kmail/kmcommands.cpp:1965
#18 0xb582cdab in KMCommand::slotPostTransfer (this=0x9bd4238, 
    at /tmp/buildd/kdepim-3.5.1/build-tree/kdepim-3.5.1/kmail/kmcommands.cpp:255
#19 0xb58333b6 in KMCommand::qt_invoke (this=0x9bd4238, _id=5, _o=0xbfafcdd4)
    at kmcommands.moc:148
#20 0xb58336ab in KMMenuCommand::qt_invoke (this=0x9b23818, _id=162674712, 
    _o=0x9b23818) at kmcommands.moc:2436
#21 0xb5833743 in KMMoveCommand::qt_invoke (this=0x9bd4238, _id=5, 
    _o=0xbfafcdd4) at kmcommands.moc:2619
#22 0xb709c7ff in QObject::activate_signal (this=0x9bd4238, clist=0xa0b1fd8, 
    o=0xbfafcdd4) at kernel/qobject.cpp:2356
#23 0xb582bab2 in KMCommand::messagesTransfered (this=0x9bd4238, 
    t0=KMCommand::OK) at kmcommands.moc:126
#24 0xb5832f1d in KMCommand::transferSelectedMsgs (this=0x9bd4238)
    at /tmp/buildd/kdepim-3.5.1/build-tree/kdepim-3.5.1/kmail/kmcommands.cpp:350
#25 0xb5833187 in KMCommand::slotStart (this=0x9bd4238)
    at /tmp/buildd/kdepim-3.5.1/build-tree/kdepim-3.5.1/kmail/kmcommands.cpp:247
#26 0xb58333c8 in KMCommand::qt_invoke (this=0x9bd4238, _id=4, _o=0xbfafcf58)
    at kmcommands.moc:147
#27 0xb58336ab in KMMenuCommand::qt_invoke (this=0x9b23818, _id=162674712, 
    _o=0x9b23818) at kmcommands.moc:2436
#28 0xb5833743 in KMMoveCommand::qt_invoke (this=0x9bd4238, _id=4, 
    _o=0xbfafcf58) at kmcommands.moc:2619
#29 0xb709c7ff in QObject::activate_signal (this=0x8158c58, clist=0x9cac458, 
    o=0xbfafcf58) at kernel/qobject.cpp:2356
#30 0xb742a421 in QSignal::signal (this=0x8158c58, t0=@0x8158c80)
    at .moc/debug-shared-mt/moc_qsignal.cpp:100
#31 0xb70b9eec in QSignal::activate (this=0x8158c58) at kernel/qsignal.cpp:212
#32 0xb70c19b0 in QSingleShotTimer::event (this=0x8158c30)
    at kernel/qtimer.cpp:286
#33 0xb7033122 in QApplication::internalNotify (this=0xbfafd580, 
    receiver=0x8158c30, e=0xbfafd2c8) at kernel/qapplication.cpp:2635
#34 0xb7033314 in QApplication::notify (this=0xbfafd580, receiver=0x8158c30, 
    e=0xbfafd2c8) at kernel/qapplication.cpp:2358
#35 0xb7736fde in KApplication::notify (this=0xbfafd580, receiver=0x8158c30, 
    event=0xbfafd2c8) at kapplication.cpp:550
#36 0xb6fc4861 in QApplication::sendEvent (receiver=0x8158c30, 
    event=0xbfafd2c8) at qapplication.h:520
#37 0xb7024bad in QEventLoop::activateTimers (this=0x80ba658)
    at kernel/qeventloop_unix.cpp:556
#38 0xb6fd8566 in QEventLoop::processEvents (this=0x80ba658, flags=4)
    at kernel/qeventloop_x11.cpp:389
#39 0xb704bb01 in QEventLoop::enterLoop (this=0x80ba658)
    at kernel/qeventloop.cpp:198
#40 0xb704ba26 in QEventLoop::exec (this=0x80ba658)
    at kernel/qeventloop.cpp:145
#41 0xb7031c35 in QApplication::exec (this=0xbfafd580)
    at kernel/qapplication.cpp:2758
#42 0x0805ae7b in main (argc=162674712, argv=0x9b23818) at main.cpp:177
#43 0xb77fbeb0 in __libc_start_main () from /lib/tls/libc.so.6
#44 0x08058561 in _start () at ../sysdeps/i386/elf/start.S:119

Other potentially related bugs:
Bug: #96651
Comment 1 Ruben Alfonsin 2006-12-05 01:55:43 UTC
It happens to me the same having less than 500 mail total.
It last about 40 seconds to delete just one.
It is becoming unusable.
KMail version 1.9.1 on kontact 1.2 under kubuntu 6.06
Comment 2 Andreas Gungl 2006-12-05 08:59:11 UTC

*** This bug has been marked as a duplicate of 87857 ***