Bug 409605

Summary: KAlarm: Failed to insert new part into database, Memory Leak probably related
Product: [Applications] kalarm Reporter: samuel.s.shannon
Component: AkonadiAssignee: David Jarvie <djarvie>
Status: RESOLVED UPSTREAM    
Severity: major    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: kalarmfilter=KSystemLog filtered on 'kalarm', wholeLogForError=KSysLog unfiltered on error pop-up.

Description samuel.s.shannon 2019-07-08 06:20:08 UTC
Created attachment 121376 [details]
kalarmfilter=KSystemLog filtered on 'kalarm', wholeLogForError=KSysLog unfiltered on error pop-up.

SUMMARY
When trying to add or edit a KAlarm, a foreign key constraint fails and the alarm is not added/edited, in fact existing alarms disappear from the list.

Also observed is a gradual memory leak in both KAlarm and akonadi_kalarm that probably wasn't happening before the database error, but I can't say for sure.

STEPS TO REPRODUCE
1. Open Kalarm
2. Add or Edit an Alarm
3. Click OK

1. Open Kalarm
2. Open resource monitor

OBSERVED RESULT
Add/Edit Alarm causes pop-up saying "Failed to Create Alarm"
Details: "Failed to insert new part into database"
Also, neither alarm appears in the list afterward, even if it was only being edited, though they do seem to return to the list after restarting Kalarm if they were created before the issue and only edited. The edit does not take effect.

Open Resource Monitor
Memory Usage increasing by ~1,000K/s for kalarm process
Memory Usage increasing by ~400K/s for akonadi_kalarm process

EXPECTED RESULT
Alarms are Created/Edited with no error pop-up and appear in the list if created, and stay in the list if edited.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 samuel.s.shannon 2019-07-08 06:30:06 UTC
Version is 2.12.3 as per kalarm --version

Uninstall kalarm -> Restart -> reinstall kalarm doesn't change the error either.
Comment 2 samuel.s.shannon 2019-07-11 01:23:41 UTC
Looks like it's Akonadi and MariaDB not playing nicely.

There's two alternate working fixes here:
https://bugs.archlinux.org/task/63025