Bug 334776

Summary: CIFS mount - Dolphin complains disk is full
Product: [Unmaintained] kio Reporter: bugs5.kde.org
Component: generalAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: normal CC: arthur, buddlespit, bugs, cfeck, ferry.toth, frank78ac, igilama, ilabor, iq2luc, johu, mail, nerd65536+kde, only4com, rdieter, scarpino, sergeidanilov, sqn14, stupor_scurvy343, wbauer1, yofel, zanetu
Priority: NOR    
Version: 4.13.1   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 4.13.2
Sentry Crash Report:

Description bugs5.kde.org 2014-05-14 17:24:39 UTC
I had updates this morning and using now Dolphin 4.13.1 and now when I mount CIFS mounts and try to copy files onto it, it says disk is full. Even after I delete files (this works), I can't add new files.

However when I just cp from the command line in Konsole I can write to it without issues.


//SERVER/Shows       1.8T 1020G  718G  59% /media/Shows



Reproducible: Always
Comment 1 Frank Reininghaus 2014-05-15 07:05:34 UTC
Thanks for the bug report. Copying files and reporting errors is done by the KIO library, so I'll reassign your report there.
Comment 2 Frank Reininghaus 2014-05-15 14:48:20 UTC
*** Bug 334821 has been marked as a duplicate of this bug. ***
Comment 3 Ferry 2014-05-15 15:23:44 UTC
In that case I would like to repeat from 334821 the following:
----
In the status bar dolphin shows unknown size. 
Creating/copying a file in a dir of the cifs mount fails with (translated from nl): 
Can not write to . 
The disk is full

However, saving from inside kate there is no problem.
Also saving using the smb kioslave to the same samba share save works (but the status bar still shows unknown disk size).
KDiskfree shows the mounted disk is 3.6TiB and has 3.3TiB free.
Konqueror fails in the same way as Dolphin.
---

If kio is the problem, then I'm surprised that Kate can save and KDiskfree reports the correct disk use. OTOH it explains why Konqueror will *not* save.

I would like to set importance to Major as this bug causes Dolphin/Konqueror to be unable to copy files around on a cifs share - which probably counts as a major feature of the application.
Comment 4 bugs5.kde.org 2014-05-15 15:28:33 UTC
At work I could mount cifs fine and there were no problems. At home still doesn't work - says unknown size.

Both samba servers are Debian Wheezy installs with pretty much the same configuration.


"Homeserver"

[global]
    ; General server settings
    netbios name = servi
    server string =
    workgroup = WORKGROUP
    announce version = 5.0
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192

    hosts allow = 10.0.0. 10.8. localhost
    hosts deny = 0.0.0.0/0

    passdb backend = tdbsam
    security = user
    null passwords = true
    username map = /etc/samba/smbusers
    name resolve order = hosts wins bcast

    wins support = yes

    printing = CUPS
    printcap name = CUPS

    syslog = 1
    syslog only = yes






"Workserver"

[global]
    ; General server settings
    hosts allow = ::ffff:192.168.1. ::ffff:192.168.0. 192.168.0. 198.168.1. 10.8.0. 10.8.1. localhost
    hosts deny = 0.0.0.0/0
    netbios name = DATEN
    server string =
    workgroup = ARBEITSGRUPPE
    announce version = 5.0
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE
    unix extensions = no
    large readwrite = no

    passdb backend = tdbsam
    security = user
    null passwords = true
    username map = /etc/samba/sambausers
    name resolve order = hosts wins bcast

    wins support = yes

    printing = CUPS
    printcap name = CUPS

    syslog = 1
    syslog only = yes
