Bug 364525

Summary: kactivitymanagerd spams .xsession-errors with QSqlError messages
Product: [Unmaintained] kactivitymanagerd Reporter: James Ring <sjr>
Component: generalAssignee: Ivan Čukić <ivan.cukic>
Status: RESOLVED FIXED    
Severity: normal CC: plasma-bugs-null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description James Ring 2016-06-20 05:58:07 UTC
Hi there,

I noticed that all my disk space would be slowly eaten up. After digging, I found the culprit was kactivitymanagerd writing gigabytes of logs in a tight loop to $HOME/.xsession-errors. The error message was:

QSqlError("5", "Unable to fetch row", "database is locked")
"DELETE FROM ResourceScoreCache WHERE  usedActivity = '9181d38a-b709-4bbb-b13b-765a9a036ba2'  AND  1  AND targettedResource LIKE :targettedResource ESCAPE '\\'"

To work around, I blew away the $HOME/.local/share/kactivitymanagerd/resources/ directory and restarted KDE, after which all was OK. I don't know specific steps to reproduce, but possibly kactivitymanagerd should behave better in these circumstances.

Reproducible: Always
Comment 1 Ivan Čukić 2016-07-18 19:35:18 UTC
Git commit 8cd7c49424ba7c53e19eb0b3e18b75cc9beae3f5 by Ivan Čukić.
Committed on 18/07/2016 at 19:34.
Pushed by ivan into branch 'master'.

Write out only first two SQL errors not to overflow the .xsession-errors

M  +3    -1    src/service/plugins/sqlite/Utils.h

http://commits.kde.org/kactivitymanagerd/8cd7c49424ba7c53e19eb0b3e18b75cc9beae3f5