Bug 325539 - akonadi_googlec runaway process on SSL certificate failure
Summary: akonadi_googlec runaway process on SSL certificate failure
Status: RESOLVED UNMAINTAINED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: Google Resource (show other bugs)
Version: 4.11
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Daniel Vrátil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-02 09:36 UTC by Māris Nartišs
Modified: 2017-01-07 22:37 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Click trough triggering issue (271.42 KB, image/png)
2013-10-03 06:33 UTC, Māris Nartišs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Māris Nartišs 2013-10-02 09:36:26 UTC
Sometimes after boot Google calendar provided SSL certificate is considered to be invalid. When clicking "Details" to view details, details dialog offers only "close" option and there is no more window with "accept certificate" option. Instead akonadi_googec process starts to consume CPU and has steady memory use increase till it gets killed by OOM killer.

Reproducible: Sometimes

Steps to Reproduce:
1. When Google certificate error comes up, click on "Details" (no idea why sometimes the certificate isn't accepted)
2. Review details and click on only button to close dialog
3. Observe how akonadi_googelc goes mad
Actual Results:  
akonadi_googlec consumes all system RAM and gets killed.

Expected Results:  
Provide dialog to "accept" or "reject" certificate after reviewing it's details and do not go mad about it.

strace of stuck akonadi_googlec:
clock_gettime(CLOCK_MONOTONIC, {366, 961650092}) = 0
recvfrom(6, 0x167fda4, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=6, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=13, events=POLLIN}], 6, 0) = 2 ([{fd=3, revents=POLLIN}, {fd=13, revents=POLLIN}])
read(3, "\4\0\0\0\0\0\0\0", 16)         = 8
clock_gettime(CLOCK_MONOTONIC, {366, 961650092}) = 0
recvfrom(6, 0x167fda4, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
ioctl(13, FIONREAD, [82])               = 0
read(13, "    48_1d_\0\0\0\6\0\0\0$\0w\0w\0w\0.\0g\0o\0o"..., 82) = 82
write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
clock_gettime(CLOCK_MONOTONIC, {366, 961650092}) = 0
recvfrom(6, 0x167fda4, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=6, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=13, events=POLLIN}], 6, 0) = 1 ([{fd=3, revents=POLLIN}])
read(3, "\1\0\0\0\0\0\0\0", 16)         = 8
clock_gettime(CLOCK_MONOTONIC, {366, 961650092}) = 0
recvfrom(6, 0x167fda4, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
clock_gettime(CLOCK_MONOTONIC, {366, 961650092}) = 0
recvfrom(6, 0x167fda4, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=6, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=13, events=POLLIN}], 6, 0) = 1 ([{fd=3, revents=POLLIN}])
read(3, "\2\0\0\0\0\0\0\0", 16)         = 8
clock_gettime(CLOCK_MONOTONIC, {366, 961650092}) = 0
recvfrom(6, 0x167fda4, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
clock_gettime(CLOCK_MONOTONIC, {366, 961650092}) = 0
clock_gettime(CLOCK_MONOTONIC, {366, 961650092}) = 0
select(14, [13], [13], NULL, NULL)      = 1 (out [13])
write(13, "     4_53_\0\0\0\1", 14)     = 14
write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
clock_gettime(CLOCK_MONOTONIC, {366, 961650092}) = 0
recvfrom(6, 0x167fda4, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=6, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=13, events=POLLIN}], 6, 0) = 2 ([{fd=3, revents=POLLIN}, {fd=13, revents=POLLIN}])
read(3, "\4\0\0\0\0\0\0\0", 16)         = 8
clock_gettime(CLOCK_MONOTONIC, {366, 961650092}) = 0
recvfrom(6, 0x167fda4, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
ioctl(13, FIONREAD, [462])              = 0
Comment 1 Daniel Vrátil 2013-10-02 10:25:18 UTC
Could you please provide screenshots of the dialogs when it happens again? Thanks
Comment 2 Māris Nartišs 2013-10-03 06:33:41 UTC
Created attachment 82633 [details]
Click trough triggering issue

Screenshots with dialogs and clickable buttons. top view is a few minutes after closing the second dialog - memory use is constantly growing from ~1% till OOM (or in this case - kill)

Translation of the first dialog content:
Server has failed authentication test (www.googleapis.com)
Certificate authority certificate is not valid
Root certificate authority certificate is not trustworthy for this use
Comment 3 Thomas Murach 2013-11-18 19:11:47 UTC
I have exactly the same problem. I can reproduce it whenever I click on "details" in the certificate dialog, regardless if the dialog was shown by rekonq or amarok or whatever. Recently I've seen this problem with a librivox.org certificate. Thus I'd say that this is not a google resource issue, but a more global one.
I can provide screenshots, ..., if needed.
Comment 4 Thiago Jung Bauermann 2013-11-23 16:07:58 UTC
I have this problem too (KDE 4.11.2, Qt 4.8.2). There's bug 312550 against kio/kssl which I believe is the cause of the SSL certificate failure. I suspect that the problem is triggered with 128-bit RC4 certificates.

I didn't notice that the resource's runaway behavior was related to clicking on the Details button. I'll experiment with that to confirm whether that is the case for me too.
Comment 5 happy 2013-12-28 09:32:35 UTC
Same here I think... used to the SSL certificate complaint and _usually_ I just accept use of the certificate for "this session" and all is good.  However, if you choose "Details..." in that dialog you never get the chance to accept for this session etc.

CPU currently at 71%, but seems to be spread over cores and no one core pegged at 100%.
Memory consumption is about 3GB in the last thirty minutes.

memory details:

Process 2982 - akonadi_googlecalendar_resource

Summary

The process akonadi_googlecalend (with pid 2982) is using approximately 7.7 GB of memory.
It is using 7.7 GB privately, and a further 30.4 MB that is, or could be, shared with other programs.
Dividing up the shared memory between all the processes sharing that memory we get a reduced shared memory usage of 1525.0 KB. Adding that to the private usage, we get the above mentioned total memory footprint of 7.7 GB.
1208.0 KB is swapped out to disk, probably due to a low amount of available memory left.
Library Usage

The memory usage of a process is found by adding up the memory usage of each of its libraries, plus the process's own heap, stack and any other mappings. 
Private
more
8117304 KB	[heap]
1648 KB	/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4.10.2
292 KB	/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.4
184 KB	/usr/lib/libkdeui.so.5.11.3
152 KB	/usr/bin/akonadi_googlecalendar_resource
Shared
more
4188 KB	/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.4
4032 KB	/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4.10.2
1996 KB	/usr/lib/libkdeui.so.5.11.3
1616 KB	/usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.4
1576 KB	/usr/lib/libkdecore.so.5.11.3
Totals

Private	8122284 KB	(= 188 KB clean + 8122096 KB dirty)
Shared	31096 KB	(= 31088 KB clean + 8 KB dirty)
Rss	8153380 KB	(= Private + Shared)
Pss	8123809 KB	(= Private + Shared/Number of Processes)
Swap	1208 KB
Comment 6 piotr.nastaly 2014-02-11 13:33:00 UTC
I have same problem, after checking the certificate,  I can only close the window, akonadi_googlec, starts to grow and uses lots of resources.

I have few google calendars connected. The problem appeared first maybe 2 weeks ago.

Kde 4.11.5
akonadi-kde-resource-googledata 1.2.0-1
system is kubuntu 3.11.0-17-generic #31-Ubuntu SMP Mon Feb 3 21:53:31 UTC 2014 i686 i686 i686 GNU/Linux
Comment 7 Māris Nartišs 2014-08-01 08:28:03 UTC
There is a behaviour change in KDE invalid SSL certificate prompting dialog. Now after closing the "Details" window, I get back to the first window with "Details", "Continue", "Cancel" options and I do not observe runaway processes.

Tested with: kdelibs-4.13.2

Other reporters - please test with more recent version, as it seems that this bug has been fixed and can be closed.
Comment 8 Denis Kurz 2016-09-24 20:38:47 UTC
This bug has only been reported for versions older than KDEPIM 4.14 (at most akonadi-1.3). Can anyone tell if this bug still present?

If noone confirms this bug for a recent version of akonadi (part of KDE Applications 15.08 or later), it gets closed in about three months.
Comment 9 Denis Kurz 2017-01-07 22:37:16 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.