Red Hat Bugzilla – Bug 1311395
CIFS reads beyond end of file if 131072 is used as block size
Last modified: 2016-10-10 20:43:23 EDT
Description of problem:
When trying to copy a file from mounted network filesystem folder into a folder on the local disk the copying process doesn't stop.
Version-Release number of selected component (if applicable):
cp from coreutils-8.24-6.fc23.x86_64
Steps to Reproduce:
1. mount -t cifs //archive/data /mnt/archive
2. cd /mnt/archive
3. cp krx.dump.bz2 ~ (or any file in this folder)
Having a file in home called krx.dump.bz2 which grows in size without an end.
And cp which doesn't terminate.
A file called krx.dump.bz2 in ~ which is 586K and not >1GB and bigger.
dd if=krx.dump.bz2 of=/home/foo/krx.dump.bz2 is working and is copying the file properly.
Sorry for replying late to this bug report! Is the issue still reproducible? Could you please attach gzipped output of strace for both cp and dd?
Indeed I cannot reproduce it anymore now, may be due to certain changes in the past few months. Let me close this issue then.
It must have been something in the file system implementation. Glad to see this fixed. Thanks for the confirmation!
I am having this same issue copying files from/within an SMB share.
dd works, cp doesn't finish
$ rpm -q coreutils
Created attachment 1171395 [details]
Compressed output of "strace cp file1 file2 2> out"
Created attachment 1171396 [details]
Compressed output of "strace dd if=file1 of=file2 2> out"
Thank you for providing the requested info!
Could you please try to append bs=131072 to dd command line?
With bs=131072 I get the same results as with cp. bs=131071 and lower is fine.
Created attachment 1171569 [details]
dd with bs=131071
Created attachment 1171570 [details]
dd with bs=131072
Then it looks like a file system bug triggered by reading blocks of size 2^17, which cp seems to do by default. I am switching the component to kernel, where the file system is implemented...
*********** MASS BUG UPDATE **************
We apologize for the inconvenience. There is a large number of bugs to go through and several of them have gone stale. Due to this, we are doing a mass bug update across all of the Fedora 23 kernel bugs.
Fedora 23 has now been rebased to 4.7.4-100.fc23. Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.
If you have moved on to Fedora 24 or 25, and are still experiencing this issue, please change the version to Fedora 24 or 25.
If you experience different issues, please open a new bug report for those.