[Samba] Oplock problem

Boogerman
Wed, 07 May 2003 03:06:48 -0000

Then, come to think of it, this oplock thing is dangerous (except for
read-only files). Even with good clients (bug free), this could still fail
in case of a network error or something.

I guess I will just disable oplocks (or else this will trouble my sleep).

I still wonder why M$ designed this mechanism if it was to bring such
problems. Furthermore, is there any way to implement failproof oplocks (not
over SMB, but in general)?

Regards,

Gaston Dassieu Blanchet
boogerman@interar.com.ar

----- Original Message -----
From: "John H Terpstra" <jht@samba.org>
To: "Boogerman" <boogerman@interar.com.ar>
Sent: Tuesday, May 06, 2003 11:05 PM
Subject: Re: [Samba] Oplock problem


> On Tue, 6 May 2003, Boogerman wrote:
>
> > John
> >
> > Yes, I had already read the Locking chapter of the HOWTO-Collection
(I've
> > been crawling trought the list archives seeking for a solution to my
problem
> > when I found a link to it).
> >
> > I found it very instructive. It describes very well what the types of
> > oplocks are and what they are used for. It's a real good work.
> >
> > I only have one question. At a certain point, you mention a "risk
of
data
> > corruption". Can you explain me where this risk comes from? Is
there a
flaw
> > in the oplock request/break mechanism?
>
> Clients can fail to see oplock break requests, the server then times out
> the lock, another client writes to the file, then the original client
> write to it also. Bang! Bad data!
>
> - John T.
>
> >
> > Regards,
> >
> > Gaston Dassieu Blanchet
> > boogerman@interar.com.ar
> >
> > ----- Original Message -----
> > From: "John H Terpstra" <jht@samba.org>
> > To: "Boogerman" <boogerman@interar.com.ar>
> > Cc: <samba@lists.samba.org>
> > Sent: Tuesday, May 06, 2003 2:13 PM
> > Subject: Re: [Samba] Oplock problem
> >
> >
> > > Gaston,
> > >
> > > There is a new chapter in the Samba-HOWTO-Collection.pdf (a work
in
> > > progress) on locking. I'd appreciate your feedback on it and
any
> > > suggestions you might make. Here is the URL for the in
development
> > > version:
> > > http://samba.org/~jht/NT4migration/Samba-HOWTO-Collection.pdf
> > >
> > > - John T.
> > >
> > > On Tue, 6 May 2003, Boogerman wrote:
> > >
> > > > Hello everybody! I'm (again) after that 30 second lockup
some of us
are
> > > > experiencing. Today, when I deleted the file pspbrwse.jbf, I
experienced
> > the
> > > > problem, and I immediately went to the logs. Here's what
I got:
> > > >
> > > > [2003/05/06 11:06:50, 0] smbd/oplock.c:oplock_break(796)
> > > >   oplock_break: receive_smb timed out after 30 seconds.
> > > >   oplock_break failed for file htdocs/pictures/pspbrwse.jbf
(dev 901,
> > > > inode = 11009, file_id = 2654).
> > > > [2003/05/06 11:06:50, 0] smbd/oplock.c:oplock_break(868)
> > > >   oplock_break: client failure in oplock break in file
> > > > htdocs/pictures/pspbrwse.jbf
> > > > [2003/05/06 11:06:51, 0] smbd/reply.c:reply_lockingX(4626)
> > > >   reply_lockingX: Error : oplock break from client for fnum
= 11670
and
> > no
> > > > oplock granted on this file (htdocs/pictures/pspbrwse.jbf).
> > > >
> > > > Ok, by the looks of it (anyone whith better knowledge of the
SMB
> > protocol
> > > > and Samba internals, please correct me if I'm wrong), I
would say
the
> > client
> > > > requested an oplock on pspbrowse.jbf, then when it deleted
it, the
> > server
> > > > issued an oplock break request wich was unanswered by the
client...
so
> > after
> > > > 30 seconds of receiving no answer, the server timed out the
operation.
> > So,
> > > > there appears to be a bug in the client (not responding to
the
oplock
> > break
> > > > request). I must mention that the client is a Windows XP
SP1.
> > > >
> > > > During those 30 seconds, the server didn't seem to
respond to any
> > request
> > > > made by the client (that's why the client locked up).
Other clients
> > worked
> > > > fine during those 30 seconds.
> > > >
> > > > Well, I have described what I think is the issue as best as
I
could...
> > > > Apparently, It has nothing to do with WebDAV (I have already
disabled
> > it,
> > > > and it didn't fix anything).
> > > >
> > > > Any suggestions?
> > > >
> > > > Regards,
> > > >
> > > > Gaston Dassieu Blanchet
> > > > boogerman@interar.com.ar
> > > >
> > > >
> > > >
> > >
> > > --
> > > John H Terpstra
> > > Email: jht@samba.org
> > > --
> > > To unsubscribe from this list go to the following URL and read
the
> > > instructions:  http://lists.samba.org/mailman/listinfo/samba
> > >
> > >
> > >
> >
> >
>
> --
> John H Terpstra
> Email: jht@samba.org
>
>