URGENT!!!! Oplock doesn't work in 2.x!!! [Re: Oplock problem with (PR#12995)

Jeremy Allison jallison at cthulhu.engr.sgi.com
Mon Jan 25 17:05:36 GMT 1999

mjt at tls.msk.ru wrote:
> I posted some messages about this, but there is still NO RESPONCE AT ALL!!
> As I see, more and more users encountered this problem --
> oplocks code in 2.x (starting from all betas and now in 2.0) DOES NOT WORK!!!
> David! You can place "oplocks = no" into your [global] section and all
> will be fine.  But problem is opened!
> There is no special with PowerPoint, MS Office and other -- you can try notepad
> (I think, but not shure if it uses file locking at all) with same results...
> Samba team, please respond!

I can assure you that oplocks do indeed work in 2.0.

I have been running 60 client benchmark runs (and another site
has been running over 100 client benchmark runs) perfectly
successfully. These benchmarks *depend* upon oplocks working
correctly. In addition, the vast majority of Samba users are
reporting success with 2.0. Oplocks are used on *every* file
open from a Windows client. If there were a generic logic bug
in the oplock code (such as the one in 1.9.18 - 1.9.18p1) then
every site would be reporting problems (that's what happened
with the early broken 1.9.18 code).

You cannot assume that just because you are seeing a particular
problem that this is a generic Samba problem that is being
suffered by all users (and that's the generalisation that
you are making here).

Remember - the message :

" [1999/01/19 16:33:59, 0] smbd/oplock.c:oplock_break(812)
  oplock_break: client failure in break - shutting down this smbd."

means *exactly* that. A *CLIENT* failure in responding to an
oplock break from Samba.

I have seen this problem on networks with problems - it is
nothing to do with Samba. Sometimes it is one particular
client that has a faulty network card, or out of date drivers
Remember - if such a client has oplocked a commonly used
file then other smbd's will slow down waiting for the
first client to release the oplock.

It can also be caused by intermittant network faults.

If you want to track this down (on your network) - first
try and see if it is repeatable. If so then examine the
client(s) that smbd is reporting are not responding to
oplock break requests and check they have up to date
NIC drivers/try changing network cards/ ie. start the
elaborate dance you need to do to track down a problem
in Windows.

If you have a *completely* reproducible test case that
you are able to reproduce from many different clients
(and best of all if you can reproduce it on another 
network) then mail it in and I will reproduce it and
fix a bug in Samba (that's how I fixed the "MS-Office files
not reporting 'in use' status correctly" in the early
Samba 2.0 betas).

Telling me you get "oplock break failures" is telling
me you have a broken client or network - nothing more.


	Jeremy Allison,
	Samba Team.

Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.

More information about the samba mailing list