SUMMARY If, after connecting to an SFTP server, the server is restarted, KDE apps subsequently cannot connect to that server again for a few minutes. Even trying Refresh actions, or switching to a local folder and then back to the remote server, don't resolve it. Typical use case: editing config files on a server, rebooting so they take effect, and then continuing working on them. STEPS TO REPRODUCE 1. Open an SFTP remote folder in Dolphin. 2. Reboot the server. (I guess restarting the SSH server may also trigger it, but I haven't checked. 3. Refresh the folder in Dolphin, perhaps multiple times. OBSERVED RESULT "Internal Error Please send a full bug report at https://bugs.kde.org" After a few minutes it works again. (I guess the connection or the kio_sftp process is dropped if it's unused for a few minutes?) EXPECTED RESULT After realizing that the current connection doesn't work anymore, it attempts to reconnect once. Or at least the current connection is dropped, so a subsequent refresh or other operation starts a new, working connection. SOFTWARE/OS VERSIONS Operating System: openSUSE Tumbleweed 20241102 KDE Plasma Version: 6.2.2 KDE Frameworks Version: 6.7.0 Qt Version: 6.8.0 Kernel Version: 6.11.5-1-default (64-bit)
Related: Bug 395739. At that point Dolphin hung; it was closed automatically after the reporter didn't confirm that it was still reproducible. Perhaps the underlying problem is the same, it just now throws an error message. I now checked, restarting sshd alone doesn't trigger the bug because existing sessions are preserved, but killing the sshd-session and sftpserver processes does.
A possibly relevant merge request was started @ https://invent.kde.org/network/kio-extras/-/merge_requests/379
Git commit 9d624e7c388a3b32c49783e0bfb4e8fd5845a475 by Harald Sitter. Committed on 21/11/2024 at 11:46. Pushed by sitter into branch 'master'. sftp: close connection on fatal errors might require future refactoring to route more errors through reportError to cover all cases but looking through the code the most relevant points already do so while most other errors are of an recoverable nature M +17 -1 sftp/kio_sftp.cpp https://invent.kde.org/network/kio-extras/-/commit/9d624e7c388a3b32c49783e0bfb4e8fd5845a475
Git commit f2496118fedb81d25e527bfa60fc7501f4209c7b by Harald Sitter. Committed on 21/11/2024 at 11:56. Pushed by sitter into branch 'release/24.12'. sftp: close connection on fatal errors might require future refactoring to route more errors through reportError to cover all cases but looking through the code the most relevant points already do so while most other errors are of an recoverable nature (cherry picked from commit 9d624e7c388a3b32c49783e0bfb4e8fd5845a475) Co-authored-by: Harald Sitter <sitter@kde.org> M +17 -1 sftp/kio_sftp.cpp https://invent.kde.org/network/kio-extras/-/commit/f2496118fedb81d25e527bfa60fc7501f4209c7b