Hello community, here is the log from the commit of package libksysguard5 for openSUSE:Factory checked in at 2020-10-30 11:47:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libksysguard5 (Old) and /work/SRC/openSUSE:Factory/.libksysguard5.new.3463 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libksysguard5" Fri Oct 30 11:47:42 2020 rev:113 rq:844906 version:5.20.2 Changes: -------- --- /work/SRC/openSUSE:Factory/libksysguard5/libksysguard5.changes 2020-10-22 14:25:08.954904689 +0200 +++ /work/SRC/openSUSE:Factory/.libksysguard5.new.3463/libksysguard5.changes 2020-10-30 11:48:00.369725309 +0100 @@ -1,0 +2,16 @@ +Thu Oct 29 15:03:03 UTC 2020 - Fabian Vogt <fab...@ritter-vogt.de> + +- Add patch to fix memory leak (kde#428048): + * 0001-Autodelete-smapsRunnable.patch + +------------------------------------------------------------------- +Tue Oct 27 20:43:50 UTC 2020 - Fabian Vogt <fab...@ritter-vogt.de> + +- Update to 5.20.2 + * New bugfix release + * For more details please see: + * https://kde.org/announcements/plasma-5.20.2 +- Changes since 5.20.1: + * Handle smap read result in the correct thread (kde#428160) + +------------------------------------------------------------------- Old: ---- libksysguard-5.20.1.tar.xz libksysguard-5.20.1.tar.xz.sig New: ---- 0001-Autodelete-smapsRunnable.patch libksysguard-5.20.2.tar.xz libksysguard-5.20.2.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libksysguard5.spec ++++++ --- /var/tmp/diff_new_pack.C5tE10/_old 2020-10-30 11:48:01.085725943 +0100 +++ /var/tmp/diff_new_pack.C5tE10/_new 2020-10-30 11:48:01.089725947 +0100 @@ -18,18 +18,20 @@ %bcond_without lang Name: libksysguard5 -Version: 5.20.1 +Version: 5.20.2 Release: 0 Summary: Task management and system monitoring library License: GPL-2.0-or-later Group: Development/Libraries/C and C++ URL: http://www.kde.org -Source: libksysguard-%{version}.tar.xz +Source: https://download.kde.org/stable/plasma/%{version}/libksysguard-%{version}.tar.xz %if %{with lang} -Source1: libksysguard-%{version}.tar.xz.sig +Source1: https://download.kde.org/stable/plasma/%{version}/libksysguard-%{version}.tar.xz.sig Source2: plasma.keyring %endif Source3: baselibs.conf +# PATCH-FIX-UPSTREAM +Patch1: 0001-Autodelete-smapsRunnable.patch BuildRequires: extra-cmake-modules >= 1.2.0 BuildRequires: kf5-filesystem BuildRequires: xz ++++++ 0001-Autodelete-smapsRunnable.patch ++++++ >From ebcf87527c32db0b6685c63a450489d2c6727069 Mon Sep 17 00:00:00 2001 From: David Edmundson <k...@davidedmundson.co.uk> Date: Thu, 29 Oct 2020 11:07:36 +0000 Subject: [PATCH] Autodelete smapsRunnable The runnable has an early return on error conditions. This means finished() might never be called. Now we've removed the accessor and provide the return value in the signal we can just set autoDelete. BUG: 428048 --- processcore/processes_linux_p.cpp | 2 -- processcore/read_procsmaps_runnable.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/processcore/processes_linux_p.cpp b/processcore/processes_linux_p.cpp index 6882f82..ee5559c 100644 --- a/processcore/processes_linux_p.cpp +++ b/processcore/processes_linux_p.cpp @@ -558,8 +558,6 @@ bool ProcessesLocal::updateProcessInfo( long pid, Process *process) Q_EMIT processUpdated(pid, { { Process::VmPSS, pss } }); }); - connect(runnable, &ReadProcSmapsRunnable::finished, runnable, &QObject::deleteLater); - QThreadPool::globalInstance()->start(runnable); if(!d->readProcStat(dir, process)) success = false; diff --git a/processcore/read_procsmaps_runnable.cpp b/processcore/read_procsmaps_runnable.cpp index ecace51..b91466b 100644 --- a/processcore/read_procsmaps_runnable.cpp +++ b/processcore/read_procsmaps_runnable.cpp @@ -14,7 +14,7 @@ ReadProcSmapsRunnable::ReadProcSmapsRunnable(const QString &dir) : QObject() , m_dir(dir) { - setAutoDelete(false); + setAutoDelete(true); } void ReadProcSmapsRunnable::run() -- 2.25.1 ++++++ libksysguard-5.20.1.tar.xz -> libksysguard-5.20.2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libksysguard-5.20.1/CMakeLists.txt new/libksysguard-5.20.2/CMakeLists.txt --- old/libksysguard-5.20.1/CMakeLists.txt 2020-10-20 14:02:28.000000000 +0200 +++ new/libksysguard-5.20.2/CMakeLists.txt 2020-10-27 13:22:15.000000000 +0100 @@ -2,7 +2,7 @@ project(libksysguard) -set(PROJECT_VERSION "5.20.1") +set(PROJECT_VERSION "5.20.2") set(PROJECT_VERSION_MAJOR 5) # check with non-Plasma consumers (e.g. KDevelop) before bumping these versions to make sure the KDE CI does not break diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libksysguard-5.20.1/po/it/KSysGuardSensorFaces.po new/libksysguard-5.20.2/po/it/KSysGuardSensorFaces.po --- old/libksysguard-5.20.1/po/it/KSysGuardSensorFaces.po 2020-10-20 14:02:11.000000000 +0200 +++ new/libksysguard-5.20.2/po/it/KSysGuardSensorFaces.po 2020-10-27 13:21:59.000000000 +0100 @@ -15,7 +15,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Lokalize 20.04.3\n" +"X-Generator: Lokalize 20.08.2\n" #: Choices.qml:313 #, kde-format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libksysguard-5.20.1/processcore/processes_linux_p.cpp new/libksysguard-5.20.2/processcore/processes_linux_p.cpp --- old/libksysguard-5.20.1/processcore/processes_linux_p.cpp 2020-10-20 14:02:02.000000000 +0200 +++ new/libksysguard-5.20.2/processcore/processes_linux_p.cpp 2020-10-27 13:21:47.000000000 +0100 @@ -550,13 +550,16 @@ bool ProcessesLocal::updateProcessInfo( long pid, Process *process) { bool success = true; - QString dir = QLatin1String("/proc/") + QString::number(pid) + QLatin1Char('/'); + const QString dir = QLatin1String("/proc/") + QString::number(pid) + QLatin1Char('/'); auto runnable = new ReadProcSmapsRunnable{dir}; - connect(runnable, &ReadProcSmapsRunnable::finished, this, [this, pid, runnable]() { - Q_EMIT processUpdated(pid, { { Process::VmPSS, runnable->pss() } }); - runnable->deleteLater(); - }, Qt::DirectConnection); + + connect(runnable, &ReadProcSmapsRunnable::finished, this, [this, pid, runnable](qulonglong pss) { + Q_EMIT processUpdated(pid, { { Process::VmPSS, pss } }); + }); + + connect(runnable, &ReadProcSmapsRunnable::finished, runnable, &QObject::deleteLater); + QThreadPool::globalInstance()->start(runnable); if(!d->readProcStat(dir, process)) success = false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libksysguard-5.20.1/processcore/read_procsmaps_runnable.cpp new/libksysguard-5.20.2/processcore/read_procsmaps_runnable.cpp --- old/libksysguard-5.20.1/processcore/read_procsmaps_runnable.cpp 2020-10-20 14:02:02.000000000 +0200 +++ new/libksysguard-5.20.2/processcore/read_procsmaps_runnable.cpp 2020-10-27 13:21:47.000000000 +0100 @@ -24,20 +24,15 @@ return; } - m_pss = 0LL; + qulonglong pss = 0LL; auto buffer = QByteArray{1024, '\0'}; while (file.readLine(buffer.data(), buffer.size()) > 0) { if (buffer.startsWith("Pss:")) { - m_pss += std::stoll(buffer.mid(sizeof("Pss:")).toStdString()); + pss += std::stoll(buffer.mid(sizeof("Pss:")).toStdString()); } } file.close(); - Q_EMIT finished(); -} - -qlonglong ReadProcSmapsRunnable::pss() const -{ - return m_pss; + Q_EMIT finished(pss); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libksysguard-5.20.1/processcore/read_procsmaps_runnable.h new/libksysguard-5.20.2/processcore/read_procsmaps_runnable.h --- old/libksysguard-5.20.1/processcore/read_procsmaps_runnable.h 2020-10-20 14:02:02.000000000 +0200 +++ new/libksysguard-5.20.2/processcore/read_procsmaps_runnable.h 2020-10-27 13:21:47.000000000 +0100 @@ -19,13 +19,10 @@ void run() override; - qlonglong pss() const; - - Q_SIGNAL void finished(); + Q_SIGNAL void finished(qulonglong pss); private: QString m_dir; - qlonglong m_pss = 0; }; } // namespace KSysGuard