Bug 323650 - KDialog incredibly slow to respond
Summary: KDialog incredibly slow to respond
Status: RESOLVED WORKSFORME
Alias: None
Product: kdialog
Classification: Applications
Component: general (show other bugs)
Version: 1.0
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: Brad Hards
URL:
Keywords:
: 349116 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-08-17 18:59 UTC by Dan Dart
Modified: 2020-12-09 12:23 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Excerpt from 'strace -p PID-OF-KDIALOG' while KDialog is frozen as described (307.13 KB, text/plain)
2015-06-14 11:45 UTC, Paul Pogonyshev
Details
Repeating panel icons (18.64 KB, image/png)
2015-06-24 18:40 UTC, Kevin Clevenger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Dart 2013-08-17 18:59:52 UTC
When I go to upload / download a file with kdialog (for example called by chromium) it just doesn't load or freezes and is incredibly slow, if I repeat clicking it takes even up to 2 minutes (usually about 30 seconds) to even start up kdialog. Very frustrating.

Reproducible: Always

Steps to Reproduce:
1. Launch Chromium
2. Right click and press "Save Page As"
3. Observe the slowness
Actual Results:  
This time for example it took 22 seconds to load a file save dialog with 3 columns of folders in it.

Expected Results:  
Near-instant as I'm used to (e,g. Firefox's own dialog tool works fine).

$ kdialog --version
Qt: 4.8.5
KDE Development Platform: 4.10.5
KDialog: 1.0

Debian sid up to date.
Comment 1 Christoph Feck 2013-08-17 20:44:01 UTC
Is the file dialog also slow when run from inside a KDE application, pointing it to the same directory?
Comment 2 Christoph Feck 2013-08-17 20:48:59 UTC
If the "2 minutes" figure is reproducible by invoking "kdialog --getopenurl $HOME" (or any other directory), please run it through strace, and attach the output. I am interested to see where it hangs (remote folders?)
Comment 3 Dan Dart 2013-08-23 20:05:40 UTC
My strace!
Seems to lag the most around a line like:

