Bug 413110

Summary: Plasmashell high CPU, unresponsive, gives "filesystem not responding" with many NFS mounts
Product: [Plasma] plasmashell Reporter: Kevin Liu <kevin>
Component: DataEnginesAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: chris.vanderpennen, nate, reuben_p
Priority: NOR    
Version: 5.16.5   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: NFS mtab list
strace of plasmashell as it loops loading /etc/mtab

Description Kevin Liu 2019-10-17 19:39:48 UTC
Created attachment 123288 [details]
NFS mtab list

SUMMARY

On a system with many NFS mounts (desktop doubling as a Kubernetes node for homelab), plasmashell becomes increasingly unresponsive as more and more NFS mounts are created. It uses higher and higher CPU as well.

STEPS TO REPRODUCE
1. Mount a ton of NFS shares (cat /etc/mtab | wc -l gives 554)
2. Start plasmashell, view CPU usage and responsivity. Eventually, dozens of "Filesystem at <nfs mount path> is not responding" notifications show up.

OBSERVED RESULT

Here is a gdb backtrace of plasmashell while under high load:

#0  0x00007fd79091921e in _int_malloc () from /nix/store/kksyrix1bpklvgkmvngcv0q9nh8hn2fl-glibc-2.27/lib/libc.so.6                                                                                                                                                                                                           
#1  0x00007fd79091be7a in malloc () from /nix/store/kksyrix1bpklvgkmvngcv0q9nh8hn2fl-glibc-2.27/lib/libc.so.6                                                                                                                                                                                                                
#2  0x00007fd79105daf2 in QArrayData::allocate(unsigned long, unsigned long, unsigned long, QFlags<QArrayData::AllocationOption>) ()                                                                                                                                                                                         
   from /nix/store/h3plrbghl3xaf61qnlkp4sdyfplf0ijx-qtbase-5.12.3/lib/libQt5Core.so.5                                                                                                                                                                                                                                        
#3  0x00007fd79105fc30 in QByteArray::QByteArray(int, Qt::Initialization) ()                                                                                                                                                                                                                                                 
   from /nix/store/h3plrbghl3xaf61qnlkp4sdyfplf0ijx-qtbase-5.12.3/lib/libQt5Core.so.5                                                                                                                                                                                                                                        
#4  0x00007fd79126c218 in ?? () from /nix/store/h3plrbghl3xaf61qnlkp4sdyfplf0ijx-qtbase-5.12.3/lib/libQt5Core.so.5                                                                                                                                                                                                           
#5  0x00007fd7910d24c8 in QString::toUtf8_helper(QString const&) () from /nix/store/h3plrbghl3xaf61qnlkp4sdyfplf0ijx-qtbase-5.12.3/lib/libQt5Core.so.5                                                                                                                                                                       
#6  0x00007fd792d73c11 in QQmlPropertyMap::value(QString const&) const ()                                                                                                                                                                                                                                                    
   from /nix/store/mq9ssjnaqs17b9189g14j9znkcjyw3z8-qtdeclarative-5.12.3/lib/libQt5Qml.so.5                                                                                                                                                                                                                                  
#7  0x00007fd77c12b39c in Plasma::DataModel::dataUpdated(QString const&, QMap<QString, QVariant> const&) ()                                                                                                                                                                                                                  
   from /nix/store/hs77gmwd1bx196m498ksyqixqlcwff4y-plasma-framework-5.61.0-bin/lib/qt-5.12.3/qml/org/kde/plasma/core/libcorebindingsplugin.so                                                                                                                                                                               
#8  0x00007fd79123f69f in QMetaObject::activate(QObject*, int, int, void**) ()                                                                                                                                                                                                                                               
   from /nix/store/h3plrbghl3xaf61qnlkp4sdyfplf0ijx-qtbase-5.12.3/lib/libQt5Core.so.5                                                                                                                                                                                                                                        
#9  0x00007fd77c111578 in Plasma::DataSource::newData(QString const&, QMap<QString, QVariant> const&) ()                                                                                                                                                                                                                     
   from /nix/store/hs77gmwd1bx196m498ksyqixqlcwff4y-plasma-framework-5.61.0-bin/lib/qt-5.12.3/qml/org/kde/plasma/core/libcorebindingsplugin.so                                                                                                                                                                               
#10 0x00007fd77c131c0e in Plasma::DataSource::dataUpdated(QString const&, QMap<QString, QVariant> const&) ()                                                                                                                                                                                                                 
   from /nix/store/hs77gmwd1bx196m498ksyqixqlcwff4y-plasma-framework-5.61.0-bin/lib/qt-5.12.3/qml/org/kde/plasma/core/libcorebindingsplugin.so                                                                                                                                                                               
#11 0x00007fd77c113a9d in Plasma::DataSource::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()                                                                                                                                                                                                                
   from /nix/store/hs77gmwd1bx196m498ksyqixqlcwff4y-plasma-framework-5.61.0-bin/lib/qt-5.12.3/qml/org/kde/plasma/core/libcorebindingsplugin.so                                                                                                                                                                               
#12 0x00007fd79123f54e in QMetaObject::activate(QObject*, int, int, void**) ()                                                                                                                                                                                                                                               
   from /nix/store/h3plrbghl3xaf61qnlkp4sdyfplf0ijx-qtbase-5.12.3/lib/libQt5Core.so.5                                                                                                                                                                                                                                        
#13 0x00007fd7936ad4b8 in Plasma::DataContainer::dataUpdated(QString const&, QMap<QString, QVariant> const&) ()                                                                                                                                                                                                              
   from /nix/store/394nk3yny74i5l3b5xbhbjnkvmrfzr0i-plasma-framework-5.61.0/lib/libKF5Plasma.so.5                                                                                                                                                                                                                            
