Bug 94333 - Crash in combination with a cancelled pinentry-qt and incoming mail
Summary: Crash in combination with a cancelled pinentry-qt and incoming mail
Status: RESOLVED DUPLICATE of bug 92737
Alias: None
Product: kmail
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 93976 106484 109454 110266 111702 118214 120142 131654 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-03 16:25 UTC by Malte S. Stretz
Modified: 2007-09-14 12:17 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
KMail/gdb output (9.96 KB, text/plain)
2005-01-12 13:49 UTC, Malte S. Stretz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Malte S. Stretz 2004-12-03 16:25:04 UTC
Version:           1.7.2 (using KDE 3.3.2, Gentoo)
Compiler:          gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)
OS:                Linux (i686) release 2.6.8-gentoo-r3

KMail (KDE_3_3_BRANCH from yesterday) just crashed, it all went pretty fast so I don't know what actually triggered it.  What happened was this:

1. I accidently selected an GPG-encrypted mail in my inbox so the pinentry-qt window popped up.
2. I didn't want to decrypt that mail so I tried to click Cancel.
3. In between the mail fetch interval kicked in and KMail was frozen because SpamAssassin checked a mail.
4. When KMail wasn't frozen anymore, I noticed that for some reason I typed two chars in the pinentry.  I clicked Cancel nevertheless again.
5. That stupid dialog popped up which told me that I entered a wrong password [sic] and asked me if I wanted to try again.  I clicked Cancel here, too.
6. KMail crashed.


Backtrace:
Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 8726)]
[KCrash handler]
#5  0x403f0fe7 in partNode::processed() const (this=0x22222222)
    at partNode.h:229
#6  0x403e251f in KMail::ObjectTreeParser::parseObjectTree(partNode*) (
    this=0xbfffe6c0, node=0x8b4bd68) at objecttreeparser.cpp:238
#7  0x402beba2 in KMReaderWin::parseMsg(KMMessage*) (this=0x850e040, 
    aMsg=0x9050f80) at kmreaderwin.cpp:1217
#8  0x402be530 in KMReaderWin::displayMessage() (this=0x850e040)
    at kmreaderwin.cpp:1152
#9  0x402be14a in KMReaderWin::updateReaderWin() (this=0x850e040)
    at kmreaderwin.cpp:1094
#10 0x402c4bd4 in KMReaderWin::qt_invoke(int, QUObject*) (this=0x850e040, 
    _id=47, _o=0xbfffea50) at kmreaderwin.moc:261
#11 0x42629fcc in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#12 0x42629df4 in QObject::activate_signal(int) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#13 0x4296ae1b in QTimer::timeout() () from /usr/qt/3/lib/libqt-mt.so.3
#14 0x4264b7a2 in QTimer::event(QEvent*) () from /usr/qt/3/lib/libqt-mt.so.3
#15 0x425cdb8f in QApplication::internalNotify(QObject*, QEvent*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#16 0x425ccef5 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#17 0x4205fe7b in KApplication::notify(QObject*, QEvent*) (this=0xbffff1c0, 
    receiver=0x850e0f0, event=0xbfffeea0) at kapplication.cpp:495
#18 0x425bd1f5 in QEventLoop::activateTimers() ()
   from /usr/qt/3/lib/libqt-mt.so.3
#19 0x42577aab in QEventLoop::processEvents(unsigned) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#20 0x425dfd58 in QEventLoop::enterLoop() () from /usr/qt/3/lib/libqt-mt.so.3
#21 0x425dfc08 in QEventLoop::exec() () from /usr/qt/3/lib/libqt-mt.so.3
#22 0x425cdde1 in QApplication::exec() () from /usr/qt/3/lib/libqt-mt.so.3
#23 0x0804ab7b in main (argc=572662306, argv=0x22222222) at main.cpp:108
Comment 1 Malte S. Stretz 2004-12-03 16:32:28 UTC
Hmm... this is reproducable (still have to find out how) and fetching mail was not involved.  The pinentry-qt was blocked for some other reason.
Comment 2 Malte S. Stretz 2004-12-03 16:42:07 UTC
The pinentry just looked blocked because I somehow gave the focus back to KMail which was blocked by the pinentry so it looked like the pinetry dialog was still in front which was actually just a missing redraw (if you understand what I mean :).  The pinetry dialog was behind the KMail window but got all keystrokes (the + I typed to view the next unread message).

I could reproduce it twice, but now I can't again -- the reason might be that one needs some special way to hit the encrypted mail (like deleting the preceding one).  No idea but somewhere there seems to be a race condition...
Comment 3 Till Adam 2005-01-02 17:42:52 UTC
Malte, any more insights on this? Are you manage to reproduce it? If so, could you valgrind the crash, maybe?
Comment 4 Stephan Binner 2005-01-05 15:49:40 UTC
Happened just for me too with KDE_3_3_BRANCH, here it looks like:

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 5543)]
[KCrash handler]
#5  0x4035235a in KMail::ObjectTreeParser::parseObjectTree ()
    at partnodebodypart.cpp:43
