KIO sftp high CPU usage after being left idle (endless loop?)

Bug #1764311 reported by Macros (Roger Rösch)
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Arch Linux
New
Undecided
Unassigned
kde-runtime (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Dolphin was left open overnight being connected via sftp://user@host:port/folder/path.
(Two targets, one continuously reachable under host:port, one went offline during the night)
Returning to the PC I found 4 sftp.so processes consuming 50% of a CPU core each.
They continued to do so after the folders in Dolphin were closed, and even after Dolphin itself was closed.
They responded to SIGTERM.

This is strace output from 1 of the processes, the same which apport was used on:

ppoll([{fd=4, events=POLLIN}], 1, {tv_sec=0, tv_nsec=1000000}, NULL, 8) = 0 (Timeout)
write(3, "\1\0\0\0\0\0\0\0", 8) = 8
ppoll([{fd=4, events=POLLIN}], 1, {tv_sec=0, tv_nsec=1000000}, NULL, 8) = 0 (Timeout)
write(3, "\1\0\0\0\0\0\0\0", 8) = 8
ppoll([{fd=4, events=POLLIN}], 1, {tv_sec=0, tv_nsec=1000000}, NULL, 8) = 0 (Timeout)
write(3, "\1\0\0\0\0\0\0\0", 8) = 8
ppoll([{fd=4, events=POLLIN}], 1, {tv_sec=0, tv_nsec=1000000}, NULL, 8) = 0 (Timeout)
write(3, "\1\0\0\0\0\0\0\0", 8) = 8
ppoll([{fd=4, events=POLLIN}], 1, {tv_sec=0, tv_nsec=1000000}, NULL, 8) = 0 (Timeout)
write(3, "\1\0\0\0\0\0\0\0", 8) = 8
(continues to repeat, seems like its stuck in a loop)

Kubuntu 18.04 Beta 2, kde-runtime (4:17.08.3-0ubuntu1)

What I expected to happen:
No high CPU usage, maybe no sftp.so process at all as the connection was idle.

What happened instead:
4 sftp.so processes using 200% CPU of my quad core, consuming energy and shortening the lifespan of my system.

Feel free to contact me with questions, I can try to reproduce the problem.
Also I will leave one of the processes suspended for 1-3 days after filing this report, so I can send a SIGCONT and give further information on it if requested.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: kde-runtime 4:17.08.3-0ubuntu1
ProcVersionSignature: Ubuntu 4.15.0-13.14-generic 4.15.10
Uname: Linux 4.15.0-13-generic x86_64
ApportVersion: 2.20.9-0ubuntu4
Architecture: amd64
Date: Mon Apr 16 09:54:24 2018
ExecutablePath: /usr/bin/kdeinit5
ProcEnviron:

SourcePackage: kde-runtime
UpgradeStatus: Upgraded to bionic on 2018-04-10 (5 days ago)

Revision history for this message
Macros (Roger Rösch) (macros.) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in kde-runtime (Ubuntu):
status: New → Confirmed
Revision history for this message
Brian G. (gissf1) wrote :

I'm using KDE on Arch Linux, but I'm also experiencing the exact same situation, and have been for months. I tend to leave my systems running 24/7 and often notice one or more sftp.so processes in top taking up significant CPU resources. I did notice the CPU usage is worse when my Dolphin sftp sessions are unable to connect to their target host (I use a VPN to connect to some of the hosts, which I don't leave running all the time, while the respective Dolphin window remains open). Often CPU usage is reduced (although still not 0) once I reactivate the VPN.

Revision history for this message
Brian G. (gissf1) wrote :

I should also mention that I tend to kill the sftp.so processes with signal 15 when they act up, and they seem to eventually respawn on their own, but I'm not sure whether that is by system restart or something else (I haven't tracked it in that much detail).

Revision history for this message
Juan Luis García Zapata (jgzapata) wrote :

Same problem: Dolphin sftp session open 12 hours (in a laptop, suspending between worktimes). I end with several sftp.so processes with high CPU use.

A workaround is to use fish protocol in the Dolphin tab.

description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.