#14 0x00007fd7936b2622 in Plasma::DataContainer::checkForUpdate() ()                                                                                                                                                                                                                                                         
   from /nix/store/394nk3yny74i5l3b5xbhbjnkvmrfzr0i-plasma-framework-5.61.0/lib/libKF5Plasma.so.5                                                                                                                                                                                                                            
#15 0x00007fd7936b7d14 in Plasma::DataEngine::timerEvent(QTimerEvent*) ()                                                                                                                                                                                                                                                    
   from /nix/store/394nk3yny74i5l3b5xbhbjnkvmrfzr0i-plasma-framework-5.61.0/lib/libKF5Plasma.so.5                                                                                                                                                                                                                            
#16 0x00007fd79123fdab in QObject::event(QEvent*) () from /nix/store/h3plrbghl3xaf61qnlkp4sdyfplf0ijx-qtbase-5.12.3/lib/libQt5Core.so.5                                                                                                                                                                                      
#17 0x00007fd791db0471 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()                                                                                                                                                                                                                                           
   from /nix/store/h3plrbghl3xaf61qnlkp4sdyfplf0ijx-qtbase-5.12.3/lib/libQt5Widgets.so.5                                                                                                                                                                                                                                     
#18 0x00007fd791db7860 in QApplication::notify(QObject*, QEvent*) () from /nix/store/h3plrbghl3xaf61qnlkp4sdyfplf0ijx-qtbase-5.12.3/lib/libQt5Widgets.so.5                                                                                                                                                                   
#19 0x00007fd791215a09 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()                                                                                                                                                                                                                                            
   from /nix/store/h3plrbghl3xaf61qnlkp4sdyfplf0ijx-qtbase-5.12.3/lib/libQt5Core.so.5                                                                                                                                                                                                                                        
#20 0x00007fd79126860b in QTimerInfoList::activateTimers() () from /nix/store/h3plrbghl3xaf61qnlkp4sdyfplf0ijx-qtbase-5.12.3/lib/libQt5Core.so.5                                                                                                                                                                             
#21 0x00007fd791268eac in ?? () from /nix/store/h3plrbghl3xaf61qnlkp4sdyfplf0ijx-qtbase-5.12.3/lib/libQt5Core.so.5                                                                                                                                                                                                           
#22 0x00007fd78dbe870e in g_main_context_dispatch () from /nix/store/nbn77rv8cgxnyhzn2qvrccpk9ga5pwrl-glib-2.60.7/lib/libglib-2.0.so.0                                                                                                                                                                                       
#23 0x00007fd78dbe89a8 in g_main_context_iterate.isra () from /nix/store/nbn77rv8cgxnyhzn2qvrccpk9ga5pwrl-glib-2.60.7/lib/libglib-2.0.so.0                                                                                                                                                                                   
#24 0x00007fd78dbe8a3c in g_main_context_iteration () from /nix/store/nbn77rv8cgxnyhzn2qvrccpk9ga5pwrl-glib-2.60.7/lib/libglib-2.0.so.0                                                                                                                                                                                      
#25 0x00007fd791269213 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()                                                                                                                                                                                                                      
   from /nix/store/h3plrbghl3xaf61qnlkp4sdyfplf0ijx-qtbase-5.12.3/lib/libQt5Core.so.5                                                                                                                                                                                                                                        
#26 0x00007fd7912146eb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()                                                                                                                                                                                                                                         
   from /nix/store/h3plrbghl3xaf61qnlkp4sdyfplf0ijx-qtbase-5.12.3/lib/libQt5Core.so.5                                                                                                                                                                                                                                        
#27 0x00007fd79121c8b2 in QCoreApplication::exec() () from /nix/store/h3plrbghl3xaf61qnlkp4sdyfplf0ijx-qtbase-5.12.3/lib/libQt5Core.so.5                                                                                                                                                                                     
#28 0x0000000000421253 in main ()

This makes me think that it is the DataEngine using lots of CPU for some reason, maybe calculating free space? As seen here (https://phabricator.kde.org/D14895), the not responding error is shown when the free-space job times out. I've also done a strace that shows a loop of openat with /etc/mtab, a pause, and then opening of the notification sound files. It appears to be related to the Solid DataEngine. The full strace is attached.

EXPECTED RESULT

plasmashell should not become unresponsive, no matter how many mounts are available. It would be nice, as a workaround, to have the ability to disable the data engine causing the issue if a proper fix is not possible.

It is also possible that there is an issue/corner case with my NFS configuration. GNOME's gvfs-udisks2-volume-monitor also gives high CPU when in GNOME 3, and I have had to manually disable that. However, that does not cause a lockup of the UI (unlike with plasmashell, since the data engine appears to be built into the shell). I have attached my NFS configuration in the form of /etc/mtab below.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Linux 5.12.17-ck1
(available in About System)
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.61.0
Qt Version: 5.12.3

ADDITIONAL INFORMATION
Comment 1 Kevin Liu 2019-10-17 19:40:18 UTC
Created attachment 123289 [details]
strace of plasmashell as it loops loading /etc/mtab
Comment 2 Nate Graham 2023-09-19 20:21:33 UTC
Hello and thank you again for the bug report! Unfortunately we were not able to address it yet, nor even manage to reproduce the issue ourselves. Can we ask you to please check if this issue is still happening with Plasma 5.27?

If it is, please change the status to REPORTED. Thanks a lot!
Comment 3 Bug Janitor Service 2023-10-04 03:46:33 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2023-10-19 03:45:57 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!