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

Jeremy Allison jra at samba.org
Fri May 8 04:07:11 UTC 2020


On Thu, May 07, 2020 at 02:30:02PM -0700, Jeremy Allison wrote:
> On Wed, May 06, 2020 at 03:53:26PM +0530, Anoop C S via samba-technical wrote:
> > > 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 :-/
> 
> Anoop,
> 
> I'm working on a fix for the vfs_io_uring module
> to retry short reads/writes.
> 
> Do you still have your test environment so
> you can test what I come up with ? I don't
> have a reproducer here at home so I'll be
> dependent on you to see if the fix works.

Anoop, here is a *MASSIVELY* prototype fix
for the io_uring short read problem. It still
is very ugly and contain extra debugs etc.

It works for me here if I enable the JRATEST
code that forces short reads if read_len > 4096,
but I never was able to reproduce the Windows
issue (my kernel isn't modern enough).

Can you test it on your Windows environment
and see if it fixes the SHA256 checksum problem
after copying 100 test files ?

If so I'll fix it up to be production-ready,
(for example I think I can get rid of the
immediate event useage) fix the pwrite case
and then cut it onto bite-sized reviewable chunks.

Cheers,

Jeremy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-WIP-io_uring-short-read-fix.patch
Type: text/x-diff
Size: 8780 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20200507/30350292/0001-WIP-io_uring-short-read-fix.diff>


More information about the samba-technical mailing list