#6  0x4026ecc8 in KMReaderWin::parseMsg () at new:91
#7  0x40268620 in KMReaderWin::displayMessage () at new:91
#8  0x402687bd in KMReaderWin::updateReaderWin () at new:91
#9  0x40268c98 in KMReaderWin::qt_invoke () at new:91
#10 0x41a918a9 in QObject::activate_signal ()
   from /usr/src/qt-copy/lib/libqt-mt.so.3
#11 0x41a91f4b in QObject::activate_signal ()
   from /usr/src/qt-copy/lib/libqt-mt.so.3
#12 0x41daaaa5 in QTimer::timeout () from /usr/src/qt-copy/lib/libqt-mt.so.3
#13 0x41ab3a87 in QTimer::event () from /usr/src/qt-copy/lib/libqt-mt.so.3
#14 0x41a33e04 in QApplication::internalNotify ()
   from /usr/src/qt-copy/lib/libqt-mt.so.3
#15 0x41a3571d in QApplication::notify ()
   from /usr/src/qt-copy/lib/libqt-mt.so.3
#16 0x415e46aa in KApplication::notify () from /opt/kde-3.3/lib/libkdecore.so.4
#17 0x41a28c55 in QEventLoop::activateTimers ()
   from /usr/src/qt-copy/lib/libqt-mt.so.3
#18 0x419e4cc4 in QEventLoop::processEvents ()
   from /usr/src/qt-copy/lib/libqt-mt.so.3
#19 0x41a4a1fa in QEventLoop::enterLoop ()
   from /usr/src/qt-copy/lib/libqt-mt.so.3
#20 0x41a4a054 in QEventLoop::exec () from /usr/src/qt-copy/lib/libqt-mt.so.3
#21 0x41a35600 in QApplication::exec () from /usr/src/qt-copy/lib/libqt-mt.so.3
#22 0x0804aa13 in main (argc=3, argv=0xbffff014) at main.cpp:108
Comment 5 Stephan Binner 2005-01-05 15:50:20 UTC
*** Bug 93976 has been marked as a duplicate of this bug. ***
Comment 6 Malte S. Stretz 2005-01-12 13:49:10 UTC
Created attachment 9050 [details]
KMail/gdb output

Running KMail under valgrind is simply impossible on my box, but I found a way
to reproduce this reliably.  Attached is the debug output of KMail running
under gdb.  I did the following:

0.  Seems like the gpg-agent died before for some reason, at least was the
$GPG_AGENT_INFO pointing to the wrong place.  So kill your gpg-agent for
easiest reproducing.

1.  Started up KMail.  There was a mail selected which had neither a PGP
signature nor was it encrypted (line 36).

2.  Selected an encrypted mail (line 87).  The gpg-agent wasn't around (line
113), so I got the dialog telling me "You just entered an invalid passphrase.
Do you want to try again, or cancel and view the message undecrypted?".  KEEP
THAT DIALOG OPEN.

3.  Selected another mail which also didn't show any PGP traces (line 125). 
Waited till that message was displayed (line 152).

4.  Pressed "Cancel" in the still-visible wrong-passphrase-confirmation-dialog:
 Boom!

So the analysis from bug 93976 seems to point to the right direction:  KMail
tries to process a message which isn't shown anymore.
Comment 7 Michaela Buesing 2005-10-08 02:53:03 UTC
Happens here too, without SpamAssasin and without entering anything into pinentry-qt.
Comment 8 Andreas Kling 2006-08-01 14:50:23 UTC
*** Bug 106484 has been marked as a duplicate of this bug. ***
Comment 9 Andreas Kling 2006-08-01 14:50:43 UTC
*** Bug 110266 has been marked as a duplicate of this bug. ***
Comment 10 Andreas Kling 2006-08-01 14:51:51 UTC
*** Bug 109454 has been marked as a duplicate of this bug. ***
Comment 11 Andreas Kling 2006-08-01 14:52:21 UTC
*** Bug 111702 has been marked as a duplicate of this bug. ***
Comment 12 Andreas Kling 2006-08-01 14:53:08 UTC
*** Bug 120142 has been marked as a duplicate of this bug. ***
Comment 13 Andreas Kling 2006-08-01 14:55:40 UTC
*** Bug 131654 has been marked as a duplicate of this bug. ***
Comment 14 Andreas Kling 2006-08-01 14:55:51 UTC
*** Bug 118214 has been marked as a duplicate of this bug. ***
Comment 15 Andreas Kling 2006-08-01 14:57:30 UTC
Moving this to 92737, since it has more votes.

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