Thunar utilizes 100%CPU, presumably without doing anything useful, when the parent directory is not readable. to reproduce: mkdir -p -- /tmp/--x/rwx chmod 100 /tmp/--x cd /tmp/--x/rwx thunar observe near 100% cpu utilization. Then, in thunar change to any other directory with a readable parent and watch the cpu load drop
I can't reproduce, which distribution are you using?
As well cannot reproduce. Possibly related to Bug #10161, which is only for network shares, only tree-view. Possibly you are using both ?
bug only triggers when the tree-view is enabled - thanks for the hint, alexxcons. But this is not on a network share, nor with any network shares enabled I'm running on debian buster (current testing)
Yes, its the tree-view, now I as well can reproduce it ! Wonder if fixing this one will as well fix Bug #10161, Will have a look into it, when I have time. Thanks for reporting by the way !
Created attachment 8179 preleminary fix The actual problem is, that non-readable folder are not loaded into the model of the tree-view, even if the path of the current working directory contains them. The bug is triggered when thunar attempts to mark the related folder in the tree as "selected". Thunar walks through the tree to identify the correct folder starting with the tree-root. If there is a non-readable folder in the way, thunar does not give up the search :) The patch stops the search if a non readable folder was found. This is not a full fix, it just cures the worst symptoms. Still a problem is, that the complete subtree after a non-readable folder will not be displayed in the tree-view if a sub-directory of the non-readable folder is loaded.
A proper fix could be to always force-load the path of the current directory into the tree-model ... will see what I can do.
Created attachment 8195 proper fix Here a proper fix .. some refactoring was required, since the related method walked the tree in the wrong direction, making things overcomplex. For me it works well now .. please take a try and let me know if it as well works fine for you !
Created attachment 8196 proper fix ops, I added some crap into the patch .. fixed
Created attachment 8197 proper fix .. some more crap removed :/ doh
Confirm normal cpu usage, looks like this is working. It's like a christmas present, very nice :) btw, when applying git mentions: arian@jira:thunar$ git am < attachment.cgi\?id\=8197 Applying: Thunar utilizes 100%CPU when the parent directory is not readable (Bug #14900) - as well fixes tree-view not showing the related folder .git/rebase-apply/patch:78: trailing whitespace. * .git/rebase-apply/patch:97: trailing whitespace. * Creates a new #ThunarTreeModelItem as a child of @node and stores a reference to the passed @file .git/rebase-apply/patch:148: new blank line at EOF. + warning: 3 lines add whitespace errors.
Created attachment 8198 proper fix Merry Christmas ! :P - whitespace errors fixed now. Will wait for 1-2 other tests/reviews before pusing it.
The patch looks good, though I didn't review the logic thoroughly, that was quite a change! All in all, it fixes the bug (which I can reproduce now) and simplifies some parts of the code, thanks!
Alexander Schwinn referenced this bugreport in commit 85a79da3f263596c88b0de6098226599b46a6304 Thunar utilizes 100%CPU when the parent directory is not readable (Bug #14900) - as well fixes tree-view not showing the related folder https://git.xfce.org/xfce/thunar/commit?id=85a79da3f263596c88b0de6098226599b46a6304
Alexander Schwinn referenced this bugreport in commit 2963db9bfa7a9305a3f49037e1ed0caa1082e418 Thunar utilizes 100%CPU when the parent directory is not readable Bug #14900 - as well fixes tree-view not showing the related folder https://git.xfce.org/xfce/thunar/commit?id=2963db9bfa7a9305a3f49037e1ed0caa1082e418
Alexander Schwinn referenced this bugreport in commit d75fa9dd5ec3f995551a6d9817e0ffdeeb3b3c5d Thunar utilizes 100%CPU when the parent directory is not readable (Bug #14900) - as well fixes tree-view not showing the related folder https://git.xfce.org/xfce/thunar/commit?id=d75fa9dd5ec3f995551a6d9817e0ffdeeb3b3c5d
Thanks for testing ! Now pushed to master, 4.12 and 4.14 Will ask other devs for some more testing before releasing it into thunar 1.6.16 and 1.8.3
*** Bug 10161 has been marked as a duplicate of this bug. ***