Bug 242670 - security/kleopatra: crashing
Summary: security/kleopatra: crashing
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: kde
URL: https://bugs.kde.org/show_bug.cgi?id=...
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-16 19:24 UTC by Gerard Seibert
Modified: 2020-01-03 20:06 UTC (History)
2 users (show)

See Also:
tcberner: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gerard Seibert 2019-12-16 19:24:04 UTC
Kleopatra: Version 3.1.8 (19.12.0)

Operating System: FreeBSD 11.3
KDE Plasma Version: 5.17.4
KDE Frameworks Version: 5.64.0
Qt Version: 5.13.2
Kernel Version: 11.3-RELEASE-p5
OS Type: 64-bit
Processors: 4 × ACPI CPU
Memory: 31.7 GiB of RAM

When I open Kleopatra and right-click on an identity, all of the options are greyed out.  If I click on "Lookup on server" and start to enter anything in the "Find" box, the program immediately crashes.

I have tried removing, rebuilding and reinstalling Kleopatra but with negative results. Interestingly enough, "KGpg" works fine.
[reply] [−]Comment 1Gerard Seibert 2019-12-15 10:01:51 UTC
I rebuild kleopatra with debug symbols. This is the output when run under 'gdb' when it crashes.

GNU gdb (GDB) 8.3.1 [GDB v8.3.1 for FreeBSD]
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd11.3".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from kleopatra...
run(gdb) run
Starting program: /usr/local/bin/kleopatra 
[New LWP 100796 of process 85700]
[New LWP 100797 of process 85700]
[Detaching after fork from child process 85701]
[Detaching after fork from child process 85702]
[Detaching after fork from child process 85703]
[Detaching after fork from child process 85705]
[Detaching after fork from child process 85707]
[Detaching after fork from child process 85709]
[Detaching after fork from child process 85711]
[Detaching after fork from child process 85713]
[Detaching after fork from child process 85714]
[Detaching after fork from child process 85716]
[Detaching after fork from child process 85719]
[Detaching after fork from child process 85722]
[Detaching after fork from child process 85725]
[Detaching after fork from child process 85728]
[Detaching after fork from child process 85731]
[New LWP 100799 of process 85700]
[New LWP 100801 of process 85700]
[Detaching after fork from child process 85733]
[LWP 100801 of process 85700 exited]
[New LWP 100802 of process 85700]
[New LWP 100803 of process 85700]
[Detaching after fork from child process 85735]
[Detaching after fork from child process 85737]
[LWP 100803 of process 85700 exited]
[Detaching after fork from child process 85739]
[LWP 100802 of process 85700 exited]
qt.xkb.compose: failed to create compose table
ASSERT: "model" in file /usr/ports/security/kleopatra/work/kleopatra-19.12.0/src/dialogs/lookupcertificatesdialog.cpp, line 103

Thread 1 received signal SIGABRT, Aborted.
0x0000000807b379ba in thr_kill () from /lib/libc.so.7
(gdb) bt full
#0  0x0000000807b379ba in thr_kill () from /lib/libc.so.7
No symbol table info available.
#1  0x0000000807b37984 in raise () from /lib/libc.so.7
No symbol table info available.
#2  0x0000000807b378f9 in abort () from /lib/libc.so.7
No symbol table info available.
#3  0x0000000806aa68c9 in ?? () from /usr/local/lib/qt5/libQt5Core.so.5
No symbol table info available.
#4  0x0000000806aa7f2e in QMessageLogger::fatal(char const*, ...) const () from /usr/local/lib/qt5/libQt5Core.so.5
No symbol table info available.
#5  0x0000000806aa26ad in qt_assert(char const*, char const*, int) () from /usr/local/lib/qt5/libQt5Core.so.5
No symbol table info available.
#6  0x000000000050ec86 in Kleo::Dialogs::LookupCertificatesDialog::Private::selectedCertificates (this=0x81666e280)
    at /usr/ports/security/kleopatra/work/kleopatra-19.12.0/src/dialogs/lookupcertificatesdialog.cpp:103
        view = 0x81ea3c300
        model = 0x0
        sm = 0x7fffffffcde0
#7  0x000000000050db33 in Kleo::Dialogs::LookupCertificatesDialog::selectedCertificates (this=0x81ec1e1c0)
    at /usr/ports/security/kleopatra/work/kleopatra-19.12.0/src/dialogs/lookupcertificatesdialog.cpp:202
No locals.
#8  0x000000000050de38 in Kleo::Dialogs::LookupCertificatesDialog::Private::enableDisableWidgets (this=0x81666e280)
    at /usr/ports/security/kleopatra/work/kleopatra-19.12.0/src/dialogs/lookupcertificatesdialog.cpp:250
        n = 8
#9  0x000000000050efb5 in Kleo::Dialogs::LookupCertificatesDialog::Private::slotSearchTextChanged (this=0x81666e280)
    at /usr/ports/security/kleopatra/work/kleopatra-19.12.0/src/dialogs/lookupcertificatesdialog.cpp:71
