Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] kmail and akonadi crashes
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
tomtom69
Apprentice
Apprentice


Joined: 09 Nov 2010
Posts: 205
Location: Bavaria

PostPosted: Fri Feb 01, 2019 8:42 pm    Post subject: [SOLVED] kmail and akonadi crashes Reply with quote

I have 2 systems recently installed from scratch about some months ago, and both got kmail installed some weeks ago, which causes crashes at different situations.
There seem to be 2 issues which are already known and which (1) cause akonadi to crash on first startup and (2) kmail to crash when an email is opened on a separate window and this window is closed. I seem to suffer from these two bugs:
[url]
https://bugzilla.redhat.com/show_bug.cgi?id=1448691
https://kde-bugs-dist.kde.narkive.com/zBCBPCPm/kmail2-bug-400838-new-crash-when-closing-message-window-with-qt-5-12
[/url]
Both bugs do not affect overall system stability, but they are annoying because one gets crash reports and needs to restart kmail.
Regarding the bug reports it looks like both issues are solved with kde-apps 18.12.
Q1: I have seen kmail-18.12.1 in portage. How can I contribute to testing this new version? (=how can I unmask it easily, how should I report issues, are there specific tests which I could help others with?)
Q2: Does anyone still use kmail with gentoo or am I the only one? (My family and me like kmail because it is easy to use, can open html emails without using an external browser, supports several identities, because it is "standalone" and not integrated into a browser-like application, supports drag-and-drop in KDE)

tom


Last edited by tomtom69 on Fri Jun 28, 2019 7:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7440
Location: Austria

PostPosted: Fri Feb 01, 2019 8:54 pm    Post subject: Re: kmail and akonadi crashes Reply with quote

tomtom69 wrote:
Q1: I have seen kmail-18.12.1 in portage. How can I contribute to testing this new version?

kde overlay provides unmask files for that purpose. You don't have to actually add the overlay for that, you can download them manually (use the .keywords files): https://gitweb.gentoo.org/proj/kde.git/tree/Documentation/package.accept_keywords

tomtom69 wrote:
https://kde-bugs-dist.kde.narkive.com/zBCBPCPm/kmail2-bug-400838-new-crash-when-closing-message-window-with-qt-5-12

The link makes it seem you would have to have Qt 5.12 for that, which is neither stable nor in Portage at this point (only available through qt overlay).
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
tomtom69
Apprentice
Apprentice


Joined: 09 Nov 2010
Posts: 205
Location: Bavaria

PostPosted: Sat Feb 02, 2019 12:07 pm    Post subject: Reply with quote

I overlooked qt5.12 (I have 5.11.3 installed).
However I unmasked and upgraded kde apps to 18.12.1 and did some testing at least on one of the 2 machines. I still have both segfaults.

Akonadi segfaults at first startup after system boot (when it asks for the kwallet password), and restarts automatically. The debug information is classified "useless":
https://pastebin.com/p32XUfE6
The segfault occurs in ~80% at startup after boot.

Kmail segfaults always when I open a message in a separate window (double click on the message in the list), and when I close this message windows. In about 50% of the cases it segfaults on closing kmail (with the same debug information). Debug information is also classified as "useless":
https://pastebin.com/9xzMejnA

Comparing the debug information I was led to the two bugs mentioned, however if these are fixed with 18.12 this seems to be a wrong conclusion.
One interesting fact is that both crashes only happen if the system is idle. If I start kmail on a heavily loaded system, both crashes did not appear yet.
Is there anything else I could try?
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7440
Location: Austria

PostPosted: Sat Feb 02, 2019 12:32 pm    Post subject: Reply with quote

Stacktraces are always useless unless you install debug information: https://wiki.gentoo.org/wiki/Debugging
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
tomtom69
Apprentice
Apprentice


Joined: 09 Nov 2010
Posts: 205
Location: Bavaria

PostPosted: Sat Feb 02, 2019 8:08 pm    Post subject: Reply with quote

