diff options
author | José Manuel Santamaría Lema <panfaust@gmail.com> | 2011-07-19 18:17:40 +0200 |
---|---|---|
committer | José Manuel Santamaría Lema <panfaust@gmail.com> | 2011-07-19 18:18:06 +0200 |
commit | 5178d2c715c5a0ce272150620de46ba298460b20 (patch) | |
tree | 93d4d0d6e065c1a5e92ef07d6d29620cee4d0b8b | |
parent | b6ce92332794f68a1c78c6c318d94bdc5f7e6e84 (diff) | |
download | kde4libs-5178d2c715c5a0ce272150620de46ba298460b20.tar.gz |
Add kded4_deadlock.patch
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | debian/patches/kded4_deadlock.patch | 88 | ||||
-rw-r--r-- | 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@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@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 |