Comment 5 Frank Reininghaus 2014-05-15 15:37:48 UTC
(In reply to comment #3)
> If kio is the problem, then I'm surprised that Kate can save and KDiskfree
> reports the correct disk use. OTOH it explains why Konqueror will *not* save.

Actually, a lot of Dolphin's code is shared with the filemanagement part of Konqueror, so many bugs in the Dolphin application will affect Konqueror in exactly the same way. However, none of this code is related to low-level stuff like creating/copying files and calculating the free size, so I don't think that the problem is in Dolphin.

BTW, do you know what the last working version was? This info might help to find out what caused the regression.

You say that creating files with Kate works fine - what about the FolderView plasmoid? You can also paste files or select "Create New..." from the context menu there. I would assume that this fails as well if you set the URL to a directory which is mounted with CIFS?
Comment 6 Ferry 2014-05-15 15:44:46 UTC
Last working version was 4.13.0 from Ubuntu Trusty. Now I am on 4.13.1 from Ubuntu Updates ppa.

Folder View plasmoid: same problem as Dolphin (disk full error on file create).
Comment 7 Martin van Es 2014-05-15 19:27:04 UTC
I'm looking at the exact same problem. I mount the CIFS mountpoint as guest (sec=none, noperm). I too had no problems until the update to 4.13.1. Copying files to the mountpoint in terminal works like a charm, disk is not full. Only Dolphin complains.
Comment 8 bugs5.kde.org 2014-05-15 20:23:41 UTC
as said, you can still delete files but not copy or create new ones onto the shares. Worked fine with 4.13.0
Comment 9 Ferry 2014-05-16 07:45:27 UTC
Tried Krusader:
Adding files gives the same error as Dolphin (disk full) on cifs mounted directory.
Bar showing disk space shows Mt. Man: busy....
Comment 10 Buddlespit 2014-05-18 03:26:01 UTC
I'm also having this same issue. If I mount my shares via fstab and open Dolphin and navigate to the mount points in "Devices" (Places pane), I get a "Disk Full" error but can navigate my shares. But if I navigate to my shares via the Network "Places" (also in the Places pane) in Dolphin, I don't get the error. And yes, this only occurred with the update to 4.13.1

Arch Linux, kernel 3.14.4-1, KDE 4.13.1
Comment 11 Ferry 2014-05-18 15:53:37 UTC
@Buddlespit: yes, that is exactly what I have.

I guess that using the cifs mount, the file kio is used and when going to the Network places (the url would be smb:/server/share when you display that) the smb kio.

However, I'm using the file kio for a good reason: it shows the ACl's while the samba kio doesn't.

This bug really is a pain, as it break all KDE file managers that I tried: Dolphin, Konqueror, Folder View plasmoid, Krusader).

 If you would search on all (resolved/confirmed/unconfirmed) bugs reported against 4.13.1 today, you will find 4 of 6 relating to this same bug (334821, 334761, 334776, 334988). I would say they are all duplicates, but don't know how to set that.