Thank you for the help.
I enabled debugging according to the instructions, and re-compiled kmail and the libraries that look involved with debug support. Now the crash information when closing a mail message from a separate kmail window is classified als "may be helpful":
https://pastebin.com/rf0wLjBg
I was not able to get into the source code when running kmail inside a gdb session yet, but I will try further to achieve this.
Because reproducing the akonadi crash takes more effort I started with the kmail segfault.
Is this more useful, or do I need to enable debugging for further packages?
My programming experience is more on an embedded uC level (no c++, no qt) , so it is hard for me to see what is going wrong.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7440
Location: Austria

PostPosted: Sat Feb 02, 2019 8:29 pm    Post subject: Reply with quote

To increase usefulness you would need to add debug info to qtwebengine as well, at least.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
tomtom69
Apprentice
Apprentice


Joined: 09 Nov 2010
Posts: 205
Location: Bavaria

PostPosted: Sat Feb 02, 2019 8:55 pm    Post subject: Reply with quote

qtwebengine was already emerged with debug info
from /etc/portage/package.env/kde-debug:
dev-qt/qtwebengine debugsyms installsources
Back to top
View user's profile Send private message
tomtom69
Apprentice
Apprentice


Joined: 09 Nov 2010
Posts: 205
Location: Bavaria

PostPosted: Mon Feb 04, 2019 7:03 pm    Post subject: Reply with quote

I did not succeed yet in getting gdb to show me the location where the segfault happens. gdb is able to start kmail and reports the segfault, but it doesn't show where the segfault happens:
https://pastebin.com/BcwqsYXc
Do I need to enable debugging on further libraries?

Because many issues are based on updated user profiles, I created a new user after the 18.12 update where I only set up keyboard layout and a test POP3 account on kmail. There is no difference when I use this newly created user profile.
Apart from this everything seems to work fine with the (not yet stabilized) kde-apps 18.12.
Back to top
View user's profile Send private message
tomtom69
Apprentice
Apprentice


Joined: 09 Nov 2010
Posts: 205
Location: Bavaria

PostPosted: Tue Feb 19, 2019 5:28 pm    Post subject: Reply with quote

updated to kde-apps-18.12.2 but still the same.
Back to top
View user's profile Send private message
iandoug
Guru
Guru


Joined: 11 Feb 2005
Posts: 566
Location: Cape Town, South Africa

PostPosted: Mon May 27, 2019 6:35 am    Post subject: Reply with quote

tomtom69 wrote:
updated to kde-apps-18.12.2 but still the same.


FWIW since I updated on the weekend, I also have this problem, which is excessively annoying.

The bug report says it was fixed ....

Cheers, Ian
_________________
Asus Sabertooth P990, AMD FX-8150, GeForce GTX 560, 16GB Ram | Asus M3A78 64, X2 6000+, PX9800 GT, 4GB Ram | Asus M4A77TD PRO, X2 245, HD4350, 4GB RAM
Back to top
View user's profile Send private message
tomtom69
Apprentice
Apprentice


Joined: 09 Nov 2010
Posts: 205
Location: Bavaria

PostPosted: Tue May 28, 2019 5:31 pm    Post subject: Reply with quote

Yes, the bug report says it was fixed, but I also still have this problem.
Were you able to extract more debug information? I tried to get some, but I was not able to track down the problem to a specific library or code snippet - probably also due to my lack in c++ programming experience...
Back to top
View user's profile Send private message
iandoug
Guru
Guru


Joined: 11 Feb 2005
Posts: 566
Location: Cape Town, South Africa

PostPosted: Tue May 28, 2019 6:41 pm    Post subject: Reply with quote

tomtom69 wrote:
Yes, the bug report says it was fixed, but I also still have this problem.
Were you able to extract more debug information? I tried to get some, but I was not able to track down the problem to a specific library or code snippet - probably also due to my lack in c++ programming experience...


