Bug 501118 - Copy a large file causes corruption to a network share
Summary: Copy a large file causes corruption to a network share
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: general (other bugs)
Version First Reported In: 24.12.2
Platform: Manjaro Linux
: NOR grave
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-05 20:47 UTC by Kevin Dackiw
Modified: 2025-05-15 20:52 UTC (History)
2 users (show)

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


Attachments
attachment-1128998-0.html (2.77 KB, text/html)
2025-05-04 16:21 UTC, Kevin Dackiw
Details
attachment-2592318-0.html (2.12 KB, text/html)
2025-05-15 20:52 UTC, Kevin Dackiw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Dackiw 2025-03-05 20:47:07 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY
Large file copies corrupt the target copy.

STEPS TO REPRODUCE
1.  Copy a large (in my case a 10G file) to a fstab mounted CIFS share
2.  Check integrity of copied file.  A CRC comparision or archive with a check will show a failed copy.
3.  Note that this does not happen with Krusader, PCManFM, or even a 'cp' between the two paths.

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Kevin Dackiw 2025-03-05 21:10:23 UTC
Tested with NFS and no corruption.  Dolphin through a KIO slave is ok too.  I've noticed that the copy through a CIFS mount via fstab is buffering almost the whole copy into RAM then pushing it through.  Perhaps some kind of background memory issue with that route.

Checked RAM sticks and tested.  Swapped RAM too.  It's only that copy path.  I can use KIO for a bit until things settle with other parts and discuss over at the discuss area :-)
Comment 2 Jens 2025-05-03 19:35:45 UTC
I can second this, and here is another report: 
https://superuser.com/questions/1814677/files-are-corrupt-after-copying-streaming-them-from-samba-fileshare

Copying using cp, rsync or any other tool on a SMB mount works. Copying via Dolphin will corrupt the file.

Workaround: add "cache=none" to the SMB server's mount options so that the file copy process is not cached.
Then, also Dolphin can copy the file without errors. And as an additional bonus the copying speed doesn't oscillate so much any more.

This is not a fix however. And I think this is quite a serious issue.
How can we help finding the root cause of this?
Comment 3 Kevin Dackiw 2025-05-04 16:21:59 UTC
Created attachment 180928 [details]
attachment-1128998-0.html

I can confirm the addition of cache=none stops the big cache load/flush 
cycle and indeed keeps things steady with the copy.
The target copy did verify correctly.

This was to my file server with SMB multichannel disabled.

Update:  server set to SMB multichannel also is working, and same speed 
as expected.

I tried this before about two months ago and cache=none had no effect, 
so something changed in the meantime :-).  I agree that this seems to be 
a workaround however.

I'm still not 100% sold that it is rock solid and I have been using NFS.
In the meantime, I will go with this being a KDE issue.  How can I help 
to further find the cause of this?

TY!

Kev.

On May 3, 2025 1:35 PM, Jens wrote:
> https://bugs.kde.org/show_bug.cgi?id=501118
>
> Jens<jens-bugs.kde.org@spamfreemail.de> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |jens-bugs.kde.org@spamfreem
>                     |                            |ail.de
>
> --- Comment #2 from Jens<jens-bugs.kde.org@spamfreemail.de> ---
> I can second this, and here is another report:
> https://superuser.com/questions/1814677/files-are-corrupt-after-copying-streaming-them-from-samba-fileshare
>
> Copying using cp, rsync or any other tool on a SMB mount works. Copying via
> Dolphin will corrupt the file.
>
> Workaround: add "cache=none" to the SMB server's mount options so that the file
> copy process is not cached.
> Then, also Dolphin can copy the file without errors. And as an additional bonus
> the copying speed doesn't oscillate so much any more.
>
> This is not a fix however. And I think this is quite a serious issue.
> How can we help finding the root cause of this?
>
Comment 4 Kevin Dackiw 2025-05-15 20:52:07 UTC
Created attachment 181354 [details]
attachment-2592318-0.html

 I can confirm the addition of cache=none stops the big cache load/flush
cycle and indeed keeps things steady with the copy.
The target copy did verify correctly.

This was to my file server with SMB multichannel disabled.

On May 3, 2025 1:35 PM, Jens wrote:

https://bugs.kde.org/show_bug.cgi?id=501118

Jens <jens-bugs.kde.org@spamfreemail.de>
<jens-bugs.kde.org@spamfreemail.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jens-bugs.kde.org@spamfreem
                   |                            |ail.de

--- Comment #2 from Jens <jens-bugs.kde.org@spamfreemail.de>
<jens-bugs.kde.org@spamfreemail.de> ---
I can second this, and here is another report:
https://superuser.com/questions/1814677/files-are-corrupt-after-copying-streaming-them-from-samba-fileshare

Copying using cp, rsync or any other tool on a SMB mount works. Copying via
Dolphin will corrupt the file.

Workaround: add "cache=none" to the SMB server's mount options so that the file
copy process is not cached.
Then, also Dolphin can copy the file without errors. And as an additional bonus
the copying speed doesn't oscillate so much any more.

This is not a fix however. And I think this is quite a serious issue.
How can we help finding the root cause of this?