Bug 422091 - KIOFuse crashes when navigating folder with Dolphin terminal open
Summary: KIOFuse crashes when navigating folder with Dolphin terminal open
Status: RESOLVED FIXED
Alias: None
Product: kiofuse
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: a.saoutkin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-26 10:35 UTC by Kai Uwe Broulik
Modified: 2020-08-01 12:57 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Uwe Broulik 2020-05-26 10:35:05 UTC
SUMMARY
When using Dolphin git it syncs the Terminal to the view using KIO Fuse, if necessary for remote locations.
Navigating in Dolphin after entering a remote location that couldn't be accessed.

STEPS TO REPRODUCE
See also Bug 422090

1. Go to sftp://whatever
2. Open Dolphin Terminal panel (F4)
3. Wait for it to mount KIOFuse and cd to /run/user/foo/kio-fuse/sftp/whatever
4. Click a symlink to a folder in Dolphin view
5. Observe how it fauls to cd to that folder because of Bug 420090
6. Click another folder in Dolphin view

OBSERVED RESULT
It crashes

#4  KIOFuseVFS::nodeByName (this=this@entry=0x7ffda66ddb68, parent=std::shared_ptr<KIOFuseNode> (use count 2, weak count 0) = {...}, name=...) at ./kiofusevfs.cpp:1250
#5  0x0000563d328807fa in KIOFuseVFS::<lambda()>::operator()(void) const (__closure=0x563d3451eb80) at ./kiofusevfs.cpp:2022
#6  0x00007fb4b1bd36d7 in QtPrivate::QSlotObjectBase::call (a=0x7ffda66dcf30, r=0x563d34523bd0, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#7  doActivate<false> (sender=0x563d34523bd0, signal_index=6, argv=0x7ffda66dcf30) at kernel/qobject.cpp:3870
#8  0x00007fb4b233b71c in KJob::result(KJob*, KJob::QPrivateSignal) () from /usr/lib/x86_64-linux-gnu/libKF5CoreAddons.so.5
#9  0x00007fb4b233c251 in KJob::finishJob(bool) () from /usr/lib/x86_64-linux-gnu/libKF5CoreAddons.so.5
#10 0x00007fb4b2ad78de in KIO::SimpleJob::slotFinished (this=0x563d34523bd0) at /home/kaiuwe/Projekte/kf5/kio/src/core/simplejob.cpp:232
#11 0x00007fb4b2adb5d1 in KIO::StatJob::slotFinished (this=0x563d34523bd0) at /home/kaiuwe/Projekte/kf5/kio/src/core/statjob.cpp:199
#12 0x00007fb4b2ada73e in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KIO::SimpleJob::*)()>::call(void (KIO::SimpleJob::*)(), KIO::SimpleJob*, void**) (f=&virtual KIO::SimpleJob::slotFinished(), o=0x563d34523bd0, arg=0x7ffda66dd230) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:152
#13 0x00007fb4b2ada496 in QtPrivate::FunctionPointer<void (KIO::SimpleJob::*)()>::call<QtPrivate::List<>, void>(void (KIO::SimpleJob::*)(), KIO::SimpleJob*, void**) (f=&virtual KIO::SimpleJob::slotFinished(), o=0x563d34523bd0, arg=0x7ffda66dd230) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:185
#14 0x00007fb4b2ada331 in QtPrivate::QSlotObject<void (KIO::SimpleJob::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x563d3452e770, r=0x563d34523bd0, a=0x7ffda66dd230, ret=0x0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:418

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.18.90
KDE Frameworks Version: 5.71.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
KIO-Fuse git master
Comment 1 Fabian Vogt 2020-08-01 12:57:42 UTC
Git commit 1fedbb198f9cf785108babc673d377dc169a745e by Fabian Vogt.
Committed on 01/08/2020 at 12:53.
Pushed by fvogt into branch 'master'.

Reimplement mounting in a different way

Instead of always creating an origin node at the authority level
and creating all path elements as directories, only create everything
up to the origin when mounting. Everything beyond that is created
on-demand when an application triggers readdir or lookup.

Some ioslaves like tar don't support access at the root level
(tar:/// doesn't exist), so for mounting those it has to traverse the
URL upward until a valid origin is found.

As mountUrl no longer creates all nodes to resolve the full URL, it
returns a string in the callback now instead of a node.

As there is no longer a concept of a protocol node, it was replaced
with a plain DirNode instead.

remoteUrl had to be fixed to deal with m_overrideUrl having a non-empty
(or '/') path, it didn't add '/' before.

The algorithm of localPathToRemoteUrl was changed to not need all path
elements as nodes. It stops traversing once an origin was found.
This means it behaves incorrectly/unexpectedly with nested origins.
Related: bug 422090

M  +34   -2    DESIGN
M  +2    -2    kiofuseservice.cpp
M  +194  -170  kiofusevfs.cpp
M  +9    -4    kiofusevfs.h
M  +1    -9    tests/fileopstest.cpp

https://invent.kde.org/system/kio-fuse/commit/1fedbb198f9cf785108babc673d377dc169a745e