Bug 335031 - kleopatra crached when changing certificate trust level
Summary: kleopatra crached when changing certificate trust level
Status: RESOLVED FIXED
Alias: None
Product: kleopatra
Classification: Applications
Component: general (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Andre Heinecke
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2014-05-19 11:01 UTC by Martin Pluskal
Modified: 2017-11-13 07:44 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 Martin Pluskal 2014-05-19 11:01:50 UTC
Application: kleopatra (2.2.0)
KDE Platform Version: 4.13.1
Qt Version: 4.8.5
Operating System: Linux 3.14.4-gentoo x86_64
Distribution: "Gentoo Base System release 2.2"

-- Information about the crash:
- What I was doing when the application crashed:
I was changing certificate trust level for muliple keys (one by one), and when changin third key, kleopatra crashed.

The crash can be reproduced sometimes.

-- Backtrace:
Application: Kleopatra (kleopatra), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fb1deda5880 (LWP 5628))]

Thread 5 (Thread 0x7fb1c7906700 (LWP 5665)):
#0  0x00007fb1dab8c38d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fb1d6304bb4 in g_main_context_poll (priority=2147483647, n_fds=2, fds=0x7fb1c0002bb0, timeout=-1, context=0x7fb1c00009a0) at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:4007
#2  g_main_context_iterate (context=context@entry=0x7fb1c00009a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3708
#3  0x00007fb1d6304cbc in g_main_context_iteration (context=0x7fb1c00009a0, may_block=1) at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3774
#4  0x00007fb1dc4bafd5 in QEventDispatcherGlib::processEvents (this=0x7fb1c00008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#5  0x00007fb1dc48ce9f in QEventLoop::processEvents (this=this@entry=0x7fb1c7905d20, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007fb1dc48d195 in QEventLoop::exec (this=this@entry=0x7fb1c7905d20, flags=...) at kernel/qeventloop.cpp:204
#7  0x00007fb1dc38a4bf in QThread::exec (this=this@entry=0x1bd5e70) at thread/qthread.cpp:536
#8  0x00007fb1dc46e6b3 in QInotifyFileSystemWatcherEngine::run (this=0x1bd5e70) at io/qfilesystemwatcher_inotify.cpp:256
#9  0x00007fb1dc38cb5f in QThreadPrivate::start (arg=0x1bd5e70) at thread/qthread_unix.cpp:338
#10 0x00007fb1dde10099 in start_thread (arg=0x7fb1c7906700) at pthread_create.c:309
#11 0x00007fb1dab95a0d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 4 (Thread 0x7fb1c6904700 (LWP 5683)):
#0  0x00007fb1dab8e873 in select () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fb1dc46b2b1 in QProcessManager::run (this=0x7fb1dc7f4740 <processManager()::processManager>) at io/qprocess_unix.cpp:247
#2  0x00007fb1dc38cb5f in QThreadPrivate::start (arg=0x7fb1dc7f4740 <processManager()::processManager>) at thread/qthread_unix.cpp:338
#3  0x00007fb1dde10099 in start_thread (arg=0x7fb1c6904700) at pthread_create.c:309
#4  0x00007fb1dab95a0d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 3 (Thread 0x7fb1c7105700 (LWP 5766)):
#0  pthread_cond_timedwait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00007fb1dc38d014 in wait (time=2000, this=0x1ba4b10) at thread/qwaitcondition_unix.cpp:84
#2  QWaitCondition::wait (this=this@entry=0x1ba48f8, mutex=mutex@entry=0x1ba48f0, time=time@entry=2000) at thread/qwaitcondition_unix.cpp:158
#3  0x00000000005b1d38 in (anonymous namespace)::ReaderStatusThread::run (this=0x1ba48e0) at /var/tmp/portage/kde-base/kleopatra-4.13.1/work/kleopatra-4.13.1/kleopatra/smartcard/readerstatus.cpp:543
#4  0x00007fb1dc38cb5f in QThreadPrivate::start (arg=0x1ba48e0) at thread/qthread_unix.cpp:338
#5  0x00007fb1dde10099 in start_thread (arg=0x7fb1c7105700) at pthread_create.c:309
#6  0x00007fb1dab95a0d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7fb1c604d700 (LWP 21000)):
#0  0x00007fb1dab8c38d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fb1d6304bb4 in g_main_context_poll (priority=2147483647, n_fds=2, fds=0x7fb1b011b420, timeout=-1, context=0x7fb1b0001340) at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:4007
#2  g_main_context_iterate (context=context@entry=0x7fb1b0001340, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3708
#3  0x00007fb1d6304cbc in g_main_context_iteration (context=0x7fb1b0001340, may_block=1) at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3774
#4  0x00007fb1dc4baff6 in QEventDispatcherGlib::processEvents (this=0x7fb1b00d7b70, flags=...) at kernel/qeventdispatcher_glib.cpp:427
#5  0x00007fb1dc48ce9f in QEventLoop::processEvents (this=this@entry=0x7fb1c604cd20, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007fb1dc48d195 in QEventLoop::exec (this=this@entry=0x7fb1c604cd20, flags=...) at kernel/qeventloop.cpp:204
#7  0x00007fb1dc38a4bf in QThread::exec (this=this@entry=0x2245ec0) at thread/qthread.cpp:536
#8  0x00007fb1dc46e6b3 in QInotifyFileSystemWatcherEngine::run (this=0x2245ec0) at io/qfilesystemwatcher_inotify.cpp:256
#9  0x00007fb1dc38cb5f in QThreadPrivate::start (arg=0x2245ec0) at thread/qthread_unix.cpp:338
#10 0x00007fb1dde10099 in start_thread (arg=0x7fb1c604d700) at pthread_create.c:309
#11 0x00007fb1dab95a0d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7fb1deda5880 (LWP 5628)):
[KCrash Handler]
#6  Kleo::Commands::ChangeOwnerTrustCommand::Private::slotDialogAccepted (this=0x234ea80) at /var/tmp/portage/kde-base/kleopatra-4.13.1/work/kleopatra-4.13.1/kleopatra/commands/changeownertrustcommand.cpp:160
#7  0x00007fb1dc4a1f38 in QMetaObject::activate (sender=0x1c31370, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3547
#8  0x00007fb1dd93bc0d in KDialog::slotButtonClicked (this=0x1c31370, button=4) at /var/tmp/portage/kde-base/kdelibs-4.13.1/work/kdelibs-4.13.1/kdeui/dialogs/kdialog.cpp:885
#9  0x00007fb1dd93d4af in KDialog::qt_static_metacall (_o=<optimized out>, _id=<optimized out>, _a=<optimized out>, _c=<optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.13.1/work/kdelibs-4.13.1_build/kdeui/kdialog.moc:166
#10 0x00007fb1dc4a1f38 in QMetaObject::activate (sender=sender@entry=0x233c030, m=m@entry=0x7fb1dc7eed60 <QSignalMapper::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fff35218440) at kernel/qobject.cpp:3547
#11 0x00007fb1dc4a96be in QSignalMapper::mapped (this=this@entry=0x233c030, _t1=4) at .moc/release-shared/moc_qsignalmapper.cpp:114
#12 0x00007fb1dc4a97c6 in QSignalMapper::map (this=0x233c030, sender=0x1d92b10) at kernel/qsignalmapper.cpp:266
#13 0x00007fb1dc4a1f38 in QMetaObject::activate (sender=sender@entry=0x1d92b10, m=m@entry=0x7fb1dc2fc420 <QAbstractButton::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7fff352185b0) at kernel/qobject.cpp:3547
#14 0x00007fb1dbe7c612 in QAbstractButton::clicked (this=this@entry=0x1d92b10, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:219
#15 0x00007fb1dbbdc1d3 in QAbstractButtonPrivate::emitClicked (this=this@entry=0x2365550) at widgets/qabstractbutton.cpp:548
#16 0x00007fb1dbbdd343 in QAbstractButtonPrivate::click (this=this@entry=0x2365550) at widgets/qabstractbutton.cpp:541
#17 0x00007fb1dbbdd42c in QAbstractButton::mouseReleaseEvent (this=0x1d92b10, e=0x7fff35218ac0) at widgets/qabstractbutton.cpp:1123
#18 0x00007fb1db885fbe in QWidget::event (this=0x1d92b10, event=0x7fff35218ac0) at kernel/qwidget.cpp:8376
#19 0x00007fb1db836c4c in QApplicationPrivate::notify_helper (this=this@entry=0x1a95960, receiver=receiver@entry=0x1d92b10, e=e@entry=0x7fff35218ac0) at kernel/qapplication.cpp:4562
#20 0x00007fb1db83d253 in QApplication::notify (this=this@entry=0x7fff35219650, receiver=receiver@entry=0x1d92b10, e=e@entry=0x7fff35218ac0) at kernel/qapplication.cpp:4105
#21 0x00007fb1dd9d9fca in KApplication::notify (this=0x7fff35219650, receiver=0x1d92b10, event=0x7fff35218ac0) at /var/tmp/portage/kde-base/kdelibs-4.13.1/work/kdelibs-4.13.1/kdeui/kernel/kapplication.cpp:311
#22 0x00007fb1dc48e24d in QCoreApplication::notifyInternal (this=0x7fff35219650, receiver=receiver@entry=0x1d92b10, event=event@entry=0x7fff35218ac0) at kernel/qcoreapplication.cpp:949
#23 0x00007fb1db83ca03 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#24 QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x1d92b10, event=event@entry=0x7fff35218ac0, alienWidget=alienWidget@entry=0x1d92b10, nativeWidget=nativeWidget@entry=0x1c31370, buttonDown=buttonDown@entry=0x7fb1dc30e720 <qt_button_down>, lastMouseReceiver=..., spontaneous=spontaneous@entry=true) at kernel/qapplication.cpp:3173
#25 0x00007fb1db8adcdb in QETWidget::translateMouseEvent (this=this@entry=0x1c31370, event=event@entry=0x7fff35218e70) at kernel/qapplication_x11.cpp:4517
#26 0x00007fb1db8ac70c in QApplication::x11ProcessEvent (this=0x7fff35219650, event=event@entry=0x7fff35218e70) at kernel/qapplication_x11.cpp:3640
#27 0x00007fb1db8d33d2 in x11EventSourceDispatch (s=s@entry=0x1a96ef0, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#28 0x00007fb1d63048c6 in g_main_dispatch (context=0x1a96e00) at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3066
#29 g_main_context_dispatch (context=context@entry=0x1a96e00) at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3642
#30 0x00007fb1d6304c18 in g_main_context_iterate (context=context@entry=0x1a96e00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3713
#31 0x00007fb1d6304cbc in g_main_context_iteration (context=0x1a96e00, may_block=1) at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3774
#32 0x00007fb1dc4bafd5 in QEventDispatcherGlib::processEvents (this=0x1a928e0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#33 0x00007fb1db8d3486 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#34 0x00007fb1dc48ce9f in QEventLoop::processEvents (this=this@entry=0x7fff35219270, flags=...) at kernel/qeventloop.cpp:149
#35 0x00007fb1dc48d195 in QEventLoop::exec (this=this@entry=0x7fff35219270, flags=...) at kernel/qeventloop.cpp:204
#36 0x00007fb1dc4922db in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1221
#37 0x00007fb1db8352ac in QApplication::exec () at kernel/qapplication.cpp:3823
#38 0x000000000043aba5 in main (argc=<optimized out>, argv=<optimized out>) at /var/tmp/portage/kde-base/kleopatra-4.13.1/work/kleopatra-4.13.1/kleopatra/main.cpp:320

Reported using DrKonqi
Comment 1 Andre Heinecke 2015-09-02 08:18:49 UTC
I can reproduce this.
Comment 2 Andre Heinecke 2015-09-02 09:38:04 UTC
The problem here is that changing the ownertrust triggers a reload of the openpgp keys. During this keylisting key()->protocol() returns Unknown Protocol. If you try to change the ownertrust of a key with unkown protocol kleo crashes as it does not find the backend.

Quick fix would be to treat Unknown Protocol as OpenPGP in the changeownertrust command. But I don't yet understand why starting a listallkeysjob causes already loaded keys to return unknown protocol and I would rather fix that.
Comment 3 Andre Heinecke 2017-11-13 07:44:55 UTC
I can no longer reproduce this with current (3.0) kleopatra and an up to date stack.