Bug 449891

Summary: kmail crashes on startup
Product: [Applications] kmail2 Reporter: forenkram
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: crash CC: abolte, demm, kde.org, kde, kdebugs, sam, trkhmchk
Priority: NOR Keywords: drkonqi
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: New crash information added by DrKonqi

Description forenkram 2022-02-09 20:52:49 UTC
Application: kmail (5.19.2 (21.12.2))

Qt Version: 5.15.2
Frameworks Version: 5.90.0
Operating System: Linux 5.16.8-arch1-1 x86_64
Windowing System: X11
Distribution: "Arch Linux"
DrKonqi: 5.24.0 [KCrashBackend]

-- Information about the crash:
- What I was doing when the application crashed:
fresh startup. kmail crashes. Kontact as well. (might be unrelated: yakuake does not respect shortcut anymore. )
Thought this was due to using wayland, but it happens on X11 as well

The crash can be reproduced every time.

-- Backtrace:
Application: KMail (kmail), signal: Segmentation fault

[KCrash Handler]
#4  std::__atomic_base<int>::load(std::memory_order) const (__m=std::memory_order_relaxed, this=0x8) at /usr/include/qt/QtCore/qrefcount.h:54
#5  QAtomicOps<int>::loadRelaxed<int>(std::atomic<int> const&) (_q_value=...) at /usr/include/qt/QtCore/qatomic_cxx11.h:239
#6  QBasicAtomicInteger<int>::loadRelaxed() const (this=0x8) at /usr/include/qt/QtCore/qbasicatomic.h:107
#7  QtPrivate::RefCount::ref() (this=0x8) at /usr/include/qt/QtCore/qrefcount.h:55
#8  QString::QString(QString const&) (this=0x7ffd3d427de0, other=..., this=<optimized out>, other=<optimized out>) at /usr/include/qt/QtCore/qstring.h:1094
#9  0x00007f6795a61b86 in std::_Head_base<3ul, QString, false>::_Head_base(QString const&) (__h=..., this=0x7ffd3d427de0, this=<optimized out>, __h=<optimized out>) at /usr/include/c++/11.1.0/tuple:182
#10 std::_Tuple_impl<3ul, QString, QString>::_Tuple_impl(QString const&, QString const&) (__tail#0=<optimized out>, __head=..., this=0x7ffd3d427dd8) at /usr/include/c++/11.1.0/tuple:270
#11 std::_Tuple_impl<2ul, QString, QString, QString>::_Tuple_impl(QString const&, QString const&, QString const&) (__tail#1=<optimized out>, __tail#0=..., __head=..., this=0x7ffd3d427dd8) at /usr/include/c++/11.1.0/tuple:270
#12 std::_Tuple_impl<1ul, GpgME::Key, QString, QString, QString>::_Tuple_impl(GpgME::Key const&, QString const&, QString const&, QString const&) (__tail#2=<optimized out>, __tail#1=..., __tail#0=..., __head=..., this=0x7ffd3d427dd8) at /usr/include/c++/11.1.0/tuple:270
#13 std::_Tuple_impl<0ul, std::_Placeholder<1>, GpgME::Key, QString, QString, QString>::_Tuple_impl(std::_Placeholder<1> const&, GpgME::Key const&, QString const&, QString const&, QString const&) (__tail#3=<optimized out>, __tail#2=..., __tail#1=..., __tail#0=..., __head=<optimized out>, this=0x7ffd3d427dd8) at /usr/include/c++/11.1.0/tuple:270
#14 std::tuple<std::_Placeholder<1>, GpgME::Key, QString, QString, QString>::tuple<true, true>(std::_Placeholder<1> const&, GpgME::Key const&, QString const&, QString const&, QString const&) (__elements#4=<optimized out>, __elements#3=..., __elements#2=..., __elements#1=..., __elements#0=<optimized out>, this=0x7ffd3d427dd8) at /usr/include/c++/11.1.0/tuple:719
#15 std::_Bind<std::tuple<GpgME::Error, QString, GpgME::Error> (*(std::_Placeholder<1>, GpgME::Key, QString, QString, QString))(GpgME::Context*, GpgME::Key const&, QString const&, QString const&, QString const&)>::_Bind<std::_Placeholder<1> const&, GpgME::Key const&, QString const&, QString const&, QString const&>(std::tuple<GpgME::Error, QString, GpgME::Error> (*&&)(GpgME::Context*, GpgME::Key const&, QString const&, QString const&, QString const&), std::_Placeholder<1> const&, GpgME::Key const&, QString const&, QString const&, QString const&) (__f=<optimized out>, this=<optimized out>) at /usr/include/c++/11.1.0/functional:490
#16 std::bind<std::tuple<GpgME::Error, QString, GpgME::Error> (*)(GpgME::Context*, GpgME::Key const&, QString const&, QString const&, QString const&), std::_Placeholder<1> const&, GpgME::Key const&, QString const&, QString const&, QString const&>(std::tuple<GpgME::Error, QString, GpgME::Error> (*&&)(GpgME::Context*, GpgME::Key const&, QString const&, QString const&, QString const&), std::_Placeholder<1> const&, GpgME::Key const&, QString const&, QString const&, QString const&) (__f=<optimized out>) at /usr/include/c++/11.1.0/functional:793
#17 QGpgME::QGpgMEAddUserIDJob::start(GpgME::Key const&, QString const&, QString const&, QString const&) (this=0x559466632040, key=..., name=..., email=..., comment=<optimized out>) at /build/gpgme/src/gpgme-1.17.0/lang/qt/src/qgpgmeadduseridjob.cpp:82
#18 0x00007f67a0121059 in KMComposerWin::slotRecipientAdded(MessageComposer::RecipientLineNG*) (this=0x559465515c30, line=<optimized out>) at /usr/src/debug/kmail-21.12.2/src/editor/kmcomposerwin.cpp:3776
#19 0x00007f6797257d93 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffd3d428040, r=<optimized out>, this=0x5594664ec9e0, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#20 doActivate<false>(QObject*, int, void**) (sender=0x559465ebd150, signal_index=15, argv=0x7ffd3d428040) at kernel/qobject.cpp:3886
#21 0x00007f67963de364 in MessageComposer::RecipientLineNG::analyzeLine(QString const&) (this=0x559465ebd150, text=<optimized out>) at /usr/src/debug/messagelib-21.12.2/messagecomposer/src/recipient/recipientline.cpp:120
#22 0x00007f6797257d93 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffd3d428190, r=<optimized out>, this=0x559465ed4b20, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#23 doActivate<false>(QObject*, int, void**) (sender=0x559465ebe900, signal_index=7, argv=0x7ffd3d428190) at kernel/qobject.cpp:3886
#24 0x00007f6797dd0ef7 in QLineEdit::textChanged(QString const&) (this=<optimized out>, _t1=<optimized out>) at .moc/moc_qlineedit.cpp:447
#25 0x00007f6797257ddf in doActivate<false>(QObject*, int, void**) (sender=0x559465e64b60, signal_index=6, argv=0x7ffd3d428290) at kernel/qobject.cpp:3898
#26 0x00007f6797ddc1fa in QWidgetLineControl::textChanged(QString const&) (this=this@entry=0x559465e64b60, _t1=...) at .moc/moc_qwidgetlinecontrol_p.cpp:273
#27 0x00007f6797ddfeb1 in QWidgetLineControl::finishChange(int, bool, bool) (this=0x559465e64b60, validateFromState=1027769040, update=<optimized out>, edited=<optimized out>) at widgets/qwidgetlinecontrol.cpp:736
#28 0x00007f6797de0199 in QWidgetLineControl::internalSetText(QString const&, int, bool) (this=0x559465e64b60, txt=..., pos=-1, edited=<optimized out>) at widgets/qwidgetlinecontrol.cpp:772
#29 0x00007f6795e35c39 in PimCommon::AddresseeLineEdit::setText(QString const&) (this=0x559465ebe900, text=...) at /usr/src/debug/pimcommon-21.12.2/src/pimcommonakonadi/addressline/addresslineedit/addresseelineedit.cpp:249
#30 0x00007f67963db8af in MessageComposer::RecipientLineNG::fieldsFromData() (this=0x559465ebd150) at /usr/src/debug/messagelib-21.12.2/messagecomposer/src/recipient/recipientline.cpp:169
#31 0x00007f67963db9de in MessageComposer::RecipientLineNG::setData(QSharedPointer<KPIM::MultiplyingLineData> const&) (this=0x559465ebd150, data=<optimized out>) at /usr/src/debug/messagelib-21.12.2/messagecomposer/src/recipient/recipientline.cpp:135
#32 0x00007f6795661235 in KPIM::MultiplyingLineEditor::addData(QSharedPointer<KPIM::MultiplyingLineData> const&, bool) (this=this@entry=0x559465e8ba00, data=..., showDialogBox=showDialogBox@entry=false) at /usr/src/debug/libkdepim-21.12.2/src/libkdepim/multiplyingline/multiplyinglineeditor.cpp:50
#33 0x00007f67963dc133 in MessageComposer::RecipientsEditor::addRecipient(QString const&, MessageComposer::Recipient::Type) (this=0x559465e8ba00, recipient=..., type=MessageComposer::Recipient::ReplyTo) at /usr/src/debug/messagelib-21.12.2/messagecomposer/src/recipient/recipientseditor.cpp:102
#34 0x00007f67963e0cd5 in MessageComposer::RecipientsEditor::setRecipientString(QVector<KMime::Types::Mailbox> const&, MessageComposer::Recipient::Type) (this=0x559465e8ba00, mailboxes=..., type=MessageComposer::Recipient::ReplyTo) at /usr/src/debug/messagelib-21.12.2/messagecomposer/src/recipient/recipientseditor.cpp:124
#35 0x00007f67963b91f0 in MessageComposer::ComposerViewBase::setMessage(QSharedPointer<KMime::Message> const&, bool) (this=0x5594656d86f0, msg=..., allowDecryption=allowDecryption@entry=false) at /usr/src/debug/messagelib-21.12.2/messagecomposer/src/composer/composerviewbase.cpp:123
#36 0x00007f67a0112180 in KMComposerWin::setMessage(QSharedPointer<KMime::Message> const&, bool, bool, bool, bool, bool) (this=0x559465515c30, newMsg=..., lastSignState=<optimized out>, lastEncryptState=<optimized out>, mayAutoSign=<optimized out>, allowDecryption=<optimized out>, isModified=false) at /usr/src/debug/kmail-21.12.2/src/editor/kmcomposerwin.cpp:1777
#37 0x00007f67a015c1fe in KMKernel::recoverDeadLetters() (this=this@entry=0x7ffd3d428e30) at /usr/src/debug/kmail-21.12.2/src/kmkernel.cpp:1068
#38 0x00005594645830eb in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kmail-21.12.2/src/main.cpp:164
[Inferior 1 (process 4491) detached]

