D28739: Close the database connection to prevent file descriptor leak

Alexander Kandaurov noreply at phabricator.kde.org
Sat Apr 11 09:08:35 BST 2020


akandaurov created this revision.
Herald added projects: Dolphin, Frameworks.
Herald added subscribers: kfm-devel, kde-frameworks-devel.
akandaurov requested review of this revision.

REVISION SUMMARY
  The connection to the database doesn't get closed, which leads to a leakage of file descriptors to kactivities database files, eventually reaching the open file limit. Also, sometimes warnings about duplicate connections may appear in the console. This patch fixes this by closing and removing the connection.

TEST PLAN
  1. Right-click a file in Dolphin and hover the Activities menu. Do it several times.
  2. Check the output of
  
    ls -l /proc/`pidof dolphin`/fd
  
  for open descriptors to ~/.local/share/kactivitymanagerd/resources/database{,-wal}.

REPOSITORY
  R320 KIO Extras

REVISION DETAIL
  https://phabricator.kde.org/D28739

AFFECTED FILES
  activities/fileitemplugin/FileItemLinkingPluginActionLoader.cpp

To: akandaurov
Cc: kde-frameworks-devel, kfm-devel, azyx, nikolaik, pberestov, iasensio, fprice, LeGast00n, cblack, fbampaloukas, alexde, GB_2, Codezela, feverfew, meven, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp, rdieter, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200411/d333757c/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list