poll([{fd=7...

http://dandart.co.uk/kdialog-strace.log.bz2
Comment 4 Dan Dart 2013-08-23 20:06:00 UTC
This particuliar strace took 27 seconds before it showed up a dialog.
Comment 5 Christoph Feck 2013-08-23 21:37:58 UTC
fd 7 is the D-Bus socket, in other words, it waits for a reply on D-Bus but does not get any (times out).

To debug this, first find out if this is related to the entries in the Places Panel. You can temporarily move ~/.kde/share/apps/kfileplaces/bookmarks.xml to a different file to test this.

If this does not help, another possible cause could be a kded4 module blocking the D-Bus. You can disable modules to check this. For more information about debugging kded, please see http://kdepepo.wordpress.com/2011/05/11/troubleshooting-kded4-bugs/
Comment 6 Christoph Feck 2014-01-30 22:42:08 UTC
Could you isolate the Places Panel entry or kded module that causes the D-Bus freeze?
Comment 7 Dan Dart 2014-02-02 17:12:34 UTC
Thank you - sorry for not getting back to you.
I have now gotten an almost instant (<2s) kdialog launch time.
It appeared that the slowdown may have resulted from various SFTP links that I've kept in my places bar until now.
Are all bookmarks (inc. SFTP links) auto-cached or scraped on every call?
Comment 8 Alexander Potashev 2014-03-03 10:53:50 UTC
Related bug report: bug#184062
Comment 9 Brad Hards 2015-06-13 23:00:28 UTC
*** Bug 349116 has been marked as a duplicate of this bug. ***
Comment 10 Paul Pogonyshev 2015-06-14 11:45:18 UTC
Created attachment 93172 [details]
Excerpt from 'strace -p PID-OF-KDIALOG' while KDialog is frozen as described
Comment 11 Paul Pogonyshev 2015-06-14 11:48:01 UTC
Note that 'strace -o ... kdialog ...' does not hang for me. But if I run KDialog with the same parameters but *not* under strace, it does hang, the same as when run from Chromium. Therefore I generated strace using '-p PID' instead.

I do not attach the full strace since it is over 70 MB in size. However, the attached excerpt is basically what repeats over and over again as long as KDialog is frozen.
Comment 12 Kevin Clevenger 2015-06-24 18:40:41 UTC
Created attachment 93324 [details]
Repeating panel icons
Comment 13 Kevin Clevenger 2015-06-24 18:41:23 UTC
> You can temporarily move ~/.kde/share/apps/kfileplaces/bookmarks.xml to a different file to test this.

This fixed the 10-15 second delay for me but open/save dialogs still show repeating icons in the left panel. See attachment 'Repeating panel icons'.
Comment 14 Paul Pogonyshev 2015-06-24 19:18:29 UTC
In my case this doesn't help at all. I renamed 'bookmarks.xml' to 'xbookmarks.xml', but kfile starts on that huge directory as slowly as before. It also created new, much smaller, 'bookmarks.xml' with different contents, so renaming did have effect, just not on speed.
Comment 15 Brad Hards 2015-06-24 21:01:27 UTC
Almost two years ago (in Comment 1: https://bugs.kde.org/show_bug.cgi?id=323650#c1 ), we asked if it happens in a KDE application for the same directory. No response yet....
Comment 16 Paul Pogonyshev 2015-06-24 22:23:17 UTC
I'm a different user with the same problem. For me it is like this:

Bug is reproducible:
- if you start the dialog from Chrome in the huge directory;
- if you start it as 'kdialog' from the command line for that directory.

Bug is *not* reproducible:
- if you start the dialog from KWrite, Gvenview or, I guess, any other KDE application;
- if you run kdialog from under strace;
- if you start the dialog for other directory and then navigate to this huge one.
Comment 17 Dan Dart 2015-08-25 08:17:26 UTC
So really it's just the location? On current setup it's still about maybe 10s from kate.
Comment 18 Alberto 2015-09-17 17:09:43 UTC
Same problem. However, in my case it happens even when I start it from command line. Kdialog window shows, but it's completely unresponsive until after about 30 secs. 

However, I've run it with strace and in fact it's very busy in that time. I'm copying a fragment of the strace log. It seems to be scanning filesystems (I've got a fair number of partitions, NTFS, ext3 and ext4), but some of them are not available and Kdialog keeps trying, probably until there is a timeout. I hope this can shed some light...

poll([{fd=6, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=6, revents=POLLOUT}])
writev(6, [{"&\3\2\0\220\2\0\0", 8}, {NULL, 0}, {"", 0}], 3) = 8
poll([{fd=6, events=POLLIN}], 1, 4294967295) = 1 ([{fd=6, revents=POLLIN}])
recvmsg(6, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1\265i\0\0\0\0\220\2\0\0\217\271\36\2\353\6\244\0\353\6\244\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(6, 0x7ffd51644e50, 0)           = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(6, 0x7ffd51644e50, 0)           = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=6, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=6, revents=POLLOUT}])
writev(6, [{"(\3\4\0\220\2\0\0\36\0\240\4\356\6\246\0", 16}, {NULL, 0}, {"", 0}], 3) = 16
poll([{fd=6, events=POLLIN}], 1, 4294967295) = 1 ([{fd=6, revents=POLLIN}])
recvmsg(6, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1\266i\0\0\0\0\0\0\0\0\242\3\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(6, 0x7ffd51644d90, 0)           = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(6, 0x7ffd51644d90, 0)           = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=6, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=6, revents=POLLOUT}])
writev(6, [{"&\3\2\0\220\2\0\0", 8}, {NULL, 0}, {"", 0}], 3) = 8
poll([{fd=6, events=POLLIN}], 1, 4294967295) = 1 ([{fd=6, revents=POLLIN}])
recvmsg(6, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1\267i\0\0\0\0\220\2\0\0\217\271\36\2\353\6\244\0\353\6\244\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(6, 0x7ffd51645130, 0)           = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(6, 0x7ffd51645130, 0)           = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=6, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=6, revents=POLLOUT}])
writev(6, [{"(\3\4\0\220\2\0\0\22\0\240\4\353\6\244\0", 16}, {NULL, 0}, {"", 0}], 3) = 16
poll([{fd=6, events=POLLIN}], 1, 4294967295) = 1 ([{fd=6, revents=POLLIN}])
recvmsg(6, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1\270i\0\0\0\0\0\0\0\0\252\3\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(6, 0x7ffd51644d90, 0)           = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(6, 0x7ffd51644d90, 0)           = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(6, 0x7ffd51645190, 0)           = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=6, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=6, revents=POLLOUT}])
writev(6, [{"(\3\4\0\220\2\0\0\22\0\240\4\353\6\244\0", 16}, {NULL, 0}, {"", 0}], 3) = 16
Comment 19 Aranjedeath 2016-01-11 21:11:00 UTC
I think Alberto is on to something when he says it relates to volumes being unavailable. I've only got one "volume" (disk, and partition), but I also have a bluetooth connection configured to my cellphone. When that connection isn't live, this bug happens. I disabled bluetooth (sledgehammer approach) through the tray icon, and the problem is instantly solved. I don't know what that means on a code level, but that's where I'd go looking.
Comment 20 tomi.urankar 2016-03-19 17:28:43 UTC
For me this happens in Chrome. But the the KDialog stays open indefinitely. Not even kill -9 help.
Any ideas?

Using Kubuntu 15.10 with Plasma 5.5.4
Comment 21 tomi.urankar 2016-03-19 17:36:51 UTC
Even running this from terminal will hang the KDIALOG:
kdialog --getopenurl $HOME
Comment 22 tomi.urankar 2016-04-02 16:28:06 UTC
I news on this? Makes it impossible to attach any files when the app itself is using KDIALOG
Comment 23 Mario Junior 2016-06-12 05:25:01 UTC
Same problem here.

Arch Linux + Plasma 5.6.4-1 + Chromium
Comment 24 H.H. 2018-03-18 21:02:49 UTC
I also suffer from this (kde-frameworks 5.42.0). Opening a kde-open/save dialog from chromium takes about 10 seconds..

I also ran strace for the dialog, and maybe icons are part of the cause.

See also
https://bugs.kde.org/show_bug.cgi?id=240009
and
https://bugs.kde.org/show_bug.cgi?id=293888
Comment 25 Justin Zobel 2020-11-24 04:45:10 UTC
Can any of those affected please test and confirm if this issue is still occurring or if this bug report can be marked as resolved. I've set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved" when you respond, thanks.
Comment 26 Bug Janitor Service 2020-12-09 04:34:00 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 27 Alberto 2020-12-09 07:14:31 UTC
As for me, the bug disappeared a long time ago. I've since upgraded to Fedora 31, and kdialog version is 19.12.1-1. No problems at all.
Comment 28 Cristiano da Cunha Duarte 2020-12-09 12:23:44 UTC
As for me, the bug disappeared a long time ago. I've since upgraded to Fedora 31, and no problems at all.