Bug 502850

Summary: Massive number of loop devices freezes Plasma
Product: [Plasma] plasmashell Reporter: Adrian <adrian-harko-3+bugs.kde.org>
Component: generic-performanceAssignee: Plasma Bugs List <plasma-bugs-null>
Status: REPORTED ---    
Severity: normal CC: aspotashev, ivan.cukic, nate
Priority: NOR    
Version First Reported In: 6.3.4   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: reproducer script
top memory usage

Description Adrian 2025-04-15 17:26:52 UTC
Created attachment 180294 [details]
reproducer script

SUMMARY
i have a program running which uses lots (>20k) loop devices.
after starting the program the desktop does not work anymore.
switching windows with alt-tab works like before.
but clicking the "K" button is ignored.

top shows that: (for ~10k loop devices)
kded6  uses 100% cpu and the ram usage increases sharply (>3GB)
plasmashell goes to 200% cpu and uses more ram (>5GB)

after some time (~15m) it becomes responsive again.
but big ram usage continues

i attach a reduced testcase script
it attaches loop devices and should very easily show the problem 

STEPS TO REPRODUCE
1. run the attached script or open lots of loop devices

OBSERVED RESULT
kde is not responsive any more

EXPECTED RESULT
attaching of loop devices should not disturb kde in any kind

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.3.4
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0
Qt Version: 6.9.0

ADDITIONAL INFORMATION
Comment 1 Adrian 2025-04-15 17:29:36 UTC
Created attachment 180295 [details]
top memory usage
Comment 2 Nate Graham 2025-04-16 16:43:45 UTC
This is very far outside of the realm of normal activity.

You may have uncovered a legitimate performance issue, but regardless, I would recommend changing the program to not do this anymore.