Bug 349290 - Suspected issue in KFilePlaces slowing down all apps using the "places" dialog functionality
Summary: Suspected issue in KFilePlaces slowing down all apps using the "places" dialo...
Status: RESOLVED FIXED
Alias: None
Product: kfile
Classification: Applications
Component: kfileplacesview (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR grave
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-17 14:33 UTC by Vitor M. Pereira
Modified: 2018-06-28 22:30 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
backtrace for kwrite (17.27 KB, text/plain)
2015-06-17 14:38 UTC, Vitor M. Pereira
Details
backtrace for dolphin (38.97 KB, text/plain)
2015-06-17 14:40 UTC, Vitor M. Pereira
Details
snapshot of a stalled "Open" dialog (97.68 KB, image/png)
2015-06-17 14:44 UTC, Vitor M. Pereira
Details
illustration of duplicates in ~/.kde/share/apps/kfileplaces/bookmarks.xml (2.77 KB, text/plain)
2015-06-17 16:31 UTC, Vitor M. Pereira
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vitor M. Pereira 2015-06-17 14:33:15 UTC
Following an upgrade last week to kdelibs-4.14.7-4.fc21.x86_64 (I'm running Fedora 21) I became unable to use any application that needs/uses the kde "file open" dialog facility.  

Whenever that dialog is opened (kate, kwrite, kile, etc, even konsole, if you invoke "save output as"), the system stalls for 30-60 seconds during which the application in question takes over the CPU. Launching dolphin has exactly the same effect, and it takes the same amount of time until it gets working. Other applications launch fine, but stall as described whenever the open/save dialog is invoked.

This is rather disabling because the bulk of my productivity applications are native kde tools and saving or opening anything stalls my system nearly every time for 30-60 seconds.


Reproducible: Always

Steps to Reproduce:
1. Launch any kde core application
2. Do something (in most applications, that's fine)
3. Invoke the "save as" or "open" dialog
3. The application stalls for 30-60 seconds.

Actual Results:  
Applications stall every time that dialog is invoked. Moving inside folders, etc. in that dialog causes a new stall.

Expected Results:  
Open/save dialog should just open and allow browsing of the filesystem as per normal

1) I first reported this in bug 348521, comment 12. There I pointed out one of the symptoms: while stalled, strace shows an endless number of "resource temporarily unavailable" associated with file descriptor 6, which is an existing and connected socket.

2) Removing (outside of kde) the following has no effect:

  ~/.kde 
  /tmp/kde-vpereira/ 
  /var/tmp/kdecache-vpereira/ 
  /run/user/1000/ksocket-vpereira
  /.local/share/user-places.*

3) logging-in as a new user with a pristine $HOME I don't see this problem
Comment 1 Vitor M. Pereira 2015-06-17 14:38:17 UTC
Created attachment 93210 [details]
backtrace for kwrite

backtrace taken with kwrite running, and after having opened the "Open" dialog which caused the stall.
Comment 2 Vitor M. Pereira 2015-06-17 14:40:24 UTC
Created attachment 93211 [details]
backtrace for dolphin

Backtrace taken a few seconds after launching dolphin and while it was stalled
Comment 3 Vitor M. Pereira 2015-06-17 14:44:40 UTC
Created attachment 93212 [details]
snapshot of a stalled "Open" dialog

Notice the oddity in the "Places" panel, showing that something is clearly wrong there with an endless repetition of the same locations. When the dialog becomes usable after the stall, all of them remain, but the whole dialog is essentially unusable since any action (folder selection, scroll, etc.) generates a new stall.
Comment 4 Vitor M. Pereira 2015-06-17 16:22:09 UTC
OK. On further inspection I guess I can narrow this down to one of the files

  ~/.local/share/user-places.xbel
  ~/.kde/share/apps/kfileplaces/bookmarks.xml

Here is how to reproduce this issue:

1. Remove the two files above outside KDE.
2. Login and, e.g. in dolphin, do something that reorganizes the entries in the "Places" panel, such as dragging a folder there, or changing the order of a folder in the "Places" panel.
3. Open "Save As" or "Open" in any KDE app, or go to Kickoff->Computer
4. The "places" panel in any of those shows many duplicates, as can be seen in attachment I added in comment 3

This is very reproducible to me, now even on an empty $HOME. Removing those files solves the problem, but any modification to the contents of the "Places" panel triggers it again.

In fact, when I first noticed this I was precisely doing that: rearranging the order of some folders in my "Places".
Comment 5 Vitor M. Pereira 2015-06-17 16:30:11 UTC
Found another hint. While the file 

   ~/.local/share/user-places.xbel

seems to be fine the first time it is created when something is changed in "Places" for the first time, the file

  ~/.kde/share/apps/kfileplaces/bookmarks.xml

shows all the duplicates mentioned in the previous comment. Have a look at the attached file in the next comment.
Comment 6 Vitor M. Pereira 2015-06-17 16:31:41 UTC
Created attachment 93215 [details]
illustration of duplicates in ~/.kde/share/apps/kfileplaces/bookmarks.xml
Comment 7 Christoph Feck 2015-06-23 23:25:10 UTC
Emmanuel, this issue is fixed, right?