Bug 149941 - Manual Filtering Crashes Arbitrarily
Summary: Manual Filtering Crashes Arbitrarily
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail
Classification: Applications
Component: IMAP (show other bugs)
Version: 1.9.7
Platform: Fedora RPMs Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2007-09-17 17:08 UTC by Gary Krueger
Modified: 2009-06-15 17:46 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Krueger 2007-09-17 17:08:49 UTC
Version:            (using KDE KDE 3.5.7)
Installed from:    Fedora RPMs
OS:                Linux

I have a collection of dozens of filters (including pipes through perl scripts to add headers that are always applied).  A crash inevitably results after manually applying an arbitrary number of filters.

Typically crashes after 3 to 10 messages.

Rarely can I apply filters to more than a few dozen messages.

If I have 80 messages and apply the filters to a few messages, it is likely to crash.  Sometimes it generates a backtrace.  Sometimes, it just simply disappears.

I receive several dozen messages in a day, and automatic filtering made sorting messages into folders a breeze.

But this bug in conjunction with the following bugs make it nearly a nightmare:

Bug 126182
Bug 135376
Bug 77862

(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1208211760 (LWP 4158)]
[New Thread -1245627504 (LWP 4286)]
[New Thread -1235137648 (LWP 4285)]
[New Thread -1224647792 (LWP 4284)]
[New Thread -1214157936 (LWP 4283)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[KCrash handler]
#6  0x04c47ed5 in KMFolder::folderType () from /usr/lib/libkmailprivate.so
#7  0x04de05fe in KMail::ImapJob::~ImapJob$delete ()
   from /usr/lib/libkmailprivate.so
#8  0x07376488 in QObject::event () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#9  0x0730dbab in QApplication::internalNotify ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#10 0x0730f009 in QApplication::notify ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#11 0x00b1375e in KApplication::notify () from /usr/lib/libkdecore.so.4
#12 0x0730eaa9 in QApplication::sendPostedEvents ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#13 0x0730ec46 in QApplication::sendPostedEvents ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#14 0x072b589d in QEventLoop::processEvents ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#15 0x073270c0 in QEventLoop::enterLoop ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#16 0x07326f76 in QEventLoop::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#17 0x0730d6bf in QApplication::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#18 0x08058585 in QDialog::setGeometry ()
#19 0x472c0f2c in __libc_start_main () from /lib/libc.so.6
#20 0x08057c81 in QDialog::setGeometry ()
Comment 1 Gary Krueger 2007-09-17 17:18:19 UTC
By the way, these are e-mail messages in the KMail component.
Comment 2 Gary Krueger 2007-10-02 00:59:33 UTC
Considering the current state of KMail filters (won't auto filter, crashes on manual filtering), I've found that the half reasonable way to process hundreds of messages through the filters, is to do the following:

Start processing some messages (Ctrl-J), so that you can click on the up arrow next to the download progress bar at the bottom right corner.

Then, hit Ctrl-J once each time you see it transition to showing either zero or one thread boxes.  You don't have to wait until it stabilizes to zero or one thread boxes.  Just wait until it transitions to zero or one thread boxes.

That way, you can manage to process one or two hundred messages before KMail crashes.

Otherwise if you do it any other way, you can expect it to crash typically after processing less than a dozen messages.
Comment 3 Gary Krueger 2007-10-02 20:47:14 UTC
Using this method to circumvent the problem, I've discovered that the filters are generating multiple (2-6) download threads for individual messages.

That is, a message for "V169r6" may appear several times in the list of threads when the up arrow next to the download progress bar is clicked (open).
Comment 4 Gary Krueger 2007-10-02 23:06:40 UTC
Well, I can OFTEN process one or two hundred messages waiting for a zero or one thread box transition.

But, better results can be had by waiting for a zero thread transition.
Comment 5 Gary Krueger 2007-10-03 16:36:30 UTC
My first 2 filters add to the message headers.  The subsequent filters act upon those added message headers.

It appears that the filtering attempts to use multiple threads to process the filters in parallel.  But, reader threads must be blocked while writer threads (such as the Pipe Through action) proceed.  But, this requires knowing which threads are writer threads before starting any threads.

This may be key to solving many of the filtering issues (manual and automatic).
Comment 6 Gary Krueger 2007-10-30 15:52:08 UTC
This issue goes away for me when I downgrade kdepim (kmail) to 1.9.4.
Comment 7 Dominik Tritscher 2009-04-05 14:47:34 UTC
I didn't experienced any problems with filtering using kmail 1.11.90 built from trunk.
Comment 8 Christophe Giboudeaux 2009-06-15 17:46:02 UTC
(In reply to comment #7)
> I didn't experienced any problems with filtering using kmail 1.11.90 built from
> trunk.

Fine, let's close this report then. 

Feel free to open a new report if you experience a similar bug with KMail > 1.11.4