[SCM] KDE Development Platform Libraries module packaging branch, master, updated. debian/4.6.5-1-2-g5178d2c

José Manuel Santamaría Lema santa-guest at alioth.debian.org
Tue Jul 19 16:18:58 UTC 2011


The following commit has been merged in the master branch:
commit 5178d2c715c5a0ce272150620de46ba298460b20
Author: José Manuel Santamaría Lema <panfaust at gmail.com>
Date:   Tue Jul 19 18:17:40 2011 +0200

    Add kded4_deadlock.patch
---
 debian/changelog                    |    3 +
 debian/patches/kded4_deadlock.patch |   88 +++++++++++++++++++++++++++++++++++
 debian/patches/series               |    1 +
 3 files changed, 92 insertions(+), 0 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 779e96e..b3e11ff 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,8 @@
 kde4libs (4:4.6.5-2) UNRELEASED; urgency=low
 
+  [ José Manuel Santamaría Lema ]
+  * Add kded4_deadlock.patch to prevent a deadlock triggered sometimes
+    in kded4. (Closes: #621358)
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Tue, 19 Jul 2011 13:54:44 +0200
 
diff --git a/debian/patches/kded4_deadlock.patch b/debian/patches/kded4_deadlock.patch
new file mode 100644
index 0000000..b00a73a
--- /dev/null
+++ b/debian/patches/kded4_deadlock.patch
@@ -0,0 +1,88 @@
+Author: Mario Bensi <mbensi at ipsquad.net>
+Origin: https://projects.kde.org/projects/kde/kdelibs/repository/revisions/42d40d1d351588a71bef0af1d62a8f6dc586f141
+Origin: https://projects.kde.org/projects/kde/kdelibs/repository/revisions/350a5d8de016b6daa36c6e29d5d5f83ad6c2b38d
+Applied-Upstream: 4.7.0
+Description: This patch is suposed to prevent deadlocks in kded4.
+ This patch includes the changes of a couple of upstream commits, these are the
+ commit messages:
+
+ ID: 42d40d1d351588a71bef0af1d62a8f6dc586f141
+ Fix crash during the QFileSystemWatcher destruction
+ The QFileSystemWatcher doesn't work correctly in a singleton
+ The solution so far was to destroy the QFileSystemWatcher when the
+ application quits but we have some crash with this solution.
+ For the moment to workaround the problem, we detach the
+ QFileSystemWatcher from the parent effectively leaking it on purpose.
+
+ ID: 350a5d8de016b6daa36c6e29d5d5f83ad6c2b38d
+ Fix solid test
+ I need to detach parent on QFileSystemWatcher when the FstabWatcher
+ destructor are called if the aboutToQuit is not called. It's the case in
+ test.
+
+---
+ solid/solid/backends/fstab/fstabwatcher.cpp |   24 +++++++++++++++++++++++-
+ solid/solid/backends/fstab/fstabwatcher.h   |    1 +
+ 2 files changed, 24 insertions(+), 1 deletion(-)
+
+--- a/solid/solid/backends/fstab/fstabwatcher.cpp
++++ b/solid/solid/backends/fstab/fstabwatcher.cpp
+@@ -40,6 +40,9 @@ FstabWatcher::FstabWatcher()
+     : m_isRoutineInstalled(false)
+     , m_fileSystemWatcher(new QFileSystemWatcher(this))
+ {
++    if (qApp) {
++        connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(orphanFileSystemWatcher()));
++    }
+     m_fileSystemWatcher->addPath(MTAB);
+     m_fileSystemWatcher->addPath(FSTAB);
+     connect(m_fileSystemWatcher, SIGNAL(fileChanged(QString)), this, SLOT(onFileChanged(QString)));
+@@ -47,11 +50,27 @@ FstabWatcher::FstabWatcher()
+ 
+ FstabWatcher::~FstabWatcher()
+ {
+-    qRemovePostRoutine(globalFstabWatcher.destroy);
++    // The QFileSystemWatcher doesn't work correctly in a singleton
++    // The solution so far was to destroy the QFileSystemWatcher when the application quits
++    // But we have some crash with this solution.
++    // For the moment to workaround the problem, we detach the QFileSystemWatcher from the parent
++    // effectively leaking it on purpose.
++
++#if 0
++    //qRemovePostRoutine(globalFstabWatcher.destroy);
++#else
++    m_fileSystemWatcher->setParent(0);
++#endif
++}
++
++void FstabWatcher::orphanFileSystemWatcher()
++{
++    m_fileSystemWatcher->setParent(0);
+ }
+ 
+ FstabWatcher *FstabWatcher::instance()
+ {
++#if 0
+     FstabWatcher *fstabWatcher = globalFstabWatcher;
+ 
+     if (fstabWatcher && !fstabWatcher->m_isRoutineInstalled) {
+@@ -59,6 +78,9 @@ FstabWatcher *FstabWatcher::instance()
+         fstabWatcher->m_isRoutineInstalled = true;
+     }
+     return fstabWatcher;
++#else
++    return globalFstabWatcher;
++#endif
+ }
+ 
+ 
+--- a/solid/solid/backends/fstab/fstabwatcher.h
++++ b/solid/solid/backends/fstab/fstabwatcher.h
+@@ -46,6 +46,7 @@ namespace Fstab
+ 
+     private Q_SLOTS:
+         void onFileChanged(const QString &path);
++        void orphanFileSystemWatcher();
+ 
+     private:
+         bool m_isRoutineInstalled;
diff --git a/debian/patches/series b/debian/patches/series
index 76005a4..31994a1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -20,3 +20,4 @@ add_dlrestrictions_support.diff
 findpythonlibrary_layout_deb_on_debian.diff
 ktar_header_checksum_fix.diff
 ktar_longlink_length_in_bytes.diff
+kded4_deadlock.patch

-- 
KDE Development Platform Libraries module packaging



More information about the pkg-kde-commits mailing list