Regret no. We've discussed it on the KDE-PIM user mailing list, and the bug has been re-opened.

I've tried to optimise the crashes by not closing messages, but rather reading a few at a time, and then closing one and letting it crash.

For replying, reply by right-clicking in the message list, rather than replying while the message is open, because that causes an immediate crash as well here.

Trust the devs will roll out the fix to stable as soon as it is available.

Cheers, Ian
_________________
Asus Sabertooth P990, AMD FX-8150, GeForce GTX 560, 16GB Ram | Asus M3A78 64, X2 6000+, PX9800 GT, 4GB Ram | Asus M4A77TD PRO, X2 245, HD4350, 4GB RAM


Last edited by iandoug on Sat Jun 01, 2019 2:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7440
Location: Austria

PostPosted: Sat Jun 01, 2019 8:58 am    Post subject: Reply with quote

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8e77815125e73f7baf630855845a5f4bb041e51
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
iandoug
Guru
Guru


Joined: 11 Feb 2005
Posts: 566
Location: Cape Town, South Africa

PostPosted: Sat Jun 01, 2019 2:16 pm    Post subject: Reply with quote

asturm wrote:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8e77815125e73f7baf630855845a5f4bb041e51


Working now, thanks a million :-)

Cheers, Ian
_________________
Asus Sabertooth P990, AMD FX-8150, GeForce GTX 560, 16GB Ram | Asus M3A78 64, X2 6000+, PX9800 GT, 4GB Ram | Asus M4A77TD PRO, X2 245, HD4350, 4GB RAM
Back to top
View user's profile Send private message
tomtom69
Apprentice
Apprentice


Joined: 09 Nov 2010
Posts: 205
Location: Bavaria

PostPosted: Sat Jun 01, 2019 8:56 pm    Post subject: Reply with quote

Also works here (at least tested successfully on 2 machines).
Thanks a lot for fixing this! :-)

tom
Back to top
View user's profile Send private message
sokhapkin
n00b
n00b


Joined: 13 Jan 2005
Posts: 39
Location: N Ft Myers, FL

PostPosted: Mon Jun 03, 2019 10:24 pm    Post subject: Reply with quote

I resolved all akonadi-related problems recently in the most efficient way:

Code:

USE=-pim

emerge thunderbird
emerge -uDn world
emerge --depclean


As a side effect I earned a lot of disk space and free RAM :-) I was a loyal kmail user for more than 10 years. Not any more.
_________________
Sergey Okhapkin
http://www.callwithus.com
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2575
Location: Near Toronto

PostPosted: Tue Jun 04, 2019 12:12 pm    Post subject: Reply with quote

Quote:
I resolved all akonadi-related problems recently in the most efficient way:


kmail has a pretty face, but the beauty is only skin-deep (I keep using it - along with
thunderbird - however :? )
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
tomtom69
Apprentice
Apprentice


Joined: 09 Nov 2010
Posts: 205
Location: Bavaria

PostPosted: Sun Jun 09, 2019 11:36 am    Post subject: Reply with quote

I also keep using kmail (and my family does also).
kmail itself now runs stable without crashes. What remains is the akonadi crash which appears often on first startup after system boot.
Because it happens only on first startup after boot, and because akonadi restarts itself it is by far not that annoying as the kmail crash was.
But I had the time to generate some debug information and investigate.
When akonadi crashes it leaves the following debug information
Code:

Application: akonadi_control (akonadi_control), signal: Aborted
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f55d9b71780 (LWP 4862))]

