Bug 393748 - Plasma freezes on multiple file CUT - Length of time determined by number of file
Summary: Plasma freezes on multiple file CUT - Length of time determined by number of ...
Status: RESOLVED DUPLICATE of bug 365317
Alias: None
Product: plasmashell
Classification: Plasma
Component: Notifications (show other bugs)
Version: 5.12.5
Platform: Neon Linux
: NOR normal
Target Milestone: 1.0
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-01 22:27 UTC by Nick
Modified: 2018-05-25 03:38 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
gdb thread output of frozen plasma shell (54.55 KB, text/plain)
2018-05-01 23:05 UTC, Nick
Details
gdb thread info attached to dolphins process (10.01 KB, text/plain)
2018-05-01 23:22 UTC, Nick
Details
Repeated gdp thread output attached to plasma-shell process (55.33 KB, text/plain)
2018-05-01 23:25 UTC, Nick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick 2018-05-01 22:27:22 UTC
The bug I'm about to describe is 100% reproducible on three different KDE based systems, an I7/Nvidia GPU laptop, a AMD/Nvidia desktop and a I5/Intel GPU desktop. (version details at the end of this report).

Although I have specified this bug as Dolphin it has a severe affect on the plasma desktop & panel. I find it surprising the desktop freezes when cutting & pasting, surely dolphin & plasma are different processes and shouldn't cause each other to hang ?

If you use Dolphin to CUT (copy not affected) multiple files the plasma desktop and panel freeze for a period of time. The period of time plasma freezes for is subject to the number of files being cut & pasted. If you are cutting one or two files you won't notice a problem, if you are cutting & pasting 100+ files you will see a freeze that lasts nearly 60 seconds on a I7 based system, much longer on lower powered systems. When you experience this freeze Dolphin is sending the following messages to std-err "QXcbClipboard: SelectionRequest too old"

** How to reproduce this bug **

To reproduce this bug I would first suggest you always have the plasma task panel visible, if your using auto-hide disable it, you want the panel visible at all times so you can see it freeze. In addition enable the seconds display on the digital clock that resides on the plasma panel. This allows you to see when and for how long plasma freezes.

Create two directories on the same disk/partition ie /home/bloggs/test1 and /home/bloggs/test2 as follows ..

cd /home/myusername
mkdir /home/myusername/test1 /home/myusername/test2

Then populate the directory test1 with 120 files, each 1Mbyte in size. I use the following command to do this, the size is not that important however the number of files is directly proportional to the length of time plasma hangs..

cd /home/myusername/test1
n=0;while [ $n -lt 120 ]; do dd if=/dev/urandom of=file$n bs=1M count=1;((n++));done;

Next, start dolphin from the command line so you can monitor the stdout/stderr messages it produces.

Then within dolphin, navigate to the /home/myusername/test1 directory and do a CNTRL A to select all files, then click right on the select files and select CUT (NOT COPY) and then navigate to /home/myusername/test2 and paste.

You will see the files get pasted in the view pane AND the seconds on the clock will freeze for 48 seconds (as seen on my I7 laptop).

During this time all desktop widgets freeze and clicking on any shortcuts doesn't appear to work or at least not yet, not until the freeze ends. While the desktop is frozen the files have already been cut & pasted within a second, however Dolphin is outputting over 1000 messages to stderr, all repeating "QXcbClipboard: SelectionRequest too old".

At the end of the plasma freeze all the icons you clicked on are then activated.

I varied the number of files I was cutting & pasting and found the following ..

1 to 2 file cut & paste, Dolphin DOES NOT output "QXcbClipboard: SelectionRequest too old" at all.


3 to 6 files cut and pasted. Dolphin outputs "QXcbClipboard: SelectionRequest too old" to stderr 50 times, causing plasma to freeze for about 3 seconds.

15 files cut & pasted, Dolphin outputs "QXcbClipboard: SelectionRequest too old" to stderr 129 times, causing plasma to freeze for about 6 seconds.

30 files cut & pasted, Dolphin outputs "QXcbClipboard: SelectionRequest too old" to stderr 288 times, causing plasma to freeze for about 12 seconds.

60 files cut & pasted, Dolphin outputs "QXcbClipboard: SelectionRequest too old" to stderr 566 times, causing plasma to freeze for about 24 seconds.

120 files cut & pasted, Dolphin outputs "QXcbClipboard: SelectionRequest too old" to stderr 1,169 ! times, causing Plasma to freeze for 48 seconds.

It would seem that the more files you cut & paste the longer plasma freezes for.

The systems I'm testing this on are as follows, of note is the fact this problem exists on KDE Plasma 5.12.4 (the latest stable) and on an earlier 5.8.9 and I'm assuming all version in between and possibly earlier ?

