Summary: | Plasma freezes or becomes very slow when there's heavy IO | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | John <ilikefoss> |
Component: | general | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | ilikefoss, marek321, postix |
Priority: | NOR | ||
Version First Reported In: | 5.26.90 | ||
Target Milestone: | --- | ||
Platform: | Neon | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | KDiskMark using a test folder on the Desktop for its work files |
Description
John
2023-02-04 14:08:37 UTC
kwin periodically needs to access the disk, that's inevitable. We change the scheduling policy for the main thread and libinput thread to RR. Not sure that there's anything else we can do atm. If there are freezes, please check whether changing the file system type helps, ftr I haven't experienced severe issues with ext4. 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! 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! I hit this issue now. Should I report a new bug? Operating System: Gentoo Linux 2.17 KDE Plasma Version: 6.4.4 KDE Frameworks Version: 6.17.0 Qt Version: 6.9.1 Kernel Version: 6.12.31-gentoo-x86_64 (64-bit) Graphics Platform: Wayland Processors: 32 × 13th Gen Intel® Core™ i9-13900K Memory: 128 GiB of RAM (125.4 GiB usable) Graphics Processor: NVIDIA RTX A4000 Manufacturer: ASUSTeK COMPUTER INC. TL;DR This seems to be https://bugs.kde.org/show_bug.cgi?id=487043 which hasn't been properly fixed (or it broke again). I have seen the change that disables the cache, but a cache is still being written. This issue will never be fully solved as long as blocking write operations are used in the main event loop. Investigation I ran some really heavy I/O, latency reported by zpool iostat -w can reach 17 seconds(!!) for writes (I may be able to tune this, but that is not the point). When plasma hangs for this long it's easy to just run "gdb -p $(pidof plasmashell)" and find out what it's doing: (gdb) bt #0 0x00007fed1fad6efe in linkat () at /usr/lib64/libc.so.6 #1 0x00007fed2020d93c in operator() (__closure=<optimized out>, dst=...) at /usr/src/debug/dev-qt/qtbase-6.9.1-r3/qtbase-everywhere-src-6.9.1/src/corelib/io/qtemporaryfile.cpp:440 #2 operator() (__closure=__closure@entry=0x7ffc76942700, newName=<optimized out>) at /usr/src/debug/dev-qt/qtbase-6.9.1-r3/qtbase-everywhere-src-6.9.1/src/corelib/io/qtemporaryfile.cpp:459 #3 0x00007fed202339d1 in QTemporaryFileEngine::materializeUnnamedFile (this=this@entry=0x557dd526da60, newName=..., mode=mode@entry=QTemporaryFileEngine::Overwrite) at /usr/src/debug/dev-qt/qtbase-6.9.1-r3/qtbase-everywhere-src-6.9.1/src/corelib/io/qtemporaryfile.cpp:476 #4 0x00007fed20233adf in QTemporaryFileEngine::renameOverwrite (this=0x557dd526da60, newName=<optimized out>) at /usr/src/debug/dev-qt/qtbase-6.9.1-r3/qtbase-everywhere-src-6.9.1/src/corelib/io/qtemporaryfile.cpp:390 #5 QTemporaryFileEngine::renameOverwrite (this=0x557dd526da60, newName=...) at /usr/src/debug/dev-qt/qtbase-6.9.1-r3/qtbase-everywhere-src-6.9.1/src/corelib/io/qtemporaryfile.cpp:387 #6 0x00007fed20210133 in QSaveFile::commit (this=this@entry=0x7ffc76942830) at /usr/src/debug/dev-qt/qtbase-6.9.1-r3/qtbase-everywhere-src-6.9.1/src/corelib/io/qsavefile.cpp:320 #7 0x00007fed219d9068 in QSGRhiSupport::finalizePipelineCache (this=this@entry=0x7fed21d6d890 <QSGRhiSupport::instance_internal()::inst>, rhi=rhi@entry=0x557dd5145510, config=...) at /usr/src/debug/dev-qt/qtdeclarative-6.9.1-r2/qtdeclarative-everywhere-src-6.9.1/src/quick/scenegraph/qsgrhisupport.cpp:1098 #8 0x00007fed219da8a3 in QSGRhiSupport::destroyRhi (this=0x7fed21d6d890 <QSGRhiSupport::instance_internal()::inst>, rhi=0x557dd5145510, config=...) at /usr/src/debug/dev-qt/qtdeclarative-6.9.1-r2/qtdeclarative-everywhere-src-6.9.1/src/quick/scenegraph/qsgrhisupport.cpp:1301 #9 QSGRhiSupport::destroyRhi (this=0x7fed21d6d890 <QSGRhiSupport::instance_internal()::inst>, rhi=0x557dd5145510, config=...) at /usr/src/debug/dev-qt/qtdeclarative-6.9.1-r2/qtdeclarative-everywhere-src-6.9.1/src/quick/scenegraph/qsgrhisupport.cpp:1295 #10 QSGGuiThreadRenderLoop::windowDestroyed (this=0x557dca8b33a0, window=<optimized out>) at /usr/src/debug/dev-qt/qtdeclarative-6.9.1-r2/qtdeclarative-everywhere-src-6.9.1/src/quick/scenegraph/qsgrenderloop.cpp:371 #11 0x00007fed21abcf2c in QQuickWindow::~QQuickWindow (this=this@entry=0x557dd27e1cf0, __in_chrg=<optimized out>) at /usr/src/debug/dev-qt/qtdeclarative-6.9.1-r2/qtdeclarative-everywhere-src-6.9.1/src/quick/items/qquickwindow.cpp:1184 #12 0x00007fed22a199f4 in PlasmaQuick::PlasmaWindow::~PlasmaWindow (this=this@entry=0x557dd27e1cf0, __in_chrg=<optimized out>) at /usr/src/debug/kde-plasma/libplasma-6.4.4/libplasma-6.4.4/src/plasmaquick/plasmawindow.cpp:67 #13 0x00007fecfa7e2afd in NotificationWindow::~NotificationWindow (this=this@entry=0x557dd27e1cf0, __in_chrg=<optimized out>) at /usr/src/debug/kde-plasma/plasma-workspace-6.4.4/plasma-workspace-6.4.4/applets/notifications/notificationwindow.cpp:26 #14 0x00007fecfa7e1ab9 in QQmlPrivate::QQmlElement<NotificationWindow>::~QQmlElement (this=0x557dd27e1cf0, __in_chrg=<optimized out>) at /usr/include/qt6/QtQml/qqmlprivate.h:104 #15 QQmlPrivate::QQmlElement<NotificationWindow>::~QQmlElement (this=0x557dd27e1cf0, __in_chrg=<optimized out>) at /usr/include/qt6/QtQml/qqmlprivate.h:104 #16 0x00007fed201833ae in QObject::event (this=0x557dd27e1cf0, e=0x557dcf934f70) at /usr/src/debug/dev-qt/qtbase-6.9.1-r3/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qobject.cpp:1416 #17 0x00007fed22509a86 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x557dd27e1cf0, e=0x557dcf934f70) at /usr/src/debug/dev-qt/qtbase-6.9.1-r3/qtbase-everywhere-src-6.9.1/src/widgets/kernel/qapplication.cpp:3303 #18 0x00007fed201ff718 in QCoreApplication::notifyInternal2 (receiver=0x557dd27e1cf0, event=event@entry=0x557dcf934f70) at /usr/src/debug/dev-qt/qtbase-6.9.1-r3/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1106 #19 0x00007fed20225ec2 in QCoreApplication::sendEvent (receiver=<optimized out>, event=0x557dcf934f70) at /usr/src/debug/dev-qt/qtbase-6.9.1-r3/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1546 #20 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x557dc9e434a0) at /usr/src/debug/dev-qt/qtbase-6.9.1-r3/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qcoreapplication.cpp:1879 #21 0x00007fed1ffb0b27 in postEventSourceDispatch (s=0x557dc9e4c320) at /usr/src/debug/dev-qt/qtbase-6.9.1-r3/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qeventdispatcher_glib.cpp:246 #22 0x00007fed1e8b8d53 in g_main_dispatch (context=context@entry=0x7fed14000f00) at ../glib-2.84.3/glib/gmain.c:3398 #23 0x00007fed1e8bc067 in g_main_context_dispatch_unlocked (context=0x7fed14000f00) at ../glib-2.84.3/glib/gmain.c:4249 #24 g_main_context_iterate_unlocked (context=context@entry=0x7fed14000f00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib-2.84.3/glib/gmain.c:4314 #25 0x00007fed1e8bc7d0 in g_main_context_iteration (context=0x7fed14000f00, may_block=1) at ../glib-2.84.3/glib/gmain.c:4379 #26 0x00007fed1ffb0bb3 in QEventDispatcherGlib::processEvents (this=0x557dc9e4cb10, flags=...) at /usr/src/debug/dev-qt/qtbase-6.9.1-r3/qtbase-everywhere-src-6.9.1/src/corelib/kernel/qeventdispatcher_glib.cpp:399 #27 0x00007fed2022cde2 in QEventLoop::exec (this=this@entry=0x7ffc76942e00, flags=..., flags@entry=...) at /usr/src/debug/dev-qt/qtbase-6.9.1-r3/qtbase-everywhere-src-6.9.1/src/corelib/global/qflags.h:77 #28 0x00007fed2022cf83 in QCoreApplication::exec () at /usr/src/debug/dev-qt/qtbase-6.9.1-r3/qtbase-everywhere-src-6.9.1/src/corelib/global/qflags.h:77 #29 0x00007fed2070ee70 in QGuiApplication::exec () at /usr/src/debug/dev-qt/qtbase-6.9.1-r3/qtbase-everywhere-src-6.9.1/src/gui/kernel/qguiapplication.cpp:1986 #30 0x00007fed22491059 in QApplication::exec () at /usr/src/debug/dev-qt/qtbase-6.9.1-r3/qtbase-everywhere-src-6.9.1/src/widgets/kernel/qapplication.cpp:2570 #31 0x0000557d8ad89f2d in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kde-plasma/plasma-workspace-6.4.4/plasma-workspace-6.4.4/shell/main.cpp:188 In frame #7 finalizePipelineCache is called, even though it's supposedly disabled by https://invent.kde.org/plasma/kwin/-/commit/f700de56f8ae6c15c7fd7d18bdaf47bf1e21b219 (though to be honest, I don't know if it isn't some other cache). It's the bit that was changed as the fix in Qt at: https://codereview.qt-project.org/c/qt/qtdeclarative/+/564411 After looking around local variables in the various frames I found it is trying to create $HOME/.cache/plasmashell/qtpipelinecache-x86_64-little_endian-lp64/qqpc_opengl.ZujGbi (In reply to Vlad Zahorodnii from comment #1) > kwin periodically needs to access the disk, that's inevitable. We change the > scheduling policy for the main thread and libinput thread to RR. Not sure > that there's anything else we can do atm. If there are freezes, please check > whether changing the file system type helps, ftr I haven't experienced > severe issues with ext4. It might be inevitable, but that doesn't mean that it's right to do that! I have never seen Windows XP - 7 (the only ones that I used) to ever have the graphical interface and the interactions with it ever freeze or slow down. There is definitely something plain wrong or unoptimized into what Kwin is doing since a disk IO, no matter how heavy it can make it freeze or slow down. Plus, there's a reason why besides the disk(s) there's also RAM storage type. Why isn't the whole Plasma session loaded entirely into RAM, where RAM storage is pleynty and then make Kwin sync (read / write) from RAM only and only from time to time write something to disk? As for the filesystem, checking if this problems happen with another filesystem time is too hard to do as it requires a full back / restore + reinstallation of the OS, something I'm not prepared to do now. And also I don't care if it's not happening on the old EXT4 one as I moved to BRFS for the extra features that it has and I don't plane to move back to EXT4 ever. So, this problem is either fixed for BTRFS and comparable in features filesystems or I will ever consider it unfixed and a problem in KDE software. |