Bug 434125 - High CPU usage with "size of contents" option when trying to analyze "/proc" folder
Summary: High CPU usage with "size of contents" option when trying to analyze "/proc" ...
Status: CONFIRMED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: details mode (show other bugs)
Version: 20.12.3
Platform: Other Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-07 23:11 UTC by Yevhen
Modified: 2021-05-24 00:03 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yevhen 2021-03-07 23:11:18 UTC
SUMMARY
I had high CPU usage while "Dolphin" window was opened. Later I figured out that problem was with "size of contents" option which I manually turned on. And specifically with symlink "z:" which point to "/" in "$HOME/.wine/dosdevices/" folder. That symlink Wine creates by default during configuration.

STEPS TO REPRODUCE
1. Settings > Configure Dolphin > View Modes > Details. For "Folder size displays" select "Size of contents, up to 4 levels deep"
2. F4 to open terminal
3. Create symlink to "/proc" with command and "ln -s /proc test_size"


OBSERVED RESULT
Dolphin start eating up to 48% of CPU and at some point will show some strange value like "21,6 PiB"

EXPECTED RESULT
Probably Dolphin shouldn't inspect symlinks and /proc directory

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: KDE neon User Edition
KDE Plasma Version: 5.21
KDE Frameworks Version: 5.79
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Méven Car 2021-04-27 07:10:54 UTC
FYI the folder size counting takes into account folder hiding, i.e with hidden folders hidden you wouldn't experience this issue.
Comment 2 Jérôme Borme 2021-05-24 00:03:05 UTC
Activating option "Size of contents, up to 10 levels deep", leads to 100% cpu usage in a seemingly infinite loop (can last hours). Some dirs also report a much overestimated size.

On one example, a dir (15 levels, 1045 dir, 41233 files, `du` size of 169 GiB) is reported as 512.2 TiB.

Selecting a lower number of levels (2-3) does not trigger the problem (size is underestimated, as expected).

The tree might contain circular symbolic links. fs is brtfs. I have not tried browsing /proc and did not create symbolic links there.