Bug 462362

Summary: Memory leak in akonadi_ical_resource with remote calendars
Product: [Frameworks and Libraries] Akonadi Reporter: Katalin Rebhan <me>
Component: ICal file resourceAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.21.3   
Target Milestone: ---   
Platform: NixOS   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Debugger log for akonadi_ical_resource

Description Katalin Rebhan 2022-11-28 17:45:43 UTC
Created attachment 154116 [details]
Debugger log for akonadi_ical_resource

SUMMARY
One of the iCal URLs I have connected to Akonadi refreshes every about 3 seconds and seems to leak memory in the agent process (about 300kB) every time it does, eventually causing the system to lock up if not restarted (no idea why instead of the process getting OOM killed, as I do not have any swap). This does not happen for the other iCal URL resource, it refreshes without leaking memory.

I attached the log from Akonadi Console for the agent (removed the URL for the calendar). Additionally, every time it refreshes, this gets printed to stdout:

> kf.i18n: KLocalizedString: Using an empty domain, fix the code. msgid: "%1, %2" msgid_plural: "" msgctxt: "Two statuses, for example \"Online, Running (66%)\" or \"Offline, Broken\""
> kf.i18n: KLocalizedString: Using an empty domain, fix the code. msgid: "%1, %2" msgid_plural: "" msgctxt: "Two statuses, for example \"Online, Running (66%)\" or \"Offline, Broken\""
> kf.i18n: KLocalizedString: Using an empty domain, fix the code. msgid: "%1, %2" msgid_plural: "" msgctxt: "Two statuses, for example \"Online, Running (66%)\" or \"Offline, Broken\""
> The hash has changed.

STEPS TO REPRODUCE
1. Honestly, I have no idea, since it only occurs with one calendar I'm subscribed to.

OBSERVED RESULT
On every refresh (visible from Akonadi Console) the memory usage of akonadi_ical_resource process increases.

EXPECTED RESULT
akonadi_ical_resource memory usage should not grow indefinitely.

SOFTWARE/OS VERSIONS
Operating System: NixOS 22.11
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7
Kernel Version: 5.15.79 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 23.4 GiB of RAM
Graphics Processor: AMD Radeon RX Vega

ADDITIONAL INFORMATION