Bug 349596 - Kopete crashes after OTR keys generation
Summary: Kopete crashes after OTR keys generation
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Unmaintained
Component: OTR Plugin (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
: 372886 376733 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-06-25 12:59 UTC by Valerio
Modified: 2017-03-01 17:45 UTC (History)
6 users (show)

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


Attachments
New crash information added by DrKonqi (7.49 KB, text/plain)
2015-11-06 01:00 UTC, Chris Samuel
Details
New crash information added by DrKonqi (4.71 KB, text/plain)
2015-12-21 21:45 UTC, Kristoffer Grundström
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Valerio 2015-06-25 12:59:56 UTC
- What I was doing when the application crashed:
I started a chat without having a otr key for the account, I activated the otr chat and kopete started generating the key for my account then it crashed, after reopening kopete the key was there and I was able to start an otr chat.
If I manually go to "Settings -> Plugins -> OTR -> Generate key" for a user without a key everything works fine, the crash happens only -as far as I can tell- if the key is generated starting an otr chat.

Reproducible: Always

Steps to Reproduce:
0. If account has otr key delete it from ~/.kde4/share/apps/kopete_otr/privkeys
1. Start a chat with said account
2. Start OTR chat
3. Wait for key generation
4. Crash!
5. Open kopete 
6. Keys are there

Actual Results:  
Keys gets generated and kopete crashes.

Expected Results:  
Keys get generated and chat starts


Application: Kopete (kopete), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7ffff7ee6840 (LWP 22902))]

Thread 3 (Thread 0x7fffdc2fb700 (LWP 22916)):
#0  0x00007ffff5935ab0 in ?? () from /usr/lib/libQtCore.so.4
#1  0x00007fffef3861bd in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#2  0x00007fffef386ba8 in ?? () from /usr/lib/libglib-2.0.so.0
#3  0x00007fffef386d8c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0x00007ffff5936066 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007ffff59045c1 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007ffff5904935 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0x00007fffdd535f64 in QCA::SyncThread::run() () from /usr/lib/libqca.so.2
#8  0x00007ffff57f592c in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007ffff1327354 in start_thread () from /usr/lib/libpthread.so.0
#10 0x00007ffff41ccbfd in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7fffdbafa700 (LWP 22917)):
#0  0x00007fffef3cb3f9 in g_mutex_lock () from /usr/lib/libglib-2.0.so.0
#1  0x00007fffef3861c9 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#2  0x00007fffef386ba8 in ?? () from /usr/lib/libglib-2.0.so.0
#3  0x00007fffef386d8c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0x00007ffff5936066 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007ffff59045c1 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007ffff5904935 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0x00007ffff57f3039 in QThread::exec() () from /usr/lib/libQtCore.so.4
#8  0x00007fffdd9bf64a in ?? () from /usr/lib/kde4/kopete_jabber.so
#9  0x00007ffff57f592c in ?? () from /usr/lib/libQtCore.so.4
#10 0x00007ffff1327354 in start_thread () from /usr/lib/libpthread.so.0
#11 0x00007ffff41ccbfd in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7ffff7ee6840 (LWP 22902)):
[KCrash Handler]
#6  0x00007ffff70ae250 in Kopete::Message::Message(Kopete::Message const&) () from /usr/lib/libkopete.so.4
#7  0x00007fffdfab9d47 in OtrlChatInterface::replayStoredMessages() () from /usr/lib/libkopete_otr_shared.so.1
#8  0x00007fffdfab9f29 in OtrlChatInterface::create_privkey(void*, char const*, char const*) () from /usr/lib/libkopete_otr_shared.so.1
#9  0x00007fffdf89f6a8 in otrl_message_receiving () from /usr/lib/libotr.so.5
#10 0x00007fffdfab92ea in OtrlChatInterface::decryptMessage(Kopete::Message&) () from /usr/lib/libkopete_otr_shared.so.1
#11 0x00007fffdfcd17af in ?? () from /usr/lib/kde4/kopete_otr.so
#12 0x00007ffff591fbc1 in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#13 0x00007ffff49cd13c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#14 0x00007ffff49d3f96 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#15 0x00007ffff63b785a in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#16 0x00007ffff5905d4d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#17 0x00007ffff59091d6 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#18 0x00007ffff5935ef3 in ?? () from /usr/lib/libQtCore.so.4
#19 0x00007fffef3869fd in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#20 0x00007fffef386ce0 in ?? () from /usr/lib/libglib-2.0.so.0
#21 0x00007fffef386d8c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#22 0x00007ffff5936044 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#23 0x00007ffff4a76156 in ?? () from /usr/lib/libQtGui.so.4
#24 0x00007ffff59045c1 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#25 0x00007ffff5904935 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#26 0x00007ffff590a2e9 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#27 0x0000000000414175 in ?? ()
#28 0x00007ffff4105790 in __libc_start_main () from /usr/lib/libc.so.6
#29 0x0000000000414959 in _start ()
Comment 1 Pali Rohár 2015-07-01 19:44:00 UTC
CCing Michael Zanetti, can you look at this OTR bug?
Comment 2 Valerio 2015-07-02 07:34:36 UTC
Sorry, forgot to mention: 
$ kopete --version
Qt: 4.8.7
Development platform  KDE: 4.14.9
Kopete: 1.6.60
Running on archlinux with kde plasma5
plasma-desktop: 5.3.2-1
plasma-framework: 5.11.0-2
qt5-base : 5.4.2-1
Comment 3 Pali Rohár 2015-08-22 11:20:16 UTC
Valerio, please recompile kopete in debug mode or install debug symbols. Without them it is hard to do anything...
Comment 4 Chris Samuel 2015-11-06 01:00:42 UTC
Created attachment 95353 [details]
New crash information added by DrKonqi

