Bug 387290 - Can't connect to sftp server via Dolphin anymore
Summary: Can't connect to sftp server via Dolphin anymore
Status: RESOLVED WORKSFORME
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: SFTP (show other bugs)
Version: 17.08.2
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-25 09:52 UTC by Tobias Leupold
Modified: 2020-03-21 08:08 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Leupold 2017-11-25 09:52:10 UTC
When I try to connect to an sftp server via Dolphin, four sftp.so processes are started, taking 100% CPU load. Nothing happens for a while, then the password dialog pops up, filled with my kdewallet stored username and password. Either if I click "OK" or "Cancel", the processes still exist and still take 100% CPU load, until I manually kill them. And of course, I can't see the remote folder.

I don't think this is a problem with the server I'm trying to access, I tried the same username and password on the console via sftp, and it works normally.

This has been working for me for years now, I think (but I'm not sure) it broke with the kdeapps 17.04.3 release.

There's no error message, no crash and no console output. I don't know how to debug this or how to track it down further ...
Comment 1 Tobias Leupold 2017-11-25 10:15:38 UTC
Same thing btw if I try to access the server using KWrite, with the difference that only two sftp.so processes are started. So, probably, this is not a Dolphin problem.
Comment 2 Shlomi Fish 2018-03-10 22:10:08 UTC
shlomif@telaviv1:~$ dolphin sftp://localhost:
kf5.kio.core: Refilling KProtocolInfoFactory cache in the hope to find "stash"
Trying to convert empty KLocalizedString to QString.
qt.accessibility.core: Cannot create accessible child interface for object:  PlacesView(0x12f0d50)  index:  14
^C
shlomif@telaviv1:~$ dolphin sftp://kdetest@localhost:
kf5.kio.core: Refilling KProtocolInfoFactory cache in the hope to find "stash"
Trying to convert empty KLocalizedString to QString.
qt.accessibility.core: Cannot create accessible child interface for object:  PlacesView(0xe6c9a0)  index:  14
^C
shlomif@telaviv1:~$ dolphin --version
dolphin 17.12.2
shlomif@telaviv1:~$ 


=========

both RSA key and password connect quickly using dolphin here on mageia v7 x86-64. Tobias: can you still reproduce the problem or can we close it?
Comment 3 Tobias Leupold 2018-03-11 06:13:45 UTC
Still the very same here with the lastest KF5 available in Gentoo's main repository (Dolphin 17.12.3).
Comment 4 Shlomi Fish 2018-03-11 06:33:05 UTC
(In reply to Tobias Leupold from comment #3)
> Still the very same here with the lastest KF5 available in Gentoo's main
> repository (Dolphin 17.12.3).

I see.

1. What is your desktop env?

2. Does it happen in a new user?

3. Can you try strace?
Comment 5 Tobias Leupold 2018-03-11 07:11:26 UTC
My DE is KDE (obviously ;-)

I didn't try yet to use a new user. It actually does _not_ happen with a new user! Which is actually very interesting, isn't it?

I tried to remove the passwords from kwallet, but the error still occurs.

Can you give me a hint what config file I have to delete/modify to get a "clean" sftp reset, so that I don't have to delete my ~/whole KDE config?

Thanks a lot for helping me to track this down! I really didn't think it was a config issue (because I never changed anything, the error "simply" emerged)!
Comment 6 Shlomi Fish 2018-03-11 08:15:28 UTC
(In reply to Tobias Leupold from comment #5)
> My DE is KDE (obviously ;-)
> 
> I didn't try yet to use a new user. It actually does _not_ happen with a new
> user! Which is actually very interesting, isn't it?
> 
> I tried to remove the passwords from kwallet, but the error still occurs.
> 
> Can you give me a hint what config file I have to delete/modify to get a
> "clean" sftp reset, so that I don't have to delete my ~/whole KDE config?
> 

Try using strace. Otherwise, i am not an expert.

> Thanks a lot for helping me to track this down! I really didn't think it was
> a config issue (because I never changed anything, the error "simply"
> emerged)!

You are welcome.
Comment 7 Tobias Leupold 2018-03-11 12:04:28 UTC
strace outputs tons of whatever when I start up Dolphin ... I really can't find something in there ...

But I found something in ~/.local/share/sddm/xorg-session.log:log_kio_sftp, which is probably interesting:

log_kio_sftp: file system free space of QUrl("sftp://some_server/")
log_kio_sftp: checking cache: info.username = "" , info.url = "sftp://some_server"
log_kio_sftp: Creating the SSH session and setting options
log_kio_sftp: Trying to connect to the SSH server
log_kio_sftp: username= "" , host= "some_server" , port= 22
log_kio_sftp: Trying to authenticate with public key
log_kio_sftp: Getting the SSH server hash
log_kio_sftp: Trying to authenticate with public key
log_kio_sftp: Checking if the SSH server is known
log_kio_sftp: Trying to authenticate with the server
log_kio_sftp: Getting the SSH server hash
log_kio_sftp: Checking if the SSH server is known
log_kio_sftp: Trying to authenticate with the server
log_kio_sftp: Trying to authenticate with public key
log_kio_sftp: Trying to authenticate with public key

After all, the question is: How can this happen with an existing user without changing any configuration? As we know now, there's no problem with a new user ...
Comment 8 Tobias Leupold 2018-03-11 12:05:15 UTC
The log's filename is of course ~/.local/share/sddm/xorg-session.log
Comment 9 Tobias Leupold 2018-03-18 19:07:56 UTC
I'm still trying to track this down. I moved ~/.local and ~/.config, but it didn't help. I'm still seeing the same error. If I remove the respective line from ~/.ssh/known_hosts, I get the question if I want to connect to the host, but It's the same afterwards.

So: Which .* files are affected by this?!

I simply want to avoid killing my whole home directory ...
Comment 10 Shlomi Fish 2018-05-10 07:32:28 UTC
Tobias: you can try bisecting your home directory - possibly in a new user - see https://en.wikipedia.org/wiki/Bisection_(software_engineering) .
Comment 11 Shlomi Fish 2018-05-10 07:34:05 UTC
(In reply to Tobias Leupold from comment #9)
> I'm still trying to track this down. I moved ~/.local and ~/.config, but it
> didn't help. I'm still seeing the same error. If I remove the respective
> line from ~/.ssh/known_hosts, I get the question if I want to connect to the
> host, but It's the same afterwards.
> 
> So: Which .* files are affected by this?!
> 
> I simply want to avoid killing my whole home directory ...

you may also need to logout and login or at least run kbuildsycoca.
Comment 12 Andreas Sturmlechner 2018-11-29 14:16:14 UTC
Please re-test with 18.08.3 and libssh-0.8.x, we have backported all the changes to sftp from 18.12 branch.
Comment 13 Nate Graham 2018-11-29 14:20:03 UTC
(Please re-open if this still doesn't work for you in the upcoming Dolphin 18.12)
Comment 14 Tobias Leupold 2018-12-16 08:32:43 UTC
It's still the same with 18.08.3. I'll try 18.12.0 asap.
Comment 15 Tobias Leupold 2018-12-16 08:48:04 UTC
... and it's also still the same here with 18.12.0. When I'm trying to establish an sftp connection, I get multiple sftp.so processes cosuming 100 % CPU (or as much as they can get).
Comment 16 Harald Sitter 2020-03-04 14:12:25 UTC
Still a problem?

Have you tried moving your .ssh out of the way so you start with a pristine config?

If you feel comfortable with gdb I think the best way to debug this is to attach gdb to one of the 100% processes and backtrace them. They are very likely stuck doing something, if we knew what it is they are stuck on we'd probably have an easier time figuring out what causes it.
Comment 17 Tobias Leupold 2020-03-04 17:08:25 UTC
Quite some time since I tried it last time, I only used sshfs since. Apparently, the problem is gone. I can now login to a sftp host again using Dolphin. I have currently Plasma 5.17.5 and Frameworks 5.64.0 installed.

But it's also another new machine, so ... whatever. It works again now ;-)
Comment 18 Konstantinos Smanis 2020-03-06 09:55:56 UTC
On a similar note, I have been using FISH as a replacement for ages, since I was also affected by this bug, but apparently I can no longer reproduce any SFTP hang with a couple of hosts.
Comment 19 Bug Janitor Service 2020-03-21 04:33:10 UTC
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!
Comment 20 Shlomi Fish 2020-03-21 08:08:51 UTC
Marking as WORKSFORME then. Thanks!