https://bugs.kde.org/show_bug.cgi?id=503362
Bug ID: 503362 Summary: Sometimes whole KDevelop freezes when editing file on slow disk (because sync on main thread) Classification: Applications Product: kdevelop Version: 6.1.241203 Platform: Arch Linux OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: kdevelop-bugs-n...@kde.org Reporter: davis...@gmail.com Target Milestone: --- SUMMARY When editing file on slow disk then whole KDevelop freezes/gets stuck STEPS TO REPRODUCE 1. Edit file on slow disk (maybe try on NFS) OBSERVED RESULT Sometimes whole KDevelop freezes EXPECTED RESULT Save/sync in another thread not to block UI SOFTWARE/OS VERSIONS KDE Plasma Version: 6.3.4 KDE Frameworks Version: 6.12.0 Qt Version: 6.9.0 ADDITIONAL INFORMATION This happens because `fdatasync` is invoked in Main Thread. I noticed 2 separate cases One when `.kate-swp` file is synced > fd is file like /mnt/path/.filename.c.kate-swp > Thread 1 (Thread 0x7ebd7ada66c0 (LWP 336849) "kdevelop"): > #0 __GI_fdatasync (fd=75) at ../sysdeps/unix/sysv/linux/fdatasync.c:27 > #1 0x00007ebdfffb6cc9 in QtPrivate::QSlotObjectBase::call (this=<optimized > out>, r=<optimized out>, a=<optimized out>, this=<optimized out>, > r=<optimized out>, a=<optimized out>) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:461 > #2 doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, > argv=<optimized out>) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4138 > #3 0x00007ebdfffbd8a5 in QMetaObject::activate<void, QTimer::QPrivateSignal> > (sender=0x5fda75824150, mo=<optimized out>, local_signal_index=0, ret=0x0) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs.h:306 > #4 QTimer::timeout (this=0x5fda75824150, _t1=...) at > /usr/src/debug/qt6-base/build/src/corelib/Core_autogen/include/moc_qtimer.cpp:182 > #5 QTimer::timerEvent (e=<optimized out>, this=0x5fda75824150) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qtimer.cpp:285 > #6 QTimer::timerEvent (this=0x5fda75824150, e=<optimized out>) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qtimer.cpp:279 > #7 0x00007ebdfffa5459 in QObject::event (this=0x5fda75824150, > e=0x7ffeacb73020) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:1406 > #8 0x00007ebe010fed9e in QApplicationPrivate::notify_helper (this=<optimized > out>, receiver=0x5fda75824150, e=0x7ffeacb73020) at > /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3301 > #9 0x00007ebdfff5a018 in QCoreApplication::notifyInternal2 > (receiver=0x5fda75824150, event=0x7ffeacb73020) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1106 > #10 0x00007ebe000de200 in QCoreApplication::sendEvent (receiver=<optimized > out>, event=0x7ffeacb73020) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1546 > #11 QTimerInfoList::activateTimers (this=<optimized out>) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qtimerinfo_unix.cpp:426 > #12 0x00007ebe001cfe61 in timerSourceDispatch (source=<optimized out>) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:152 > #13 idleTimerSourceDispatch (source=source@entry=0x5fda72c26ab0) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:199 > #14 0x00007ebdfcacd1e4 in g_main_dispatch (context=0x7ebdd4000f00) at > ../glib/glib/gmain.c:3398 > #15 0x00007ebdfcb30e97 in g_main_context_dispatch_unlocked > (context=0x7ebdd4000f00) at ../glib/glib/gmain.c:4249 > #16 g_main_context_iterate_unlocked.isra.0 > (context=context@entry=0x7ebdd4000f00, block=block@entry=1, > dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4314 > #17 0x00007ebdfcacc615 in g_main_context_iteration (context=0x7ebdd4000f00, > may_block=1) at ../glib/glib/gmain.c:4379 > #18 0x00007ebe001cd59d in QEventDispatcherGlib::processEvents > (this=0x5fda72b880b0, flags=...) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399 > #19 0x00007ebdfff65376 in QEventLoop::processEvents (this=0x7ffeacb73300, > flags=...) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:104 > #20 QEventLoop::exec (this=0x7ffeacb73300, flags=...) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:186 > #21 0x00007ebdfff5d159 in QCoreApplication::exec () at > /usr/src/debug/qt6-base/qtbase/src/corelib/global/qflags.h:77 > #22 0x00005fda4c22d1f6 in ?? () > #23 0x00007ebdff835488 in __libc_start_call_main > (main=main@entry=0x5fda4c226180, argc=argc@entry=1, > argv=argv@entry=0x7ffeacb738c8) at ../sysdeps/nptl/libc_start_call_main.h:58 > #24 0x00007ebdff83554c in __libc_start_main_impl (main=0x5fda4c226180, > argc=1, argv=0x7ffeacb738c8, init=<optimized out>, fini=<optimized out>, > rtld_fini=<optimized out>, stack_end=0x7ffeacb738b8) at > ../csu/libc-start.c:360 > #25 0x00005fda4c22dbb5 in ?? () And another time > Thread 1 (Thread 0x7ebd7ada66c0 (LWP 336849) "kdevelop"): > #0 __GI_fdatasync (fd=18) at ../sysdeps/unix/sysv/linux/fdatasync.c:27 > #1 0x00007ebdfff1b8a6 in QFSFileEnginePrivate::nativeSyncToDisk > (this=0x5fda844c4530) at > /usr/src/debug/qt6-base/qtbase/src/corelib/io/qfsfileengine_unix.cpp:163 > #2 QFSFileEngine::syncToDisk (this=<optimized out>) at > /usr/src/debug/qt6-base/qtbase/src/corelib/io/qfsfileengine.cpp:427 > #3 0x00007ebdfff322d2 in QSaveFile::commit (this=<optimized out>) at > /usr/src/debug/qt6-base/qtbase/src/corelib/io/qsavefile.cpp:304 > #4 0x00007ebe00fc2740 in ?? () from /usr/lib/libKF6ConfigCore.so.6 > #5 0x00007ebe00fabb9a in KConfig::sync() () from > /usr/lib/libKF6ConfigCore.so.6 > #6 0x00007ebe01a370c7 in ?? () from /usr/lib/libKDevPlatformShell.so.61 > #7 0x00007ebe01a3741f in ?? () from /usr/lib/libKDevPlatformShell.so.61 > #8 0x00007ebe01a374ef in ?? () from /usr/lib/libKDevPlatformShell.so.61 > #9 0x00007ebdfffb6cc9 in QtPrivate::QSlotObjectBase::call (this=<optimized > out>, r=<optimized out>, a=<optimized out>, this=<optimized out>, > r=<optimized out>, a=<optimized out>) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:461 > #10 doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, > argv=<optimized out>) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4138 > #11 0x00007ebdff6a52b8 in Sublime::Area::viewAdded(Sublime::AreaIndex*, > Sublime::View*) () from /usr/lib/libKDevPlatformSublime.so.61 > #12 0x00007ebe01994353 in ?? () from /usr/lib/libKDevPlatformShell.so.61 > #13 0x00007ebe01995830 in ?? () from /usr/lib/libKDevPlatformShell.so.61 > #14 0x00007ebe01996518 in KDevelop::DocumentController::openDocument(QUrl > const&, KTextEditor::Range const&, > QFlags<KDevelop::IDocumentController::DocumentActivation>, QString const&, > KDevelop::IDocument*) () from /usr/lib/libKDevPlatformShell.so.61 > #15 0x00007ebda00a2f47 in ?? () from > /usr/lib/qt6/plugins/kdevplatform/61/kdevopenwith.so > #16 0x00007ebda0524d40 in ?? () from > /usr/lib/qt6/plugins/kdevplatform/61/kdevquickopen.so > #17 0x00007ebda051660d in ?? () from > /usr/lib/qt6/plugins/kdevplatform/61/kdevquickopen.so > #18 0x00007ebda051ccbc in ?? () from > /usr/lib/qt6/plugins/kdevplatform/61/kdevquickopen.so > #19 0x00007ebdfff59358 in > QCoreApplicationPrivate::sendThroughObjectEventFilters > (receiver=receiver@entry=0x5fda74a60fd0, event=event@entry=0x7ffeacb72d40) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1243 > #20 0x00007ebe010fed8e in QApplicationPrivate::notify_helper > (this=this@entry=0x5fda72b99600, receiver=receiver@entry=0x5fda74a60fd0, > e=e@entry=0x7ffeacb72d40) at > /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3295 > #21 0x00007ebe01103182 in QApplication::notify (this=<optimized out>, > receiver=0x5fda74a60fd0, e=<optimized out>) at > /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:2719 > #22 0x00007ebdfff5a018 in QCoreApplication::notifyInternal2 > (receiver=0x5fda74a60fd0, event=0x7ffeacb72d40) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1106 > #23 0x00007ebdfff5a04a in QCoreApplication::forwardEvent (receiver=<optimized > out>, event=<optimized out>, originatingEvent=<optimized out>) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1121 > #24 0x00007ebe0116dbff in QWidgetWindow::handleDragLeaveEvent > (this=<optimized out>, event=<optimized out>) at > /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qwidgetwindow.cpp:1020 > #25 QWidgetWindow::event (this=0x5fda74753900, event=0x7ffeacb72d40) at > /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qwidgetwindow.cpp:331 > #26 0x00007ebe010fed9e in QApplicationPrivate::notify_helper (this=<optimized > out>, receiver=0x5fda74753900, e=0x7ffeacb72d40) at > /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3301 > #27 0x00007ebdfff5a018 in QCoreApplication::notifyInternal2 > (receiver=0x5fda74753900, event=0x7ffeacb72d40) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1106 > #28 0x00007ebdfff5a06d in QCoreApplication::sendSpontaneousEvent > (receiver=<optimized out>, event=<optimized out>) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1560 > #29 0x00007ebe0078df7c in QGuiApplicationPrivate::processKeyEvent > (e=0x5fda7a280bf0) at > /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qguiapplication.cpp:2622 > #30 0x00007ebe0080d0c4 in QWindowSystemInterface::sendWindowSystemEvents > (flags=flags@entry=...) at > /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1113 > #31 0x00007ebe0080d2b7 in QWindowSystemInterface::flushWindowSystemEvents > (flags=...) at > /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1082 > #32 0x00007ebdfffa54aa in QObject::event (this=0x5fda72bba940, > e=0x7ebdcc043b40) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:1431 > #33 0x00007ebe010fed9e in QApplicationPrivate::notify_helper (this=<optimized > out>, receiver=0x5fda72bba940, e=0x7ebdcc043b40) at > /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3301 > #34 0x00007ebdfff5a018 in QCoreApplication::notifyInternal2 > (receiver=0x5fda72bba940, event=event@entry=0x7ebdcc043b40) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1106 > #35 0x00007ebdfff5a3f2 in QCoreApplication::sendEvent (receiver=<optimized > out>, event=0x7ebdcc043b40) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1546 > #36 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, > data=0x5fda72bab5b0) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1879 > #37 0x00007ebe001cfea8 in QCoreApplication::sendPostedEvents (receiver=0x0, > event_type=0) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1733 > #38 postEventSourceDispatch (s=s@entry=0x5fda72bb7fe0) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246 > #39 0x00007ebdfcacd1e4 in g_main_dispatch (context=0x7ebdd4000f00) at > ../glib/glib/gmain.c:3398 > #40 0x00007ebdfcb30e97 in g_main_context_dispatch_unlocked > (context=0x7ebdd4000f00) at ../glib/glib/gmain.c:4249 > #41 g_main_context_iterate_unlocked.isra.0 > (context=context@entry=0x7ebdd4000f00, block=block@entry=1, > dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4314 > #42 0x00007ebdfcacc615 in g_main_context_iteration (context=0x7ebdd4000f00, > may_block=1) at ../glib/glib/gmain.c:4379 > #43 0x00007ebe001cd59d in QEventDispatcherGlib::processEvents > (this=0x5fda72b880b0, flags=...) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399 > #44 0x00007ebdfff65376 in QEventLoop::processEvents (this=0x7ffeacb73300, > flags=...) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:104 > #45 QEventLoop::exec (this=0x7ffeacb73300, flags=...) at > /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:186 > #46 0x00007ebdfff5d159 in QCoreApplication::exec () at > /usr/src/debug/qt6-base/qtbase/src/corelib/global/qflags.h:77 > #47 0x00005fda4c22d1f6 in ?? () > #48 0x00007ebdff835488 in __libc_start_call_main > (main=main@entry=0x5fda4c226180, argc=argc@entry=1, > argv=argv@entry=0x7ffeacb738c8) at ../sysdeps/nptl/libc_start_call_main.h:58 > #49 0x00007ebdff83554c in __libc_start_main_impl (main=0x5fda4c226180, > argc=1, argv=0x7ffeacb738c8, init=<optimized out>, fini=<optimized out>, > rtld_fini=<optimized out>, stack_end=0x7ffeacb738b8) at > ../csu/libc-start.c:360 > #50 0x00005fda4c22dbb5 in ?? () -- You are receiving this mail because: You are watching all bug changes.