T11627: Improve KIO asynchronicity

Méven Car noreply at phabricator.kde.org
Sun Apr 19 19:54:29 BST 2020


meven added a comment.


  While copying from local to a nfs mount with the destination opened, you get a dolphin freeze because KCoreDirlister is run in main thread and because of
  
    #0  statx (fd=-100, 
        path=0x5564ae9e5148 "/media/NFS/Myfile", flags=0, mask=4095, buf=0x7ffc8ba20420) at ../sysdeps/unix/sysv/linux/statx.c:29
    #1  0x00007f3559719016 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
    #2  0x00007f35596b3984 in QFileInfo::isDir() const () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
    #3  0x00007f355b1a5913 in ?? () from /usr/lib/x86_64-linux-gnu/libKF5KIOCore.so.5
    #4  0x00007f35597a3458 in QMetaObject::activate(QObject*, int, int, void**) ()
       from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
    #5  0x00007f355a916fd6 in KDirWatch::dirty(QString const&) () from /usr/lib/x86_64-linux-gnu/libKF5CoreAddons.so.5
    #6  0x00007f35597a3d5a in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
    #7  0x00007f355a268a66 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
       from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
    #8  0x00007f355a2720f0 in QApplication::notify(QObject*, QEvent*) ()
       from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
    #9  0x00007f355977793a in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
       from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
    #10 0x00007f355977a5b8 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
       from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
    #11 0x00007f35597cff67 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
    #12 0x00007f35576c1fbd in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
    #13 0x00007f35576c2240 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
    #14 0x00007f35576c22e3 in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
    #15 0x00007f35597cf565 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
       from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
    #16 0x00007f35597764db in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
       from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
    #17 0x00007f355977e246 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
    #18 0x00007f355b9de8b5 in kdemain () from /usr/lib/x86_64-linux-gnu/libkdeinit5_dolphin.so
    #19 0x00007f355b7c70b3 in __libc_start_main (main=0x5564ad350060, argc=1, argv=0x7ffc8ba20f38, init=<optimized out>, 
        fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc8ba20f28) at ../csu/libc-start.c:308
    #20 0x00005564ad35009e in _start ()
  
  The destination is marked dirty because of the new file being created.
  It triggers KDirWatch::dirty which in turn makes `KCoreDirListerCache::slotFileDirty` trigger a statx on the new file.
  Which blocks since the NFS drive is already in use.
  And this freezes Dolphin UI since KCoreDirlister is in dolphin main thread.

TASK DETAIL
  https://phabricator.kde.org/T11627

To: meven
Cc: ahartmetz, broulik, ognarb, #dolphin, #frameworks, meven, dfaure, azyx, nikolaik, pberestov, iasensio, fprice, LeGast00n, cblack, fbampaloukas, alexde, Codezela, feverfew, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp, rdieter, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20200419/855bb8c4/attachment.htm>


More information about the kfm-devel mailing list