[Samba] Re: How Samba let us down
Craig.Peacock at beyondlogic.org
Thu Oct 24 13:34:04 GMT 2002
Regarding tests you can perform on the windows side:
A couple of months ago, a samba user wrote in this group explaining
that the easiest way to reproduce op-lock break timeouts was to select
10 or 20 so MS Word files and open them all once. (I've tried multiuser
test programs which lock regions, write CRC'ed data and checks it etc,
but I can't find anything that beats MS Office for op-locks and data
corruption :( - It's just unfortunate it is one of the most used
Based on this theory, I wrote a quick JScript to command MS office
products (Word/Excel/Powerpoint) to open a file and close it which
loops for 1000 iterations.
var myApp = new ActiveXObject("Word.Application");
myApp.Visible = true;
for (i = 0; i < 1000; i++)
Further scripts can be downloaded from
Now I will admit that the test is only as good as the M$ products and I
find it interesting to see someone mention a bug in Word causing data
corruption. However from my tests conducted on Netware 5, Windows 2000
Server and Samba 2.2.5, Netware 5 performs flawlessly, Windows 2000
Server just as well (although a rare hicup every now and again) and
Samba has the frequent oplock break timeout with very rare data
corruption. (If you uncomment the saveas line in the script enabling
the file to be saved, you can check if your file withstood 1000
open/save operations without data corruption. . . Or run it all day)
However in saying this samba is only as good as the file system it is
serving the files from. I use a samba drive at work and get a couple of
oplock breaks each day and have seen the odd file corrupted. My home
directory which comes from the same machine samba is installed on works
fine, but with the occasional oplock break, yet some of my share drives
which are NFS'ed from another machine is unusable on the best of days
with 3 out of 4 opens causing an op-lock using the above scripts.
Now hopefully the couple of corrupted files I've seen is either MS Word
or the bug in the write cache code of 2.2.5. So I would recommend
upgrading to 2.2.6 and when you have a spare moment run a couple
hundred iterations of office open/close operations and see what happens?
If you're confident, uncomment the save as line.
Richard Sharpe <root at ns.aus.com> wrote on 24/10/2002 6:36:26 AM:
>In my opinion, while it is possible to do what you say, that is not how
>you will detect corruption. Corruption of the sort you mention will be
>detected very quickly in normal tests.
>The sort of corruption I think we should check for is the following:
>1. Samba getting confused when one user has multiple files open and
>writes to different files in quick succession.
>2. Multiple samba clients having files open and the file system getting
>confused and mixing up writes from different users.
>cifs-load-gen would be an ideal tool for testing this if it is
>extended in a couple of ways. I have started talking to JHT about this.
>BTW, Tridge has already written a file system stress tester, as have
>others, that can detect the second sort of corruption.
>rsharpe at ns.aus.com, www.richardsharpe.com,
>sharpe at samba.org, sharpe at ethereal.com
>To unsubscribe from this list go to the following URL and read the
More information about the samba