AIO, SMB2 and Samba 3.6

Andrew Bartlett abartlet at samba.org
Tue Feb 21 21:56:52 MST 2012


On Tue, 2012-02-21 at 08:20 +0100, Volker Lendecke wrote:
> On Tue, Feb 21, 2012 at 05:42:28PM +1100, Andrew Bartlett wrote:
> > On Mon, 2012-02-20 at 10:35 +0100, Christian Ambach wrote:
> > > Hi Andrew,
> > > 
> > > On 02/20/2012 03:14 AM, Andrew Bartlett wrote:
> > > > I have this report that AIO and SMB2 don't work in Samba 3.6.3.  (Win2k8
> > > > creates empty files).
> > > 
> > > Would be nice to know with which aio settings and which aio module this 
> > > happens.
> > 
> > With:
> >  aio read size = 1
> >  aio write size = 1
> > 
> > As far as I can tell, this is with the default AIO backend on Linux
> > (there are no additional AIO patches, just --with-aio-support). 
> > 
> > I have network captures (the success case is too large to post to the
> > list), but essentially the SMB2 write request is never answered, and
> > eventually (1 min after the last send write) the connection is dropped. 
> > 
> > The transfer was from a Samba4 server to a Samba 3.6.3 NAS, via a
> > Windows 2008R2 VM. 
> > 
> > This all works when AIO is disabled on Samba 3.6.3.
> > 
> > Naturally, I'll keep digging into this, but any clues you can provide
> > would be most appreciated. 
> 
> A debug level 10 log of smbd and the network captures might
> give a hint about what is going on.

I've now reproduced this on the NAS with a level 10 log, using
smbclient4 from master:

bin/smbclient //192.168.1.167/media -Uuser%password
smb: \> put /data/kvm/cdroms/FreeBSD-8.2-RELEASE-amd64-bootonly.iso
freebsd7.iso
Error writing file: socket_error

It seems to me that the underlying AIO layer isn't returning promptly or
correctly.  It appears that after the socket error, smbclient still
tries to close the file, and this then triggers finally an AIO error. 

A 16k zero-filled file (freebsd7.iso) is left on disk, which makes
'access denied' an unlikely error.

Importantly, on my Fedora 16 Desktop, this does not reproduce in master
or 3.6.3.  Looking at the logs, I strongly suspect this is a platform
dependent problem.  Do we have any tests we can use to tell if aio
functions correctly on a given platform? (I couldn't find any with grep)

The system has glibc 2.7-18lenny7

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: samba-3.6.3-aio-failed.log.gz
Type: application/x-gzip
Size: 8418 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20120222/98ef626a/attachment.bin>


More information about the samba-technical mailing list