Bug 294399 - Application: KGpg (kgpg), signal: Segmentation fault
Summary: Application: KGpg (kgpg), signal: Segmentation fault
Status: RESOLVED FIXED
Alias: None
Product: kgpg
Classification: Applications
Component: general (other bugs)
Version First Reported In: 2.6.x
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Rolf Eike Beer
URL:
Keywords:
: 323122 333605 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-02-19 01:13 UTC by LM
Modified: 2014-12-09 20:04 UTC (History)
2 users (show)

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


Attachments
Crash Report (5.61 KB, application/octet-stream)
2012-02-19 01:13 UTC, LM
Details
Third attempt to install still failed (4.73 KB, application/octet-stream)
2012-02-19 18:36 UTC, LM
Details

Note You need to log in before you can comment on or make changes to this bug.
Description LM 2012-02-19 01:13:44 UTC
Created attachment 68916 [details]
Crash Report

Version:           unspecified (using KDE 4.7.4) 
OS:                Linux

After installing on a clean system Ubuntu 11.10 

The Program should generate a key pair but it runs for hours and then crashes without generating a key pair 
then you can not access the program again without reinstall the full O/S

Reproducible: Didn't try

Steps to Reproduce:
Start as a new program set to 2048 to gen Key 

Actual Results:  
System runs and tries to generate Keys but crashes instead after about 1 hour

Expected Results:  
System can not generate Key Pair

Please see attach report
Comment 1 Rolf Eike Beer 2012-02-19 10:02:01 UTC
Please give some details about what is happening: is KGpg eating memory at the same time? Is the KGpg process eating CPU when this happens? Is a gpg process running when this happens? Is it the gpg process that eats memory or CPU?

Which gpg version are you using? When you remove ~/.kde/share/config/kgpgrc and ~/.gnupg, can you use it then again?
Comment 2 LM 2012-02-19 14:54:33 UTC
Not sure if you got this as an attachment so i am pasting it direct into this report as follows:

GNUPG Binary Version- gpg: 2.6.2  Key size 2048 in use :- DSA &ELGamal

Application: KGpg (kgpg), signal: Segmentation fault
[Current thread is 1 (Thread 0xb7825710 (LWP 2132))]

Thread 2 (Thread 0xb6bffb70 (LWP 2134)):
#0  0x00a9c416 in __kernel_vsyscall ()
#1  0x003af40e in poll () from /lib/i386-linux-gnu/libc.so.6
#2  0x06e9c34b in g_poll (fds=0x93f27b8, nfds=3, timeout=-1) at /build/buildd/glib2.0-2.30.0/./glib/gpoll.c:132
#3  0x06e8d896 in g_main_context_poll (n_fds=3, fds=0x93f27b8, timeout=<optimized out>, context=0x946e988, priority=<optimized out>) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3402
#4  g_main_context_iterate (context=0x946e988, block=115983136, dispatch=1, self=<optimized out>) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3084
#5  0x06e8df9b in g_main_loop_run (loop=0x946ea50) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3297
#6  0x02043cea in gdbus_shared_thread_func (user_data=0x9429cd0) at /build/buildd/glib2.0-2.30.0/./gio/gdbusprivate.c:276
#7  0x06eb45f4 in g_thread_create_proxy (data=0x946ceb0) at /build/buildd/glib2.0-2.30.0/./glib/gthread.c:1962
#8  0x00cbdd31 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#9  0x003be0ce in clone () from /lib/i386-linux-gnu/libc.so.6
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 1 (Thread 0xb7825710 (LWP 2132)):
[KCrash Handler]
#7  0x087c6c07 in KJob::isAutoDelete (this=0x98b6f08) at ../../kdecore/jobs/kjob.cpp:355
#8  0x087c6f50 in KJob::emitResult (this=0x98b6f08) at ../../kdecore/jobs/kjob.cpp:314
#9  0x087c7005 in KJob::kill (this=0x98b6f08, verbosity=KJob::EmitResult) at ../../kdecore/jobs/kjob.cpp:112
#10 0x0117834e in KAbstractWidgetJobTracker::slotStop (this=0x98cb368, job=0x98b6f08) at ../../kdeui/jobs/kabstractwidgetjobtracker.cpp:81
#11 0x0117d3b2 in KWidgetJobTracker::Private::ProgressWidget::_k_stop (this=0x98ba168) at ../../kdeui/jobs/kwidgetjobtracker.cpp:641
#12 0x0117d464 in KWidgetJobTracker::Private::ProgressWidget::qt_metacall (this=0x98ba168, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0xbffeab38) at ./kwidgetjobtracker_p.moc:109
#13 0x03d88b7d in metacall (argv=0xbffeab38, idx=40, cl=QMetaObject::InvokeMetaMethod, object=0x98ba168) at kernel/qmetaobject.cpp:237
#14 QMetaObject::metacall (object=0x98ba168, cl=QMetaObject::InvokeMetaMethod, idx=40, argv=0xbffeab38) at kernel/qmetaobject.cpp:232
#15 0x03d97a6a in QMetaObject::activate (sender=0x98bfe58, m=0x4e55a28, local_signal_index=2, argv=0xbffeab38) at kernel/qobject.cpp:3278
#16 0x04c0ee6d in QAbstractButton::clicked (this=0x98bfe58, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:206
#17 0x0490d5dd in QAbstractButtonPrivate::emitClicked (this=0x9811f00) at widgets/qabstractbutton.cpp:546
#18 0x0490ec4b in QAbstractButtonPrivate::click (this=0x9811f00) at widgets/qabstractbutton.cpp:539
#19 0x0490ef06 in QAbstractButton::mouseReleaseEvent (this=0x98bfe58, e=0xbffeb0ec) at widgets/qabstractbutton.cpp:1121
#20 0x04553fc8 in QWidget::event (this=0x98bfe58, event=0xbffeb0ec) at kernel/qwidget.cpp:8295
#21 0x0490e1a9 in QAbstractButton::event (this=0x98bfe58, e=0xbffeb0ec) at widgets/qabstractbutton.cpp:1080
#22 0x049b07e8 in QPushButton::event (this=0x98bfe58, e=0xbffeb0ec) at widgets/qpushbutton.cpp:683
#23 0x044f9d84 in notify_helper (e=0xbffeb0ec, receiver=0x98bfe58, this=0x93b9108) at kernel/qapplication.cpp:4486
#24 QApplicationPrivate::notify_helper (this=0x93b9108, receiver=0x98bfe58, e=0xbffeb0ec) at kernel/qapplication.cpp:4458
#25 0x044ffdeb in QApplication::notify (this=0x93b9108, receiver=0x98bfe58, e=0xbffeb0ec) at kernel/qapplication.cpp:4047
#26 0x01187971 in KApplication::notify (this=0x93b5a60, receiver=0x98bfe58, event=0xbffeb0ec) at ../../kdeui/kernel/kapplication.cpp:311
#27 0x03d8219e in QCoreApplication::notifyInternal (this=0x93b5a60, receiver=0x98bfe58, event=0xbffeb0ec) at kernel/qcoreapplication.cpp:787
#28 0x044fad45 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#29 QApplicationPrivate::sendMouseEvent (receiver=0x98bfe58, event=0xbffeb0ec, alienWidget=0x98bfe58, nativeWidget=0x98ba168, buttonDown=0x4e64eb4, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3146
#30 0x04587304 in QETWidget::translateMouseEvent (this=0x98ba168, event=0xbffeb56c) at kernel/qapplication_x11.cpp:4571
#31 0x04585e8d in QApplication::x11ProcessEvent (this=0x93b5a60, event=0xbffeb56c) at kernel/qapplication_x11.cpp:3693
#32 0x045b228c in x11EventSourceDispatch (s=0x93bc100, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#33 0x06e8d25f in g_main_dispatch (context=0x93bb440) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:2441
#34 g_main_context_dispatch (context=0x93bb440) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3011
#35 0x06e8d990 in g_main_context_iterate (context=0x93bb440, block=115983136, dispatch=1, self=<optimized out>) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3089
#36 0x06e8dc2a in g_main_context_iteration (context=0x93bb440, may_block=1) at /build/buildd/glib2.0-2.30.0/./glib/gmain.c:3152
#37 0x03db0ada in QEventDispatcherGlib::processEvents (this=0x9397c28, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#38 0x045b1e7a in QGuiEventDispatcherGlib::processEvents (this=0x9397c28, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#39 0x03d811dd in QEventLoop::processEvents (this=0xbffeb874, flags=...) at kernel/qeventloop.cpp:149
#40 0x03d81421 in QEventLoop::exec (this=0xbffeb874, flags=...) at kernel/qeventloop.cpp:201
#41 0x03d8619d in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1064
#42 0x044f7924 in QApplication::exec () at kernel/qapplication.cpp:3760
#43 0x0806199e in main (argc=0, argv=0x0) at ../../kgpg/main.cpp:57