kopete (1.7.2) on KDE Platform 4.14.13 using Qt 4.8.6

- What I was doing when the application crashed:

As OP reports, with an existing Kopete setup with OTR enabled whenever a new contact with OTR contacts me it gives the message about generating the keys and then (after a while) crashes.

This report should have debug info from the debug packages (or at least as many as Kubuntu 15.10 has) so hopefully it's useful!

Best of luck with this..

-- Backtrace (Reduced):
#6  0x00007fc15eaf9c90 in Kopete::Message::Message(Kopete::Message const&) () from /usr/lib/libkopete.so.4
#7  0x00007fc14548b857 in OtrlChatInterface::replayStoredMessages() () from /usr/lib/libkopete_otr_shared.so.1
#8  0x00007fc14548ba39 in OtrlChatInterface::create_privkey(void*, char const*, char const*) () from /usr/lib/libkopete_otr_shared.so.1
#9  0x00007fc145271498 in otrl_message_receiving () from /usr/lib/libotr.so.5
#10 0x00007fc14548adfa in OtrlChatInterface::decryptMessage(Kopete::Message&) () from /usr/lib/libkopete_otr_shared.so.1
Comment 5 Pali Rohár 2015-11-10 09:12:13 UTC
On Friday 06 November 2015 01:00:42 Chris Samuel via KDE Bugzilla wrote:
> This report should have debug info from the debug packages (or at least as many
> as Kubuntu 15.10 has) so hopefully it's useful!
> 

Apparently, you can see that debug symbols are missing...
In backtrace are missing information about function parameters...

> -- Backtrace (Reduced):
> #6  0x00007fc15eaf9c90 in Kopete::Message::Message(Kopete::Message const&) ()
> from /usr/lib/libkopete.so.4
> #7  0x00007fc14548b857 in OtrlChatInterface::replayStoredMessages() () from
> /usr/lib/libkopete_otr_shared.so.1
> #8  0x00007fc14548ba39 in OtrlChatInterface::create_privkey(void*, char const*,
> char const*) () from /usr/lib/libkopete_otr_shared.so.1
> #9  0x00007fc145271498 in otrl_message_receiving () from /usr/lib/libotr.so.5
> #10 0x00007fc14548adfa in OtrlChatInterface::decryptMessage(Kopete::Message&)
> () from /usr/lib/libkopete_otr_shared.so.1
> 

So please install debug symbols and send backtrace again.
Comment 6 Chris Samuel 2015-11-10 11:37:40 UTC
I'm afraid that I have all the debug symbols that DrKonqi says are available (it actually did install ones for me).  From what I can see there are no Kopete debug symbols available. :-(
Comment 7 Pali Rohár 2015-11-10 11:41:38 UTC
You wrote that you are using Kubuntu... Can you look at ubuntu wiki?
https://wiki.ubuntu.com/DebuggingProgramCrash#Non-built-in_debug_symbol_packages_.28.2A-dbgsym.29

There are steps how to add new repository and install packages...
Comment 8 Pali Rohár 2015-11-22 17:54:13 UTC
@Chris: Have you tried to install debug symbols from ubuntu wiki?
Comment 9 Kristoffer Grundström 2015-12-21 21:45:43 UTC
Created attachment 96249 [details]
New crash information added by DrKonqi

kopete (1.6.60) on KDE Platform 4.14.5 using Qt 4.8.6

- What I was doing when the application crashed:

I was trying to create the encryption key when Kopete suddenly crashed.

-- Backtrace (Reduced):
#5  0x00007f4d86662250 in Kopete::Message::Message(Kopete::Message const&) () from /lib64/libkopete.so.4
#6  0x00007f4d6c94e7c7 in OtrlChatInterface::replayStoredMessages() () from /lib64/libkopete_otr_shared.so.1
#7  0x00007f4d6c94e99b in OtrlChatInterface::create_privkey(void*, char const*, char const*) () from /lib64/libkopete_otr_shared.so.1
#8  0x00007f4d6c735587 in otrl_message_receiving () from /lib64/libotr.so.5
#9  0x00007f4d6c94ded9 in OtrlChatInterface::decryptMessage(Kopete::Message&) () from /lib64/libkopete_otr_shared.so.1
Comment 10 Pali Rohár 2016-11-27 15:51:33 UTC
*** Bug 372886 has been marked as a duplicate of this bug. ***
Comment 11 Pali Rohár 2016-11-27 15:58:02 UTC
Git commit 15579ddcf34ad04bf190a189b670f62c3796c057 by Pali Rohár.
Committed on 27/11/2016 at 15:55.
Pushed by pali into branch 'Applications/16.12'.

Fix crash after OTR plugin generates key

Function OtrlChatInterface::replayStoredMessages() had wrong logic to check
if there is still some postponed message waiting for processing.
FIXED-IN: 16.12

M  +1    -1    plugins/otr/otrlchatinterface.cpp

https://commits.kde.org/kopete/15579ddcf34ad04bf190a189b670f62c3796c057
Comment 12 Pali Rohár 2017-03-01 17:45:40 UTC
*** Bug 376733 has been marked as a duplicate of this bug. ***