No locals.
#10 0x000000000050e217 in Kleo::Dialogs::LookupCertificatesDialog::qt_static_metacall (_o=0x81ec1e1c0, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0x7fffffffd090)
    at src/kleopatra_bin_autogen/include/moc_lookupcertificatesdialog.cpp:118
        _t = 0x81ec1e1c0
#11 0x0000000806cbd241 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/local/lib/qt5/libQt5Core.so.5
No symbol table info available.
#12 0x0000000805abbe91 in ?? () from /usr/local/lib/qt5/libQt5Widgets.so.5
No symbol table info available.
#13 0x0000000806cbd241 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/local/lib/qt5/libQt5Core.so.5
No symbol table info available.
#14 0x0000000805abe237 in QWidgetLineControl::finishChange(int, bool, bool) () from /usr/local/lib/qt5/libQt5Widgets.so.5
No symbol table info available.
#15 0x0000000805ac2974 in QWidgetLineControl::processKeyEvent(QKeyEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
No symbol table info available.
#16 0x0000000805ab92b2 in QLineEdit::keyPressEvent(QKeyEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
No symbol table info available.
#17 0x00000008059b59c3 in QWidget::event(QEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
No symbol table info available.
#18 0x0000000805ab8650 in QLineEdit::event(QEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
No symbol table info available.
#19 0x0000000805979f03 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
No symbol table info available.
#20 0x000000080597b63b in QApplication::notify(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
No symbol table info available.
#21 0x0000000806c8a212 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Core.so.5
No symbol table info available.
#22 0x00000008059d3d68 in ?? () from /usr/local/lib/qt5/libQt5Widgets.so.5
No symbol table info available.
#23 0x0000000805979f03 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
No symbol table info available.
#24 0x000000080597b44c in QApplication::notify(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
No symbol table info available.
#25 0x0000000806c8a212 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Core.so.5
No symbol table info available.
--Type <RET> for more, q to quit, c to continue without paging--
#26 0x00000008063250b5 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /usr/local/lib/qt5/libQt5Gui.so.5
No symbol table info available.
#27 0x000000080630a23c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/local/lib/qt5/libQt5Gui.so.5
No symbol table info available.
#28 0x0000000813d214df in ?? () from /usr/local/lib/qt5/libQt5XcbQpa.so.5
No symbol table info available.
#29 0x000000080e60f417 in g_main_context_dispatch () from /usr/local/lib/libglib-2.0.so.0
No symbol table info available.
#30 0x000000080e60f7a3 in ?? () from /usr/local/lib/libglib-2.0.so.0
No symbol table info available.
#31 0x000000080e60f854 in g_main_context_iteration () from /usr/local/lib/libglib-2.0.so.0
No symbol table info available.
#32 0x0000000806ce2cb6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/local/lib/qt5/libQt5Core.so.5
No symbol table info available.
#33 0x0000000806c858be in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/local/lib/qt5/libQt5Core.so.5
No symbol table info available.
#34 0x0000000806c8a97e in QCoreApplication::exec() () from /usr/local/lib/qt5/libQt5Core.so.5
No symbol table info available.
#35 0x000000000074f40e in main (argc=1, argv=0x7fffffffe5d8) at /usr/ports/security/kleopatra/work/kleopatra-19.12.0/src/main.cpp:254
        app = {<QApplication> = {<QGuiApplication> = {<QCoreApplication> = {<QObject> = {_vptr$QObject = 0xb4bf30 <vtable for KleopatraApplication+16>, static staticMetaObject = {d = {superdata = 0x0, 
                      stringdata = 0x807138900, data = 0x806e25250, static_metacall = 0x806cc07a0, relatedMetaObjects = 0x0, extradata = 0x0}}, d_ptr = {d = 0x811e47000}, static staticQtMetaObject = {
                    d = {superdata = 0x0, stringdata = 0x80712cfe8, data = 0x806e22460, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}}}, static staticMetaObject = {d = {
                    superdata = 0x807116450 <QObject::staticMetaObject>, stringdata = 0x80712b198, data = 0x806e1f940, static_metacall = 0x806c8f4b0, relatedMetaObjects = 0x0, extradata = 0x0}}, 
                static self = 0x7fffffffe558}, static staticMetaObject = {d = {superdata = 0x807115a38 <QCoreApplication::staticMetaObject>, stringdata = 0x806977298, data = 0x8066aea00, 
                  static_metacall = 0x80632b580, relatedMetaObjects = 0x0, extradata = 0x0}}}, static staticMetaObject = {d = {superdata = 0x806966e30 <QGuiApplication::staticMetaObject>, 
                stringdata = 0x806083670, data = 0x805d2c1e0, static_metacall = 0x8059800b0, relatedMetaObjects = 0x0, extradata = 0x0}}}, static staticMetaObject = {d = {
              superdata = 0x806051df8 <QApplication::staticMetaObject>, stringdata = 0xb6a280 <qt_meta_stringdata_KleopatraApplication>, data = 0x7be440 <qt_meta_data_KleopatraApplication>, 
              static_metacall = 0x4510a0 <KleopatraApplication::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, d = {d = 0x811e44300}}
        timer = {mds = 17503153}
        service = {<QObject> = {_vptr$QObject = 0xb4cbe0 <vtable for KUniqueService+16>, static staticMetaObject = {d = {superdata = 0x0, stringdata = 0x807138900, data = 0x806e25250, 
                static_metacall = 0x806cc07a0, relatedMetaObjects = 0x0, extradata = 0x0}}, d_ptr = {d = 0x811e3bbd0}, static staticQtMetaObject = {d = {superdata = 0x0, stringdata = 0x80712cfe8, 
                data = 0x806e22460, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}}}, static staticMetaObject = {d = {superdata = 0x807116450 <QObject::staticMetaObject>, 
              stringdata = 0xb6ae20 <qt_meta_stringdata_KUniqueService>, data = 0x7bec00 <qt_meta_data_KUniqueService>, 
              static_metacall = 0x453800 <KUniqueService::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, d_ptr = 0x811e692a0}
        aboutData = {<KAboutData> = {static staticMetaObject = {d = {superdata = 0x0, stringdata = 0x8053ea230, data = 0x8051cf240, static_metacall = 0x805172850, relatedMetaObjects = 0x0, 
                extradata = 0x0}}, d = 0x811e70040}, <No data fields>}
        parser = {d = 0x811ea55e0}
        migrate = {d = 0x811f26100}
        gpgmeInitError = {mErr = 0, mMessage = ""}
        rc = 12039168
        server = {<QObject> = {_vptr$QObject = 0xb4c5b0 <vtable for Kleo::UiServer+16>, static staticMetaObject = {d = {superdata = 0x0, stringdata = 0x807138900, data = 0x806e25250, 
                static_metacall = 0x806cc07a0, relatedMetaObjects = 0x0, extradata = 0x0}}, d_ptr = {d = 0x811e41970}, static staticQtMetaObject = {d = {superdata = 0x0, stringdata = 0x80712cfe8, 
                data = 0x806e22460, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}}}, static staticMetaObject = {d = {superdata = 0x807116450 <QObject::staticMetaObject>, 
              stringdata = 0xb6aa60 <qt_meta_stringdata_Kleo__UiServer>, data = 0x7be970 <qt_meta_data_Kleo__UiServer>, 
              static_metacall = 0x452860 <Kleo::UiServer::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, d = {d = 0x811f27100}}
        e = @0x800b75800: {_vptr$exception = 0xd550b87a}
        daemon = false

Interestingly enough, when it crashes it pops up a notification window that asks if I want to report the crash. I go through the screens and then it tells me that there is no backtrace information available.
Comment 1 Tobias C. Berner freebsd_committer 2019-12-16 21:06:00 UTC
Moin moin 

Indeed, I can confirm the crash when calling 'Lookup on Server'.


mfg Tobias
Comment 2 Tobias C. Berner freebsd_committer 2019-12-22 14:09:34 UTC
Could you try another key server in the settings, this seems to work for me.

mfg Tobias
Comment 3 Gerard Seibert 2019-12-22 15:09:52 UTC
(In reply to Tobias C. Berner from comment #2)

What key-server are you using that is working? In any case, that would not explain why if I right-click on any identity, all of the choices are greyed out.
Comment 4 Adriaan de Groot freebsd_committer 2020-01-03 12:37:26 UTC
I'm (slowly) chasing this in the 19.12 git branch. So far I have the following:

# Details greyed out

 - this is similar to the case where you double-click on a key (it's supposed to pop-up the key details dialog)
 - adding some debugging shows 
   ```
   org.kde.pim.kleopatra: .. command @ 0x8097384c0  index  QModelIndex(1,1,0x8096945e0,KRearrangeColumnsProxyModel(0x808fa1980))
   org.kde.pim.kleopatra: Got  0  keys for details command.
   ```

So, although the key is visible in the overall list, the details dialog thinks there are 0 keys attached. There is likely a problem in invoking gpgme to get key details, which I have not chased yet.

# Crash in lookup-on-server

There's an assert being triggered:
```
ASSERT: "model" in file /home/adridg/src/kde/pim/kleopatra/src/dialogs/lookupcertificatesdialog.cpp, line 103
```
Comment 5 Adriaan de Groot freebsd_committer 2020-01-03 14:09:26 UTC
Fix for both issues at https://phabricator.kde.org/D26393
Comment 6 commit-hook freebsd_committer 2020-01-03 14:52:35 UTC
A commit references this bug:

Author: adridg
Date: Fri Jan  3 14:52:02 UTC 2020
New revision: 521943
URL: https://svnweb.freebsd.org/changeset/ports/521943

Log:
  Fix crashes in security/kleopatra

  Peculiar dynamic_cast<> behavior returns nullptr. Do the cast
  in two steps instead, which doesn't return nullptr.

  PR:		242670
  Reported by:	Gerard Seibert

Changes:
  head/security/kleopatra/Makefile
  head/security/kleopatra/files/
  head/security/kleopatra/files/patch-D26393
Comment 7 Adriaan de Groot freebsd_committer 2020-01-03 20:06:26 UTC
Note that this fixes "double-click doesn't show details" and "crash in lookup on server" but does not fix "RMB entries are all greyed out".