https://bugs.kde.org/show_bug.cgi?id=381696
Bug ID: 381696 Summary: kmail hangs waiting for S/MIME signature verification while trying to compose a reply Product: kmail2 Version: 5.5.2 Platform: Archlinux Packages OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: general Assignee: kdepim-b...@kde.org Reporter: majew...@gmx.net Target Milestone: --- Steps to reproduce: 1. Don't use S/MIME yourself. (Don't know if this is significant, but I only have GPG set up.) 2. Receive a mail that bears an S/MIME signature. 3. Select it in the message list. 4. Click "Reply". 5. Compose reply and click "Send". What should happen: 3. The message should be displayed in the preview pane, probably with a "Not enough information to check validity" frame. 4. The message composer should open immediately. 5. The message should be sent immediately (notwithstanding the GPG confirmation dialogs). What actually happens: 3. It shows a "Please wait while signature is being verified" frame for a suspiciously long time. (I didn't time it exactly, but it's on the order of a full minute.) 4. When I click "Reply" immediately, it will hang for a minute before bringing up the composer. The UI thread will be stuck in the meantime. It doesn't consume CPU, though, so I figured it's stuck in IO wait. Attaching gdb shows a backtrace leading into libgpgme waiting on a select(), see below. 5. Upon sending, I get the same one-minute delay before the GPG-related modal dialogs come up. The bug seems to be limited to S/MIME-signed messages. Replying to PGP-signed messages incurs no such delay. What's noteworthy is that this bug has appeared out of the blue. I checked my pacman.log for recent updates to KMail and GPG, but the last update of GPG was two weeks ago. If it was related to that, I should've noticed it sooner. GPG is version 2.1.21 (libgcrypt 1.7.7). Another thing that I've noticed is that every of the actions 3., 4. and 5. spawns a new `gpgsm --server` process. It seems to be cleaned up when it's finished with not being able to verify the signature, but at various points, I saw 3 or 4 `gpgsm --server` instances in the process listing. ------------------------------------------------------------- Backtrace (sorry for this mess, but this is Arch and I don't want to recompile stuff unless it is really really really needed): (gdb) bt #0 0x00007f70ace11363 in select () at /usr/lib/libc.so.6 #1 0x00007f70955a9769 in () at /usr/lib/libgpgme.so.11 #2 0x00007f70955a4897 in () at /usr/lib/libgpgme.so.11 #3 0x00007f7095584b9e in () at /usr/lib/libgpgme.so.11 #4 0x00007f70955895c8 in gpgme_op_verify () at /usr/lib/libgpgme.so.11 #5 0x00007f70a81f21c1 in GpgME::Context::verifyDetachedSignature(GpgME::Data const&, GpgME::Data const&) () at /usr/lib/libgpgmepp.so.6 #6 0x00007f70a84dbeeb in () at /usr/lib/libqgpgme.so.7 #7 0x00007f70a84dc2fd in QGpgME::QGpgMEVerifyDetachedJob::exec(QByteArray const&, QByteArray const&) () at /usr/lib/libqgpgme.so.7 #8 0x00007f70a7fb451e in () at /usr/lib/libKF5MimeTreeParser.so.5 #9 0x00007f70a7faadae in MimeTreeParser::SignedMessagePart::okVerify(QByteArray const&, QByteArray const&, KMime::Content*) () at /usr/lib/libKF5MimeTreeParser.so.5 #10 0x00007f70a7fab2fd in MimeTreeParser::SignedMessagePart::startVerificationDetached(QByteArray const&, KMime::Content*, QByteArray const&) () at /usr/lib/libKF5MimeTreeParser.so.5 #11 0x00007f70a7f8a39f in () at /usr/lib/libKF5MimeTreeParser.so.5 #12 0x00007f70a7fa25ee in MimeTreeParser::ObjectTreeParser::processType(KMime::Content*, MimeTreeParser::ProcessResult&, QByteArray const&, QByteArray const&, QSharedPointer<MimeTreeParser::Interface::MessagePart>&, bool) () at /usr/lib/libKF5MimeTreeParser.so.5 #13 0x00007f70a7fa3b15 in MimeTreeParser::ObjectTreeParser::parseObjectTreeInternal(KMime::Content*, bool) () at /usr/lib/libKF5MimeTreeParser.so.5 #14 0x00007f70a7fa42f3 in MimeTreeParser::ObjectTreeParser::parseObjectTree(KMime::Content*) () at /usr/lib/libKF5MimeTreeParser.so.5 #15 0x00007f70a9e0c4e4 in TemplateParser::TemplateParserJob::processWithTemplate(QString const&) () at /usr/lib/libKF5TemplateParser.so.5 #16 0x00007f70a9e0fe38 in TemplateParser::TemplateParserJob::process(QSharedPointer<KMime::Message> const&, Akonadi::Collection const&) () at /usr/lib/libKF5TemplateParser.so.5 #17 0x00007f70aa7b1357 in () at /usr/lib/libKF5MessageComposer.so.5 #18 0x00007f70aa7ac20d in MessageComposer::MessageFactoryNG::createReplyAsync() () at /usr/lib/libKF5MessageComposer.so.5 #19 0x00007f70af5e6c0c in () at /usr/lib/libkmailprivate.so.5 #20 0x00007f70af57d9a6 in () at /usr/lib/libkmailprivate.so.5 #21 0x00007f70af57b471 in () at /usr/lib/libkmailprivate.so.5 #22 0x00007f70ad70d57f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/libQt5Core.so.5 #23 0x00007f70af6a73de in () at /usr/lib/libkmailprivate.so.5 ---Type <return> to continue, or q <return> to quit--- #24 0x00007f70af58068b in () at /usr/lib/libkmailprivate.so.5 #25 0x00007f70ad70d57f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/libQt5Core.so.5 #26 0x00007f70aeb4256c in KJob::result(KJob*, KJob::QPrivateSignal) () at /usr/lib/libKF5CoreAddons.so.5 #27 0x00007f70aeb430f1 in KJob::finishJob(bool) () at /usr/lib/libKF5CoreAddons.so.5 #28 0x00007f70a6c93ddf in () at /usr/lib/libKF5AkonadiCore.so.5 #29 0x00007f70ad70de72 in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5 #30 0x00007f70ae40946c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5 #31 0x00007f70ae410cf4 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5 #32 0x00007f70ad6deb98 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5 #33 0x00007f70ad6e102d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5 #34 0x00007f70ad736a63 in () at /usr/lib/libQt5Core.so.5 #35 0x00007f70a08bda47 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0 #36 0x00007f70a08bdc78 in () at /usr/lib/libglib-2.0.so.0 #37 0x00007f70a08bdd0c in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0 #38 0x00007f70ad736e7f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5 #39 0x00007f70ad6dd21a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5 #40 0x00007f70ad6e5a74 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5 #41 0x00000000004036e5 in () #42 0x00007f70acd4c43a in __libc_start_main () at /usr/lib/libc.so.6 #43 0x000000000040381a in _start () -- You are receiving this mail because: You are watching all bug changes.