Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 891961 - kde-frameworks/kio-5.99.0 Copy from local to WebDAV creates corrupted files with no error
Summary: kde-frameworks/kio-5.99.0 Copy from local to WebDAV creates corrupted files w...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Stabilization (show other bugs)
Hardware: AMD64 Linux
: Normal critical
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords: CC-ARCHES
Depends on:
Blocks:
 
Reported: 2023-01-24 18:32 UTC by Henryk Rychlik
Modified: 2023-01-25 22:29 UTC (History)
2 users (show)

See Also:
Package list:
kde-frameworks/kio-5.99.0-r1
Runtime testing required: ---
nattka: sanity-check+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henryk Rychlik 2023-01-24 18:32:01 UTC
Hello,

Seems the currently stable version of kio in the portage tree[5.99.0] has a bug that affects copying from local to a WebDAV server.
As a result in Dolphin or Krusader(davfs2 mounts work fine) copying or moving results in irreparable data loss with no error reported.

Steps to reproduce:
 - kio v5.99.0
 - dolphin
 - seafile or photoprism with webdav support
 - connect a network share via WebDAV
 - copy anything from local(dav copy works fine)
 - no errors will be reported but the content of the copied file gets replaced with the following:
<?xml version="1.0" encoding="utf-8" ?><D:propfind xmlns:D="DAV:"><D:prop><D:creationdate/><D:getcontentlength/><D:displayname/><D:resourcetype/></D:prop></D:propfind>

I lost 3k pictures because of it, simply trusted the copy mechanism when moving pictures to WebDAV that follows backup best-practices. As a result, a week later, I'm still going through a massive amount of recovered files from 1TB+ array.

Updating KDE framework and KDE to ~amd64 fixes the issue therefore stable seems bretty much broken IMO and should be updated ASAP or kio masked with a bug note?

Used the following to achieve that:
  GNU nano 6.4                                                                         /etc/portage/package.accept_keywords/kio                                                                                    
kde-*/* ~amd64
app-office/kalendar ~amd64
net-irc/konversation ~amd64
net-misc/kio-zeroconf ~amd64
net-libs/libktorrent ~amd64
net-p2p/ktorrent ~amd64
Comment 1 Henryk Rychlik 2023-01-24 18:34:28 UTC
Related:
https://bugs.kde.org/show_bug.cgi?id=464664
Comment 2 Andreas Sturmlechner gentoo-dev 2023-01-24 19:00:59 UTC
Did you reproduce this error on another occasion some time after the failed copying attempt?
Comment 3 Andreas Sturmlechner gentoo-dev 2023-01-24 19:05:01 UTC
Meanwhile KF-5.102 is pending stabilisation already but has not been in ::gentoo for long enough yet.

Before I rush to stabilise a newer Frameworks to trade one bug for potentially multiple others, I'll need more information on that.

I could not find a commit fixing such a grave bug in KIO nor was there anything to find on kde.org mailing lists that would recommend backporting such bug. There are no downstream modifications to KIO either.
Comment 4 Henryk Rychlik 2023-01-24 20:08:41 UTC
(In reply to Andreas Sturmlechner from comment #2)
> Did you reproduce this error on another occasion some time after the failed
> copying attempt?

Yes, I did. Tried with Seafile, PhotoPrism via WebDAV. Tried restarting, rebuilding kio, kio-extras, dolphin, no change.
Problems started after an update from 5.90.0:
1649205255:  ::: completed emerge (281 of 353) kde-frameworks/kio-5.90.0 to /
1672270563:  >>> emerge (31 of 104) kde-frameworks/kio-5.99.0 to /

Completely different machine that is up to date behaves exactly the same.
Comment 6 Andreas Sturmlechner gentoo-dev 2023-01-25 09:16:56 UTC
Confirmed by the upstream commit author, thx.
Comment 7 Larry the Git Cow gentoo-dev 2023-01-25 10:22:48 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=176e58440a7ad690443610338884bfb5a0046e0f

commit 176e58440a7ad690443610338884bfb5a0046e0f
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2023-01-25 10:07:58 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2023-01-25 10:18:58 +0000

    kde-frameworks/kio: Fix WebDAV file loss
    
    Bug: https://bugs.gentoo.org/891961
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 .../kio/files/kio-5.99.0-fix-webdav-fileloss.patch | 26 +++++++
 kde-frameworks/kio/kio-5.99.0-r1.ebuild            | 91 ++++++++++++++++++++++
 2 files changed, 117 insertions(+)
Comment 8 Andreas Sturmlechner gentoo-dev 2023-01-25 10:31:21 UTC
Now that we know the exact fix we can backport and fast-stabilise.
Comment 9 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2023-01-25 19:16:08 UTC
amd64 done
Comment 10 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2023-01-25 19:16:10 UTC
x86 done
Comment 11 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2023-01-25 19:16:11 UTC
arm64 done

all arches done
Comment 12 Larry the Git Cow gentoo-dev 2023-01-25 19:18:00 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28fbcac8838d04e186f79ac9da0a3fab32f65a5f

commit 28fbcac8838d04e186f79ac9da0a3fab32f65a5f
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2023-01-25 19:17:27 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2023-01-25 19:17:53 +0000

    kde-frameworks/kio: drop 5.99.0
    
    Bug: https://bugs.gentoo.org/891961
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 kde-frameworks/kio/kio-5.99.0.ebuild | 89 ------------------------------------
 1 file changed, 89 deletions(-)
Comment 13 Henryk Rychlik 2023-01-25 22:29:29 UTC
Just updated and it seems it has helped on both machines that were affected. Both the one I updated to ~amd64(and now downgraded) and stable one.