Can somebody test this using the method I've outlined above and see if you also can confirm this bug .. Thanks.

Laptop: KDE NEON LTS 5.12
8-core I72670QM@2.2GHz, 16Gbyte memory, Nvidia GTX 570M/PCIe/SSE2, Nvidia driver 4.5.0 NVIDIA 384.130, Plasma 5.12.4, KDE frameworks 5.45.0, QT version 5.9.3, kernel 4.13.0-39-generic, 64bit. Dolphin version 18.04.0.

Desktop #1: Kubuntu 16.04
8-core AMD FX 8350, 24Gbyte memory, Nvidia GT610/PCIe/SSE2, driver 4.4.0 NVIDIA 340.104, Plasma 5.8.9, frameworks 5.36.0, QT version 5.6.1, kernel 4.4.0-119-generic, 64 bit.

Desktop #2
4-core Intel i5-7400@3.00GHz, Intel Open source technology MESA DRI Intel HD Graphics 630 (Kaby Lake GT2), Plasma 5.12.4, KDE frameworks 5.45.0, QT Version 5.10.0, kernel 4.13.0-39-generic, 64 bit.
Comment 1 Nick 2018-05-01 23:05:39 UTC
Created attachment 112361 [details]
gdb thread output of frozen plasma shell

Frozen plasma shell when cutting & pasting 120 1Mbyte files. Shell remains frozen for over 48 seconds on I7 processor.
Comment 2 Nick 2018-05-01 23:22:04 UTC
Created attachment 112362 [details]
gdb thread info attached to dolphins process

This is the gdb thread info attached to dolphins process .
Comment 3 Nick 2018-05-01 23:25:37 UTC
Created attachment 112363 [details]
Repeated gdp thread output attached to plasma-shell process

And just for good measure here is a repeated gdp thread output attached to plasma-shell process.
Comment 4 Nate Graham 2018-05-02 02:36:13 UTC
This is either KIO or plasmashell. Starting with plasmashell since it sounds awfully familiar.
Comment 5 Nick 2018-05-02 11:14:36 UTC
More Info, If I use Krusader instead of Dolphin to move those 120 files, plasmashell does not freeze. Plasmashell only freezes when using Dolphin.
Comment 6 Patrick Silva 2018-05-05 15:30:12 UTC
I can confirm that it's fixed in plasma 5.13 dev. \o/

*** This bug has been marked as a duplicate of bug 358231 ***
Comment 7 Nick 2018-05-05 20:04:53 UTC
That's great ! Looking forward to 5.13 in Neon user edition.
Comment 8 Nick 2018-05-08 14:30:55 UTC
I've tested the developer edition 20180508-1053 today and although you have improved things ie plasma panel only hangs for 4 seconds for a 120 file move (9 seconds for a 1000 file move.

You've not fixed the plasma panel/desktop freeze

Looking at Dolphin stderr it outputs this message "QXcbClipboard: SelectRequest too old" 11,900 times during the period plasma panel has hung.

So sorry guys it's not been fixed. As before this problem is 100% reproducible using the procedure I used above.

During the panel freeze the CPU is idle & all disc I/O completed within a second.

I know I'm not familiar with the code but I would have thought the error "QXcbClipboard: SelectRequest too old" was a good place to start. Find the cause of that and you might just find why plasma freezes ?.

I've reopened this bug and I'm assuming I'm looking at the latest code although I did download dev stable rather than dev unstable.
Comment 9 tesfabpel 2018-05-24 06:49:45 UTC
I don't know if I should open a new bug but it seems the same...

In practice if you open gnome-disk-utility and select another drive, plasmashell freezes for like 1 second and then the title of the window updates.
If you do this repeatedly (eg. with the up and down arrows), plasmashell locks for a longer time.

I've also created a very small pygtk app that repeatedly sets a new title:
https://gist.github.com/tesfabpel/fa1cff523ee0aae1464a6870bfeb1745
With an interval of 500ms everything is fine, but with 10 or similar plasmashell locks until the app is open.
I don't think that gnome-disk-utility updates the title with that frequency but anyway...

Maybe it's some kind of a lock contention?

Tested on ArchLinux and openSUSE Tumbleweed both at these versions:
gnome-disk-utility 3.28.2
plasma 5.12.5-2.1

Thanks
Comment 10 Kai Uwe Broulik 2018-05-24 07:47:38 UTC
@tesfabpel This sounds like Bug 365317 and was fixed for Plasma 5.13
Comment 11 Nate Graham 2018-05-25 03:38:20 UTC

*** This bug has been marked as a duplicate of bug 365317 ***