Thread 2 (Thread 0x7f55d7126700 (LWP 4864)):
#0  0x00007f55df316163 in poll () from /lib64/libc.so.6
#1  0x00007f55dd633837 in ?? () from /usr/lib64/libxcb.so.1
#2  0x00007f55dd6355fa in xcb_wait_for_event () from /usr/lib64/libxcb.so.1
#3  0x00007f55d94d7630 in ?? () from /usr/lib64/libQt5XcbQpa.so.5
#4  0x00007f55df6c3430 in QThreadPrivate::start(void*) () at thread/qthread_unix.cpp:361
#5  0x00007f55df201408 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f55df32234f in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f55d9b71780 (LWP 4862)):
[KCrash Handler]
#6  0x00007f55df254c44 in raise () from /lib64/libc.so.6
#7  0x00007f55df23e536 in abort () from /lib64/libc.so.6
#8  0x00007f55df68da4d in qt_message_fatal (context=..., message=<synthetic pointer>...) at global/qlogging.cpp:1901
#9  QMessageLogger::fatal (this=this@entry=0x7ffd6c3c0b90, msg=msg@entry=0x55e69fa45a58 "Cannot remove old log file '%s': %s") at global/qlogging.cpp:887
#10 0x000055e69fa11c0b in akInit (appName=...) at /usr/include/qt5/QtCore/qarraydata.h:208
#11 0x000055e69fa37da2 in AkApplicationBase::init() () at /usr/include/qt5/QtCore/qstring.h:829
#12 0x000055e69fa11e85 in AkApplicationImpl<QGuiApplication>::AkApplicationImpl (loggingCategory=..., argv=0x7ffd6c3c0ed8, argc=@0x7ffd6c3c0cec: 1, this=0x7ffd6c3c0d70) at /usr/include/qt5/QtCore/qscopedpointer.h:52
#13 main () at /usr/src/debug/kde-apps/akonadi-18.12.3-r1/akonadi-18.12.3/src/akonadicontrol/main.cpp:55
#14 0x00007f55df23fe9b in __libc_start_main () from /lib64/libc.so.6
#15 0x000055e69fa1254a in _start () at /usr/include/qt5/QtCore/qlogging.h:93

This looks very similar to the behaviour and debug information mentioned here
[url]
https://bugzilla.redhat.com/show_bug.cgi?id=1448691
[/url]
I tried to remove the .old log files (permissions were OK, i could delete them as a normal user), but it did not take long for the akonadi crashes to reappear.

However I did not find any upstream bug for this.
Back to top
View user's profile Send private message
tomtom69
Apprentice
Apprentice


Joined: 09 Nov 2010
Posts: 205
Location: Bavaria

PostPosted: Tue Jun 11, 2019 6:22 pm    Post subject: Reply with quote

I found out a little more.
There is a bug report existing at kde.org
[url]
https://bugs.kde.org/show_bug.cgi?id=392092
[/url]
When I start kmail in a terminal window I get the following output:
Code:

Cannot rename log file '/home/tom/.local/share/akonadi/akonadi_control.error' to '/home/tom/.local/share/akonadi/akonadi_control.error.old': Cannot create /home/tom/.local/share/akonadi/akonadi_control.error.old for output
KCrash: Application 'akonadi_control' crashing...
KCrash: Attempting to start /usr/lib64/libexec/drkonqi from kdeinit
sock_file=/var/run/user/1000/kdeinit5__0
Nouveau openGL driver detected. Qt WebEngine will disable usage of the GPU.
Note: you can set the QT_WEBENGINE_DISABLE_NOUVEAU_WORKAROUND
environment variable before running this application, but this is
not recommended since this usually causes applications to crash as
Nouveau openGL drivers don't support multithreaded rendering
QDBusConnection: name 'org.kde.kwalletd5' had owner '' but we thought it was ':1.60'

This looked strange to me so I created an additional patch so see whether someting is wrong at the delete statements for the log files:
Code:

--- a/src/shared/akdebug.cpp.a       2019-03-03 23:03:57.000000000 +0100
+++ b/src/shared/akdebug.cpp 2019-06-11 18:57:00.375941258 +0200
@@ -200,6 +200,8 @@ void akInit(const QString &appName)
     const auto errorLogFile = DebugPrivate::errorLogFileName(name);
     QFileInfo infoOld(errorLogFile + QLatin1String(".old"));
     if (infoOld.exists()) {
+       qCritical("Old log file '%s' exists. deleting...",qUtf8Printable(infoOld.fileName()));
         QFile fileOld(infoOld.absoluteFilePath());
+       qCritical("Old log file (complete) '%s' exists. deleting...",qUtf8Printable(fileOld.fileName()));
         const bool success = fileOld.remove();
         if (!success) {
@@ -207,6 +208,8 @@ void akInit(const QString &appName)
                 qUtf8Printable(fileOld.fileName()),
                 qUtf8Printable(fileOld.errorString()));
         }
+    } else {
+       qCritical("Old log file '%s' does not exist",qUtf8Printable(infoOld.fileName()));
     }
 
     QFileInfo info(errorLogFile);
@@ -219,7 +222,11 @@ void akInit(const QString &appName)
                    qUtf8Printable(file.fileName()),
                    qUtf8Printable(oldName),
                    qUtf8Printable(file.errorString()));
+        } else {
+         qCritical("log file '%s' renamed",qUtf8Printable(file.fileName()));
         }
+    } else {
+       qCritical("no log file to rename.");
     }
 
     QtMessageHandler origHandler = qInstallMessageHandler(akMessageHandler);

This patch resulted in some more output at first kmail startup after boot:
Code:

Old log file 'akonadi_control.error.old' exists. deleting...
Old log file (complete) '/home/tom/.local/share/akonadi/akonadi_control.error.old' exists. deleting...
Cannot rename log file '/home/tom/.local/share/akonadi/akonadi_control.error' to '/home/tom/.local/share/akonadi/akonadi_control.error.old': Cannot create /home/tom/.local/share/akonadi/akonadi_control.error.old for output
KCrash: Application 'akonadi_control' crashing...
KCrash: Attempting to start /usr/lib64/libexec/drkonqi from kdeinit
sock_file=/var/run/user/1000/kdeinit5__0
Nouveau openGL driver detected. Qt WebEngine will disable usage of the GPU.
Note: you can set the QT_WEBENGINE_DISABLE_NOUVEAU_WORKAROUND
environment variable before running this application, but this is
not recommended since this usually causes applications to crash as
Nouveau openGL drivers don't support multithreaded rendering
QDBusConnection: name 'org.kde.kwalletd5' had owner '' but we thought it was ':1.53'

But at this point I do not have any more idea what could be wrong. The complete path for the file deletion looks OK, but for some reason a new file with the .old name can not be created.

Should I get an account at bugs.kde.org and share this information there, or is this too gentoo-specific or interfering with the package maintainer's work?
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7440
Location: Austria

PostPosted: Thu Jun 13, 2019 5:12 pm    Post subject: Reply with quote

If you can rule out a local permissions issue then please definitely file a bug upstream, there's no interference whatsoever.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
tomtom69
Apprentice
Apprentice


Joined: 09 Nov 2010
Posts: 205
Location: Bavaria

PostPosted: Fri Jun 14, 2019 9:25 am    Post subject: Reply with quote

I added the debug output and description to the upstream bug report
https://bugs.kde.org/show_bug.cgi?id=392092
Back to top
View user's profile Send private message
tomtom69
Apprentice
Apprentice


Joined: 09 Nov 2010
Posts: 205
Location: Bavaria

PostPosted: Fri Jun 28, 2019 7:20 pm    Post subject: Reply with quote

The upstream bug report was updated with a patch
https://bugs.kde.org/show_bug.cgi?id=392092
I can apply this patch to kde-apps/akonadi-18.12.3-r1 and it solves the problem.
So both crashed seem to be solved now, either by kde-apps-19.04 or the patches for akonadi/kmail :D
Thanks to everyone who supported this!
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7440
Location: Austria

PostPosted: Sat Jun 29, 2019 8:53 am    Post subject: Reply with quote

Thanks, I've added that fix in akonadi-18.12.3-r2!
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum