Bug 394600 - [KIO / sftp] copy to remote server with full disk fails silently
Summary: [KIO / sftp] copy to remote server with full disk fails silently
Status: RESOLVED FIXED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: SFTP (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-23 08:45 UTC by Lukáš Karas
Modified: 2020-03-04 16:39 UTC (History)
3 users (show)

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


Attachments
reporting kio bugs are disabled?! (28.56 KB, image/png)
2018-05-23 08:45 UTC, Lukáš Karas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukáš Karas 2018-05-23 08:45:18 UTC
Created attachment 112824 [details]
reporting kio bugs are disabled?!

First, sorry that I am reporting KIO bug to Dolphin, but there is no possibility to create bug report for KIO directly. Why?!

And now the bug: when I copy files to remote machine using sftp protocol (sftp kio) and remove machine has full disk, there is no error reported to user, but files are not copied...

From shell, it is visible that copy was not successful: 

```
scp file root@remote:/home/user/

...
kio_sftp(23014) sftpProtocol::sftpPut: Error during 'put'. Aborting.
...
kio_sftp(23014)/kio (kioslave) KIO::SlaveBase::dispatchLoop: slave was killed, returning
```

When I am using scp command, I get usable error message:

```
scp file root@remote:/home/user                                                                                                                                                                                                                                                                                                scp: /home/user//file: No space left on device
```

I am using KDE from Kubuntu 18.04 packages:
```
$ kioclient --version
Qt: 4.8.7
KDE Development Platform: 4.14.38
KIO Client: 2.0
```
Comment 1 Kai Uwe Broulik 2018-05-23 09:06:02 UTC
The category is frameworks-kio, "Kio" is the old KDE 4.x one :) sftp is in kio-extras, though, re-assigning
Comment 2 Kai Uwe Broulik 2018-05-23 09:06:28 UTC
Oh, you *are* on 4.x, umm, but I doubt this changed a lot in 5 s I assume this is till valid
Comment 3 Lukáš Karas 2018-05-24 05:32:02 UTC
Ups. You are correct, i was using kioclient from KDE4 in console, sorry. I mixed kioclient and scp commands in original post moreover...

Anyway, the same problem exists with kio 5:

cd /tmp/
mkdir ramdisk
sudo mount -t tmpfs - ramdisk -o size=1M
dd if=/dev/urandom of=bigfile bs=1M count=2

kioclient5 cp bigfile sftp://localhost/tmp/ramdisk

...
kf5.kio.core.copyjob: emit processedSize 1044480
kf5.kio.core.copyjob: d->state= 6
kf5.kio.core.copyjob: 0 files remaining
kf5.kio.core.copyjob: 
kf5.kio.core.copyjob: copyNextFile finished
kf5.kio.core.copyjob: KDirNotify'ing FilesAdded QUrl("sftp://localhost/tmp/ramdisk"

echo $?
0

ls -alh ramdisk/* bigfile 
-rw-rw-r-- 1 karry karry 2.0M May 24 07:19 bigfile
-rw-rw-r-- 1 karry karry 1.0M May 24 07:23 ramdisk/bigfile.part

kioclient5 --version
kioclient 5.12.4
Comment 4 Harald Sitter 2020-03-04 16:39:10 UTC
This should be fixed for the 20.04 release with more explicit error handling introduced via https://phabricator.kde.org/D27153
That is to say: cannot reproduce on git master but can reproduce with the 19.12 release. I suspect the error was originally forgotten to be passed along somewhere.

There's also bug #418443 which is kinda related as the UX for out-of-space is a bit garbage.