Bug 179348 - high cpu when move file to trash
Summary: high cpu when move file to trash
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: trash (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
: 180124 180362 186232 188412 190224 203775 203916 204800 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-02 09:17 UTC by erik_t
Modified: 2020-08-05 17:40 UTC (History)
22 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Strace of moving a file to trash. (39.14 KB, application/gzip)
2009-03-09 00:47 UTC, Bram Schoenmakers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description erik_t 2009-01-02 09:17:50 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

I've some tousand files in some directorys in my trash. In the settings I say that files will be deleted automatically if the trash is larger than 1% of the HD.

When I now move a file (11 Kb) to trash the process kio_trash is nearly 100% for 1 minute. The diaglogue for moving the file to trash is running. Then the file is in the trash.

When I now empty the complete trash and delete again a file. It just take a second.
Comment 1 Dario Andres 2009-03-07 23:30:01 UTC
*** Bug 180124 has been marked as a duplicate of this bug. ***
Comment 2 Bram Schoenmakers 2009-03-09 00:47:08 UTC
Created attachment 31922 [details]
Strace of moving a file to trash.

Attached an strace with relative timestamps of invoking

kioclient move ./test trash:/

Most time is spent between line 3880 and 6527, where you see a lot of EGAIN errors ("Resource temporarily unavailable").
Comment 3 Bram Schoenmakers 2009-03-10 00:21:32 UTC
I've been looking a bit more at the strace file and on line 680-681 it reads:
     
socket(PF_FILE, SOCK_STREAM, 0) = 7
connect(7, {sa_family=AF_FILE, path=@"/tmp/.X11-unix/X0"...}, 20) = 0

File descriptor 7 is causing a lot of EGAIN errors in the remaining of the file. It suggests this is a Xorg problem. However, this worked fine in KDE 4.2.0 and my developer account with KDE 4.2.x branch doesn't show problems as well.

The packages where I see this behavior are from the kdemod project (Arch Linux).
Comment 4 Dario Andres 2009-03-15 13:54:31 UTC
*** Bug 186232 has been marked as a duplicate of this bug. ***
Comment 5 sml 2009-03-31 16:08:53 UTC
Using Kubuntu 8.10 here and seeing the same problem. When deleting a couple of folders at once, kio_trash takes up 100% CPU, then I get a dialog saying the trash has reached maximum size and I have to empty manually.
Comment 6 dukat 2009-04-07 16:38:58 UTC
On Kde 4.2.2 (Kubuntu 9.04 Jaunty latest beta) I get a high CPU load (~50 %) for kio_trash when I try to delete something when the trashcan is rather full. Deleting for me might take up to 30 seconds (moving to trash on the same partition)
When I empty the trashcan, deleting is nearly instantaneous.
Comment 7 Bram Schoenmakers 2009-04-07 18:57:58 UTC
Indeed, emptying the trash made the problem go away.
Comment 8 ultrabla 2009-04-24 03:24:07 UTC
kde 4.2.2-r1 (gentoo)

moving stuff into trash takes 100% (on one core) and takes like forever to do this task.
no matter whether empty or filled trash. :(
Comment 9 David Faure 2009-04-24 10:15:48 UTC
*** Bug 190224 has been marked as a duplicate of this bug. ***
Comment 10 Christian González 2009-05-08 20:05:08 UTC
still same problem unter Kubuntu Jaunty with KDE 4.2.3
Comment 11 Nicolas Bouillon 2009-05-09 00:08:18 UTC
I emptied my trash and now it works fine. Maybe cause i reinstall / (from gutsy o janty) but i've kept /home, so there are some old file in trash that cause a problem.
Comment 12 Christian González 2009-05-11 22:44:01 UTC
*** Bug 188412 has been marked as a duplicate of this bug. ***
Comment 13 David Solbach 2009-06-03 23:25:37 UTC
Problem confirmed on Kubuntu Jaunty with kde 4.2.4 packages.

kio_trash eats all CPU on one core for a few seconds when deleting a small file. If deleting several files, it takes a few seonds for every file.

My Trash contains:

4.2 MiB
1022 Files
129 Folders
Comment 14 freeman3 2009-06-16 08:30:08 UTC
i have the same problem
trashing an item take ages
Comment 15 Pascal d'Hermilly 2009-06-16 11:10:14 UTC
Still a problem in KDE 4.3 Beta 2
Comment 16 Tim 2009-07-05 23:53:12 UTC
Is this bug going to be fixed soon?  I too have this annoying problem.
Comment 17 G360 2009-07-08 20:17:07 UTC
I found in this Launchpad bug https://bugs.launchpad.net/kdelibs/+bug/354617 that With the unchecked "Limit to maximum size" in the Trash settings, moving to trash is instant.
Comment 18 Pascal Mages 2009-07-30 23:10:43 UTC
I can confirm this bug on Kubuntu 9.04 KDE 4.3 RC3. This bug first appeared when I switched to Kubuntu 9.04 (with KDE 4.2) when also the "intel problem" showed up. An other PC (without intel graphics) also with Kubuntu 9.04 KDE 4.3 RC3 does not expose this problem, so there might be a link to x.org as suggest above.

The workaround which did the trick for me was to start "kcmshell4 kcmtrash" in the konsole and unselect "limit to maximum size" (translated from german).

I would be glad to provide more information to help fix this bug.
Comment 19 Patrick 2009-07-30 23:24:05 UTC
Thank you for the hint to "kcmshell4 kcmtrash". I hadn't figured out how to access this.

nVIDIA here, not Intel.
Comment 20 Andrea 2009-08-02 14:02:05 UTC
as far as i know the "regular" way to access the kcmtrash dialog is via the trash widget on the desktop - not the kcmshell4 kcmtrash one :-) 
the problem has been observed on intel and ati by the way ... i don't see any difference :-)
Comment 21 Pascal Mages 2009-08-02 22:01:12 UTC
> as far as i know the "regular" way to access the kcmtrash dialog is via the
trash widget on the desktop

right, I have somehow overseen that. BTW: KRunner (Alt+F2) gets it as well when you type "trash". (me love krunner!)
Comment 22 Henning Rogge 2009-08-15 08:58:55 UTC
*** Bug 203916 has been marked as a duplicate of this bug. ***
Comment 23 Henning Rogge 2009-08-15 09:01:11 UTC
I can confirm this bug on gentoo KDE 4.3
Switching off the size limitation of the trashcan resolves the problem for me
Comment 24 David Faure 2009-08-20 11:39:16 UTC
*** Bug 203775 has been marked as a duplicate of this bug. ***
Comment 25 Tobias Koenig 2009-08-20 15:24:52 UTC
Hej,

this bug has been fixed in trunk (coming 4.4) now. If you are running
KDE 4.3, just disable the 'Trash size limit' option in the configuration
dialog.

Ciao,
Tobias
Comment 26 Dario Andres 2009-08-23 01:52:46 UTC
*** Bug 204800 has been marked as a duplicate of this bug. ***
Comment 27 Dawit Alemayehu 2014-03-03 01:47:52 UTC
*** Bug 180362 has been marked as a duplicate of this bug. ***