As it looks like memory usage  as i have no problem doing work on other desktops runs fine Any ways I have not notice a CPU issue apart from when the system crashed, B ut i will keep a close eye on that 

In deed when this crash took place the program was trying to generate a key pair for a very long time approx 1 hour.

To be honest i do not know I can only assume as i was not paying a direct attention to this process.

In the mean time i have 
:~$ rm ~/.kde/share/config/kgpgrc
But unable to remove 
:~$ rm ~/.gnupg
rm: cannot remove
rm -r .gnupg

So i will try the program again and let you know :-

Re try :- start 14:34hrs - 
Running program Key Manager - Entered Pw program trying to Generate new Key pair

Both my CPU's running at about 22% rising to 50% and down again
Now hit 100% 14:42hrs
System memory 2G - Memory in use 31% no change 
Still no key generated as yet.

No Access to KGp Hand Book or GNUPG Manual

I hope this bit of information is enough to get this resolve .
Many thanks for your help.

End 15:54 
Cannot generate New Key pair

Error 
gpg: -:2: invalid algorithm
gpg: -:10: missing colon

END of Report
Comment 3 LM 2012-02-19 18:36:32 UTC
Created attachment 68933 [details]
Third attempt to install still failed
Comment 4 Rolf Eike Beer 2012-12-16 19:27:30 UTC
This could be a duplicate of bug 253408. Can you please update to the lastest version and check if this still happens?
Comment 5 Rolf Eike Beer 2014-04-30 19:01:44 UTC
Not a duplicate as it still happens in new versions.
Comment 6 Rolf Eike Beer 2014-04-30 19:02:04 UTC
*** Bug 323122 has been marked as a duplicate of this bug. ***
Comment 7 Rolf Eike Beer 2014-04-30 19:02:11 UTC
*** Bug 333605 has been marked as a duplicate of this bug. ***
Comment 8 Rolf Eike Beer 2014-12-09 20:04:38 UTC
Git commit c08fbc2eb991386684e4fc95f91c5cc67611ac51 by Rolf Eike Beer.
Committed on 09/12/2014 at 20:01.
Pushed by dakon into branch 'Applications/14.12'.

do not call KJob::emitResult() when the job is about to be killed

KJob will call emitResult() itself if it is needed, calling it twice may lead
to crashes.
FIXED-IN:14.12

M  +6    -4    transactions/kgpgtransactionjob.cpp
M  +6    -6    transactions/kgpgtransactionjob.h

http://commits.kde.org/kgpg/c08fbc2eb991386684e4fc95f91c5cc67611ac51