Data Corruption bug with Samba's vfs_iouring and Linux 5.6.7/5.7rc3

Anoop C S anoopcs at
Wed May 6 10:23:26 UTC 2020

On Tue, 2020-05-05 at 10:48 -0700, Jeremy Allison via samba-technical
> On Tue, May 05, 2020 at 11:39:14AM -0600, Jens Axboe wrote:
> > > I'll try and see if I can get an arch binary build that has the
> > > vfs_io_uring module and reproduce.
> > 
> > Got that done, and I can now mount it on Linux. Been trying pretty
> > hard to trigger any corruptions on reads, but it works for me.
> > Checked
> > that we see short reads, and we do, and that it handles it just
> > fine.
> > So pretty blank right now on what this could be.
> > 
> > FWIW, I'm mounting on Linux as:
> > 
> > # mount -t cifs -o ro,guest //arch/data /smb
> The reporter claims this only happens with
> a Windows client, as the Linux and Samba libsmb
> clients don't pipeline the reads in the same
> way for multiple files the same way that Windows
> does.
> Here is the bug report with all the details I've
> managed to get out of the original reporter:
> I also can't reproduce the data corruption, even
> from a Windows client although I've only tried
> so far on my home Ubuntu 19.04 kernel 5.3.0-51-generic #44-Ubuntu SMP
> box.
> I tried running 2 powershell processes on the
> Windows client and doing a copy in both of them
> to ensure we are opening multiple files simultaneously
> and going through the io_uring module (which I
> saw happening by adding debug statements) but
> I never see corruption.
> I'm planning to try running against a Fedora32
> VM next, as that's case the reporter claims will
> reproduce the issue.

I could reproduce the difference in SHA256 checksum after copying a
directory with 100 copies of test file(provided by reporter) from
io_uring VFS module enabled share using Windows explorer(right-click-
>copy/paste). Only 5 out of 100 files had correct checksum after copy
operation :-/

Issue is *NOT* seen with `Copy-Item` powershell command or with
`smbclient` utility using "mget".

Whereas copy from a share without io_uring VFS module didn't show any
SHA256 checksum difference using Windows explorer or `Copy-Item`
powershell command or `smbclient` utility.

Following is my configuration:
OS: Fedora 32
Kernel: 5.6.8
Samba: master
liburing: 0.5
Client: Win 10, build 1909
# Global parameters
	clustering = Yes
	load printers = No
	log file = /usr/local/var/log/samba/log.%I
	netbios name = SMB-CLUSTER
	security = USER
	server string = Samba Server
	idmap config * : backend = tdb

	comment = For samba share of local ext4
	path = /mnt/ext4/

	comment = For samba share of local ext4
	path = /mnt/ext4/
	vfs objects = io_uring

-Anoop C S

More information about the samba-technical mailing list