Comment 12 Frank Reininghaus 2014-05-19 11:52:52 UTC
I've had a look at the commits between 4.13.0 and 4.13.1 in kdelibs, kde-runtime and kde-baseapps, but I don't see anything that looks like it could cause such a problem (I'm not extremly familiar with anything related to CIFS though, so I might have overlooked something).

Anyway, this makes me wonder: is there really a regression in anything that is shipped with KDE SC 4.13.1, or is the bug somewhere else in the stack? I see that at least one reporter mentioned that they use smb4k, and this application has recently seen a new release according to its website. It seems plausible that the updates of the KDE SC and smb4k packages might have reached user systems at the same time.

Is anyone who does *not* use smb4k see this bug? Can anyone try to downgrade either their KDE SC or smb4k versions and see if that fixes the problem?
Comment 13 Frank Reininghaus 2014-05-19 11:54:29 UTC
*** Bug 334761 has been marked as a duplicate of this bug. ***
Comment 14 Frank Reininghaus 2014-05-19 11:56:02 UTC
*** Bug 334988 has been marked as a duplicate of this bug. ***
Comment 15 Frank Reininghaus 2014-05-19 11:58:05 UTC
(In reply to comment #11)
>  If you would search on all (resolved/confirmed/unconfirmed) bugs reported
> against 4.13.1 today, you will find 4 of 6 relating to this same bug
> (334821, 334761, 334776, 334988). I would say they are all duplicates, but
> don't know how to set that.

OK, thanks, I've marked the duplicates now (BTW, you can prepend bug numbers with the word 'bug', and Bugzilla will automatically create a link).

The reporter of bug 334988 found a commit that looks like it causes the problem:

https://projects.kde.org/projects/kde/kdelibs/repository/revisions/6246e99b43f3d1a9e15d563fbb5e173ed50ba5e5
Comment 16 Martin van Es 2014-05-19 12:03:39 UTC
I'm *not* using smb4k and seeing the reported problems nevertheless.
Comment 17 Frank Reininghaus 2014-05-19 12:07:50 UTC
(In reply to comment #16)
> I'm *not* using smb4k and seeing the reported problems nevertheless.

Thanks, but comment 15 should have made clear that the cause of the problem has been identified already. It is a commit in kdelibs.
Comment 18 Ferry 2014-05-19 12:59:27 UTC
Looks like the above commit wants to skip stat on autofs mount points, but instead skips *all* mount points.

Any chance the Kubuntu Update ppa will rebuild the module with the commit removed?
Comment 19 Frank Reininghaus 2014-05-19 13:24:48 UTC
(In reply to comment #18)
> Any chance the Kubuntu Update ppa will rebuild the module with the commit
> removed?

Please ask the people who are responsible for this Kubuntu PPA about that - probably they do not follow every single KDE bug report.

I have proposed to revert the commit for kdelibs 4.13.2.
Comment 20 Ferry 2014-05-19 13:28:18 UTC
Quick fix (works for me) that doesn't involve purging the ppa:
downloaded the package from http://packages.ubuntu.com/trusty/libkio5
extract 2 files /usr/lib/libkio*
mv the 2 files to /usrlib (this overwrites the link libkio.so.5)
Comment 21 Ferry 2014-05-19 19:46:02 UTC
Eh, that would be: mv the 2 files to /usr/lib
Comment 22 Luc 2014-05-19 23:48:46 UTC
*** This bug has been confirmed by popular vote. ***
Comment 23 bugs5.kde.org 2014-05-20 04:01:28 UTC
Ferry's fix in #20 works.
Comment 24 Philip Muškovac 2014-05-20 08:14:46 UTC
FYI (before anyone asks again): 
kde4libs 4:4.13.1-0ubuntu0.1~ubuntu14.04~ppa2 in the Kubuntu Updates PPA reverts 6246e99b43f3d1a9e15d563fbb5e173ed50ba5e5
Comment 25 Ferry 2014-05-20 10:37:16 UTC
Thank you Philip, just installed it and is working for me (I have no automount fs).
Comment 26 rawi 2014-05-20 12:08:05 UTC
Awesome! Thank you folks! It's working again!
And big thanks to yofel, ho understood my babbling on IRC a few days ago and filled firstly 334761 for me!
Comment 27 Sergei Danilov 2014-05-20 20:46:13 UTC
Solution from #20 works for me as well.
Just in a case there is a link http://www.mediafire.com/download/q1t54zl3wcrz0w2/kio-4.13.0.tar.bz2
with working libkio libs compiled for Gentoo AMD64
Comment 28 Emmanuel Pescosta 2014-05-22 14:23:46 UTC
*** Bug 335192 has been marked as a duplicate of this bug. ***
Comment 29 Tomas Trnka 2014-05-25 14:23:03 UTC
Git commit 9a8426ae2ed35ac900b89a623618fc158d24ee6a by Tomáš Trnka.
Committed on 25/05/2014 at 14:12.
Pushed by ttrnka into branch 'KDE/4.13'.

Revert "Avoid unnecessary automounting in KDiskFreeSpaceInfo::freeSpaceInfo"

This reverts commit 6246e99b43f3d1a9e15d563fbb5e173ed50ba5e5.

It breaks KIO on CIFS mounts as the check for automounts copied over
from frameworks/kfileitem.cpp isDirectoryMounted() apparently matches
CIFS as well (and for some weird reason KIO checks for available space
before trying to copy files).

We'll probably have to return to v1 of the abovementioned commit, i.e.
checking for "autofs" explicitly. However, more testing is apparently
necessary to avoid further nasty surprises.

REVIEW: 117044
FIXED-IN: 4.13.2

M  +0    -10   kio/kfile/kdiskfreespaceinfo.cpp

http://commits.kde.org/kdelibs/9a8426ae2ed35ac900b89a623618fc158d24ee6a
Comment 30 Igilama 2016-01-13 15:00:52 UTC
I'm getting the same error in Dolphin for sshfs mounted directory (through Gigolo)

Version 15.08.2

Using:
KDE Frameworks 5.15.0
Qt 5.4.2 (built against 5.4.2)
The xcb windowing system
Comment 31 Igilama 2016-01-13 15:23:01 UTC
I've created another report for this new variant with sshfs, bug 357930