https://bugs.kde.org/show_bug.cgi?id=413110

            Bug ID: 413110
           Summary: Plasmashell high CPU, unresponsive, gives "filesystem
                    not responding" with many NFS mounts
           Product: plasmashell
           Version: 5.16.5
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: DataEngines
          Assignee: plasma-b...@kde.org
          Reporter: kevin@potatofrom.space
  Target Milestone: 1.0

Created attachment 123288
  --> https://bugs.kde.org/attachment.cgi?id=123288&action=edit
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

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to