The reporter indicates this bug may be a duplicate of or related to bug 425805.

Possible duplicates by query: bug 427411, bug 425805, bug 423904, bug 421432, bug 419785.

Reported using DrKonqi
Comment 1 sedrubal 2022-02-09 23:30:35 UTC
Created attachment 146507 [details]
New crash information added by DrKonqi

kmail (5.19.2 (21.12.2)) using Qt 5.15.2

- What I was doing when the application crashed:
This issue seems to be the cause of the crash described in Bug 449898, which results in corrupt data.

-- Backtrace (Reduced):
#4  std::__atomic_base<int>::load(std::memory_order) const (__m=std::memory_order_relaxed, this=0x8) at /usr/include/qt/QtCore/qrefcount.h:54
#5  QAtomicOps<int>::loadRelaxed<int>(std::atomic<int> const&) (_q_value=...) at /usr/include/qt/QtCore/qatomic_cxx11.h:239
#6  QBasicAtomicInteger<int>::loadRelaxed() const (this=0x8) at /usr/include/qt/QtCore/qbasicatomic.h:107
[...]
#8  QString::QString(QString const&) (this=0x7ffd48a7db20, other=..., this=<optimized out>, other=<optimized out>) at /usr/include/qt/QtCore/qstring.h:1094
#9  0x00007fcde918eb86 in std::_Head_base<3ul, QString, false>::_Head_base(QString const&) (__h=..., this=0x7ffd48a7db20, this=<optimized out>, __h=<optimized out>) at /usr/include/c++/11.1.0/tuple:182
Comment 2 tjbp 2022-02-10 12:52:57 UTC
Am also experiencing this and the subsequent corruption of data detailed in #449898
Comment 3 demm 2022-02-12 16:26:25 UTC
Seems a duplicate of https://bugs.kde.org/show_bug.cgi?id=449826
Issue is with gpgme 1.17.0.
Comment 4 demm 2022-02-12 20:35:03 UTC
For KaOS, this was fixed by rebuilding libkleo, messagelib, kleopatra, akonadi-contacts, pimcommon, kontact & kmail with gpgme 1.17.0, so a downstream issue.
Comment 5 Sam James 2022-02-14 21:14:03 UTC
(In reply to demm from comment #4)
> For KaOS, this was fixed by rebuilding libkleo, messagelib, kleopatra,
> akonadi-contacts, pimcommon, kontact & kmail with gpgme 1.17.0, so a
> downstream issue.

I've reported this issue upstream at https://dev.gnupg.org/T5834.

(Also downstream in Gentoo: https://bugs.gentoo.org/833355).
Comment 6 Artem Trokhymchuk 2022-09-16 20:59:40 UTC
*** Bug 459236 has been marked as a duplicate of this bug. ***