Debian Bug report logs - #678714
kde-config-gtk-style: Applet tries to scan user home directory, endlessly following symlinks

version graph

Package: kde-config-gtk-style; Maintainer for kde-config-gtk-style is Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>; Source for kde-config-gtk-style is src:kde-gtk-config.

Reported by: Grigory Ivanov <grundik-com@grundik.spb.ru>

Date: Sat, 23 Jun 2012 22:39:01 UTC

Severity: grave

Found in version kde-gtk-config/3:2.0-3

Fixed in version kde-gtk-config/3:2.1-1

Done: Boris Pek <tehnick-8@mail.ru>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>:
Bug#678714; Package kde-config-gtk-style. (Sat, 23 Jun 2012 22:39:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Grigory Ivanov <grundik-com@grundik.spb.ru>:
New Bug report received and forwarded. Copy sent to Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>. (Sat, 23 Jun 2012 22:39:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Grigory Ivanov <grundik-com@grundik.spb.ru>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: kde-config-gtk-style: Applet tries to scan user home directory, endlessly following symlinks
Date: Sun, 24 Jun 2012 02:37:03 +0400
Package: kde-config-gtk-style
Version: 3:2.0-3
Severity: grave
Justification: renders package unusable

Dear Maintainer,

At the initialization this KCM hangs infinitely. Strace shows, that module
walks through file system, follows circular symlinks, and never stops.

1. Following the symlinks without checking may cause an infinite loop if they
are circular. Search should not endlessly walk in circles.
2. Its pointless to fully scan user home directory anyways. What it is trying
to find? Size of mine ~ is several Tb, it contains millions of files, such full
scan would take hours. Search should be limited to some specific folders.



-- System Information:
Debian Release: wheezy/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages kde-config-gtk-style depends on:
ii  libc6            2.13-33
ii  libglib2.0-0     2.33.2-1
ii  libgtk-3-0       3.4.2-1
ii  libgtk2.0-0      2.24.10-1
ii  libkdecore5      4:4.8.4-1
ii  libkdeui5        4:4.8.4-1
ii  libkio5          4:4.8.4-1
ii  libknewstuff3-4  4:4.8.4-1
ii  libqtcore4       4:4.8.2-1
ii  libqtgui4        4:4.8.2-1
ii  libstdc++6       4.7.1-1

kde-config-gtk-style recommends no packages.

kde-config-gtk-style suggests no packages.

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>:
Bug#678714; Package kde-config-gtk-style. (Tue, 03 Jul 2012 20:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Boris Pek <Tehnick-8@yandex.ru>:
Extra info received and forwarded to list. Copy sent to Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>. (Tue, 03 Jul 2012 20:39:03 GMT) Full text and rfc822 format available.

Message #10 received at 678714@bugs.debian.org (full text, mbox):

From: Boris Pek <Tehnick-8@yandex.ru>
To: Grigory Ivanov <grundik-com@grundik.spb.ru>,678714@bugs.debian.org
Subject: Re: kde-config-gtk-style: Applet tries to scan user home directory, endlessly following symlinks
Date: Tue, 03 Jul 2012 23:35:21 +0300
Hi,

I have prepared a patch for ignoring symlinks. But I need more info about your
second point.

Program don't scan user's home directory, but only ~/.themes/ subdirectory.
So I think the problem is related with symlinks. Could you check it please?

Also strace log can be helpful. Because I have no such problem.

Best regards,
Boris




Information forwarded to debian-bugs-dist@lists.debian.org, Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>:
Bug#678714; Package kde-config-gtk-style. (Tue, 03 Jul 2012 23:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Grigory Ivanov <grundik-com@grundik.spb.ru>:
Extra info received and forwarded to list. Copy sent to Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>. (Tue, 03 Jul 2012 23:00:03 GMT) Full text and rfc822 format available.

Message #15 received at 678714@bugs.debian.org (full text, mbox):

From: Grigory Ivanov <grundik-com@grundik.spb.ru>
To: Boris Pek <Tehnick-8@yandex.ru>
Cc: 678714@bugs.debian.org
Subject: Re: kde-config-gtk-style: Applet tries to scan user home directory, endlessly following symlinks
Date: Wed, 04 Jul 2012 02:31:00 +0400
Hello!

On 04.07.2012 00:35, Boris Pek wrote:
> I have prepared a patch for ignoring symlinks. But I need more info about your
> second point.
> 
> Program don't scan user's home directory, but only ~/.themes/ subdirectory.
> So I think the problem is related with symlinks. Could you check it please?

I do not have ~/.themes directory, and nothing changes if I create it.
Program still tries to scan whole ~.

> Also strace log can be helpful. Because I have no such problem.

May be your ~ is small enough to not notice the problem?
Output of strace kcmshell4 kde-gtk-config can be found here:
http://dl.dropbox.com/u/19479318/gtkstyle.log.gz

Thanks.




Added tag(s) pending. Request was from Boris Pek <Tehnick-8@yandex.ru> to control@bugs.debian.org. (Thu, 05 Jul 2012 22:00:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>:
Bug#678714; Package kde-config-gtk-style. (Wed, 11 Jul 2012 11:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aleix Pol <aleixpol@kde.org>:
Extra info received and forwarded to list. Copy sent to Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>. (Wed, 11 Jul 2012 11:39:07 GMT) Full text and rfc822 format available.

Message #22 received at 678714@bugs.debian.org (full text, mbox):

From: Aleix Pol <aleixpol@kde.org>
To: kde-commits@kde.org
Cc: 678714@bugs.debian.org
Subject: [kde-gtk-config] src: Fix freezing problem on load
Date: Wed, 11 Jul 2012 13:28:48 +0200 (CEST)
Git commit 81b7e1e43e5fce39ace676ef40637059b9bb9317 by Aleix Pol.
Committed on 11/07/2012 at 13:29.
Pushed by apol into branch 'master'.

Fix freezing problem on load

Don't iterate over the home directory, this happened in cases
where the fallback icon theme was set to "" and Qt translated it
to QDir("") which was CWD.

CCMAIL: 678714@bugs.debian.org

M  +6    -2    src/gtkconfigkcmodule.cpp
M  +1    -0    src/iconthemesmodel.cpp

http://commits.kde.org/kde-gtk-config/81b7e1e43e5fce39ace676ef40637059b9bb9317

diff --git a/src/gtkconfigkcmodule.cpp b/src/gtkconfigkcmodule.cpp
index 03cea95..9a2bbb3 100644
--- a/src/gtkconfigkcmodule.cpp
+++ b/src/gtkconfigkcmodule.cpp
@@ -200,7 +200,9 @@ void tryIcon(QLabel* label, const QString& fallback, const QString& theme, const
 {
     label->setToolTip(iconName);
     
-    QString ret = IconThemesModel::findFilesRecursively(QStringList(iconName+".*"), theme);
+    QString ret;
+    if(!theme.isEmpty())
+        ret = IconThemesModel::findFilesRecursively(QStringList(iconName+".*"), theme);
     if(!ret.isEmpty()) {
         QPixmap p(ret);
         Q_ASSERT(!p.isNull());
@@ -208,7 +210,9 @@ void tryIcon(QLabel* label, const QString& fallback, const QString& theme, const
         return;
     }
     
-    ret = IconThemesModel::findFilesRecursively(QStringList(iconName+".*"), fallback);
+    if(!fallback.isEmpty())
+        ret = IconThemesModel::findFilesRecursively(QStringList(iconName+".*"), fallback);
+    
     if(!ret.isEmpty()) {
         QPixmap p(ret);
         Q_ASSERT(!p.isNull());
diff --git a/src/iconthemesmodel.cpp b/src/iconthemesmodel.cpp
index 4cf54cf..6167ace 100644
--- a/src/iconthemesmodel.cpp
+++ b/src/iconthemesmodel.cpp
@@ -78,6 +78,7 @@ bool greatSizeIs48(const QString& a, const QString& b)
 
 QString IconThemesModel::findFilesRecursively(const QStringList& wildcard, const QDir& directory)
 {
+    Q_ASSERT(directory.isAbsolute());
     QFileInfoList entries = directory.entryInfoList(wildcard, QDir::Files);
     foreach(const QFileInfo& f, entries) {
         return f.absoluteFilePath();




Information forwarded to debian-bugs-dist@lists.debian.org, Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>:
Bug#678714; Package kde-config-gtk-style. (Sun, 15 Jul 2012 08:03:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Boris Pek <Tehnick-8@yandex.ru>:
Extra info received and forwarded to list. Copy sent to Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>. (Sun, 15 Jul 2012 08:03:03 GMT) Full text and rfc822 format available.

Message #27 received at 678714@bugs.debian.org (full text, mbox):

From: Boris Pek <Tehnick-8@yandex.ru>
To: Aleix Pol <aleixpol@kde.org>,"678714@bugs.debian.org" <678714@bugs.debian.org>
Subject: Re: Bug#678714: [kde-gtk-config] src: Fix freezing problem on load
Date: Sun, 15 Jul 2012 10:52:51 +0300
> Git commit 81b7e1e43e5fce39ace676ef40637059b9bb9317 by Aleix Pol.
> Committed on 11/07/2012 at 13:29.
> Pushed by apol into branch 'master'.
>
> Fix freezing problem on load
>
> Don't iterate over the home directory, this happened in cases
> where the fallback icon theme was set to "" and Qt translated it
> to QDir("") which was CWD.
>
> CCMAIL: 678714@bugs.debian.org
>
> M  +6    -2    src/gtkconfigkcmodule.cpp
> M  +1    -0    src/iconthemesmodel.cpp
>
> http://commits.kde.org/kde-gtk-config/81b7e1e43e5fce39ace676ef40637059b9bb9317

Hi,

Sorry for delay, I am on vacation now.

I prepared own patches some time ago [1][2]. And updated package [3] is
currently waiting [4] for a freeze exception [5]. If freeze exception is
granted package will be uploaded.

Regards,
Boris

[1] https://github.com/tehnick/kde-gtk-config-debian/blob/master/debian/patches/ignore-symlinks
[2] https://github.com/tehnick/kde-gtk-config-debian/blob/master/debian/patches/fix-loading-icons
[3] http://mentors.debian.net/package/kde-gtk-config
[4] https://lists.debian.org/debian-release/2012/07/msg00262.html
[5] http://release.debian.org/wheezy/freeze_policy.html



Information forwarded to debian-bugs-dist@lists.debian.org, Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>:
Bug#678714; Package kde-config-gtk-style. (Mon, 16 Jul 2012 01:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aleix Pol <aleixpol@kde.org>:
Extra info received and forwarded to list. Copy sent to Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>. (Mon, 16 Jul 2012 01:30:03 GMT) Full text and rfc822 format available.

Message #32 received at 678714@bugs.debian.org (full text, mbox):

From: Aleix Pol <aleixpol@kde.org>
To: Boris Pek <Tehnick-8@yandex.ru>
Cc: "678714@bugs.debian.org" <678714@bugs.debian.org>
Subject: Re: Bug#678714: [kde-gtk-config] src: Fix freezing problem on load
Date: Mon, 16 Jul 2012 03:27:26 +0200
On Sun, Jul 15, 2012 at 9:52 AM, Boris Pek <Tehnick-8@yandex.ru> wrote:
>> Git commit 81b7e1e43e5fce39ace676ef40637059b9bb9317 by Aleix Pol.
>> Committed on 11/07/2012 at 13:29.
>> Pushed by apol into branch 'master'.
>>
>> Fix freezing problem on load
>>
>> Don't iterate over the home directory, this happened in cases
>> where the fallback icon theme was set to "" and Qt translated it
>> to QDir("") which was CWD.
>>
>> CCMAIL: 678714@bugs.debian.org
>>
>> M  +6    -2    src/gtkconfigkcmodule.cpp
>> M  +1    -0    src/iconthemesmodel.cpp
>>
>> http://commits.kde.org/kde-gtk-config/81b7e1e43e5fce39ace676ef40637059b9bb9317
>
> Hi,
>
> Sorry for delay, I am on vacation now.
>
> I prepared own patches some time ago [1][2]. And updated package [3] is
> currently waiting [4] for a freeze exception [5]. If freeze exception is
> granted package will be uploaded.
>
> Regards,
> Boris
>
> [1] https://github.com/tehnick/kde-gtk-config-debian/blob/master/debian/patches/ignore-symlinks
> [2] https://github.com/tehnick/kde-gtk-config-debian/blob/master/debian/patches/fix-loading-icons
> [3] http://mentors.debian.net/package/kde-gtk-config
> [4] https://lists.debian.org/debian-release/2012/07/msg00262.html
> [5] http://release.debian.org/wheezy/freeze_policy.html

Hi Boris,
the [1] patch is not really useful. It's removing symlinks but it's
not harmful to follow them in this case. It's not a
recursive/iterative function so it's harmless. It shouldn't be
applied.
the [2] patch, on one part is fixing the bug like i did, on the other
it's setting the first entry in the combo box for no apparent
reason...

I'd suggest you to go through KDE to improve the application instead
of applying patches to your package. It might improve the package
sooner, but review is important and I prefer to be responsible myself
of the software I maintain.

Aleix



Information forwarded to debian-bugs-dist@lists.debian.org, Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>:
Bug#678714; Package kde-config-gtk-style. (Mon, 20 Aug 2012 22:06:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Boris Pek <Tehnick-8@yandex.ru>:
Extra info received and forwarded to list. Copy sent to Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>. (Mon, 20 Aug 2012 22:06:03 GMT) Full text and rfc822 format available.

Message #37 received at 678714@bugs.debian.org (full text, mbox):

From: Boris Pek <Tehnick-8@yandex.ru>
To: Aleix Pol <aleixpol@kde.org>,"678714@bugs.debian.org" <678714@bugs.debian.org>
Subject: Re: [Pkg-kde-extras] Bug#678714: [kde-gtk-config] src: Fix freezing problem on load
Date: Tue, 21 Aug 2012 00:55:43 +0300
Hi,

> the [1] patch is not really useful. It's removing symlinks but it's
> not harmful to follow them in this case. It's not a
> recursive/iterative function so it's harmless. It shouldn't be
> applied.

Yes, you are right. I made test sample and checked it.

So the first point in this bug report is false.

Useless patch was removed.

> the [2] patch, on one part is fixing the bug like i did,

I updated this patch to decrease the difference.

> on the other
> it's setting the first entry in the combo box for no apparent
> reason...

When KDE is installed at least one icon theme is present in system. But without
this change [1] user will see empty icons and empty combobox item at first run
or if theme from his settings is not exist. I believe this should be fixed.

Just remove your settings file and test the application.

Best regards,
Boris

[1] https://github.com/tehnick/kde-gtk-config-debian/blob/master/debian/patches/fix-loading-icons#L33



Reply sent to Boris Pek <tehnick-8@mail.ru>:
You have taken responsibility. (Wed, 05 Sep 2012 08:51:13 GMT) Full text and rfc822 format available.

Notification sent to Grigory Ivanov <grundik-com@grundik.spb.ru>:
Bug acknowledged by developer. (Wed, 05 Sep 2012 08:51:13 GMT) Full text and rfc822 format available.

Message #42 received at 678714-close@bugs.debian.org (full text, mbox):

From: Boris Pek <tehnick-8@mail.ru>
To: 678714-close@bugs.debian.org
Subject: Bug#678714: fixed in kde-gtk-config 3:2.1-1
Date: Wed, 05 Sep 2012 08:48:21 +0000
Source: kde-gtk-config
Source-Version: 3:2.1-1

We believe that the bug you reported is fixed in the latest version of
kde-gtk-config, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 678714@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Boris Pek <tehnick-8@mail.ru> (supplier of updated kde-gtk-config package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Tue, 21 Aug 2012 00:22:23 +0300
Source: kde-gtk-config
Binary: kde-config-gtk-style
Architecture: source amd64
Version: 3:2.1-1
Distribution: unstable
Urgency: low
Maintainer: Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>
Changed-By: Boris Pek <tehnick-8@mail.ru>
Description: 
 kde-config-gtk-style - KDE configuration module for GTK+ 2.x and GTK+ 3.x styles selecti
Closes: 678714
Changes: 
 kde-gtk-config (3:2.1-1) unstable; urgency=low
 .
   * Update to stable release 2.1.
   * Deleted file debian/patches/fix-build-on-kfreebsd-and-hurd-i386:
     accepted in upstream.
   * Added file debian/patches/fix-loading-icons:
     without this patch KDE-GTK-Config module scans ./ directory if option
     gtk-icon-theme-name or option gtk-fallback-icon-theme is empty or invalid,
     now first element from the list of found icon themes is used.
     (Closes: #678714)
Checksums-Sha1: 
 d3a2c18014633542da3ddeae98c3028f31c5edf1 1877 kde-gtk-config_2.1-1.dsc
 c388b54d125e626e68227738e8ca8bc474437baf 86123 kde-gtk-config_2.1.orig.tar.bz2
 8485fef4b33629ba3a1a99c9bec3ac812212b86e 5621 kde-gtk-config_2.1-1.debian.tar.bz2
 1a679fea4ed2b063faadb8d971f10fc50e415d04 113242 kde-config-gtk-style_2.1-1_amd64.deb
Checksums-Sha256: 
 32a3381cc97f4a53f8dd9fcea791056781686dcc574cf45d0519e30c67770ec8 1877 kde-gtk-config_2.1-1.dsc
 2f30c813b9ba480e9b19a4523bbc0ecaea80fcebb70c2eff62dd7c79f3a8b744 86123 kde-gtk-config_2.1.orig.tar.bz2
 6fea01c9e11b6c8b92f303dba43e1752bd4b6806345e1c9fc552d2f7ad671676 5621 kde-gtk-config_2.1-1.debian.tar.bz2
 e3f2b8d5a781b58b4ee9456f01f3c7cd7597533c728e28723457c7561a7ed75b 113242 kde-config-gtk-style_2.1-1_amd64.deb
Files: 
 aa7de2dc3394689987b9fe66efec842b 1877 kde optional kde-gtk-config_2.1-1.dsc
 512490eb8765db7368da04e4c3d84ded 86123 kde optional kde-gtk-config_2.1.orig.tar.bz2
 7e979c6efc9d0d266023c2a0372ac864 5621 kde optional kde-gtk-config_2.1-1.debian.tar.bz2
 37bbfaaf3c14acf852d95dba60770d47 113242 kde optional kde-config-gtk-style_2.1-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQGcBAEBCAAGBQJQRw5SAAoJEIvPpx7KFjRVfLcL/1//FtxwnlYE7IL76U7eAB1A
xqr2jz6lKDdHkEHdwOn1FH3E0SsOYXLL37Q+WmDFKQv/FGpKHUw6FZia+FHUbSqS
luaAaoUTDMOvSj06Ck9RH05yzk0WVSaKbwZCXy+KvqgwKc51qJlKI+9vJ/kNOltk
x6bmY8dj9PnQg54LJqGIMGSLtm9vE2b9p5VX4/4Zp0KHodqWw3Whyirg6KWvr6fU
qNAgxm6fgH7J3NFJxXikpeQuS8dPBYsw0kVppNldI0D7kzBLD7FC91/EIm/x8UW4
Gf2TEUsv13KwGPkMMO89+0YWPzXJXIBYpDR9a9CU8a2yds1zG2OdHMvckKHtcETB
aYCicQ+hKyd6prMLWt+YVZhiNIQNQb9dnAhaZP/JtoMcC2+6q+k9fvmF+xJzLgzX
xHYaSTU6lKRUrBGOzSAb7W5Le09F+wDECcmlohymiXSCvJLbbjEHUWHr47HZZY0z
rgYpcKrmPv5KsOkf13ARsLvbxSEHGN7mSuHhs0iZmA==
=NJY4
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 04 Oct 2012 07:25:32 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 06:08:23 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.