Fw: 2.2 vs 2.0.7 locking problem (testlock.zip)utility

Nick Demou ndemou at enlogic.gr
Mon Jun 25 10:30:19 GMT 2001


Hi all,

This posting was made on samba-list. It describes very clearly a locking problem which I also have expirienced. I am forwarding it to the samba-technical list because a) it is very clear b) the testing that reveals the erroneus behaviour is easily reproducable c) it reveals a noticable problem regarding the functionality of samba in mixed samba-microsoft networking environments (failure to suport a database which is opened twice from the same PC) d) the problem exists on two diferent database programs (clarion and MS access). This problem has prevented me of using samba in a lot of cases and I am sure it discouranges a lot of other people too.  I am willing to do any testing that you may suggest (I have a PCs runing RH, some win98 a win2Kpro, and I can setup one more for testing). I will also submit any necessary log files (I have allready done some testing at debug level 3 and came up with a 990K log file! but if you can explain some specific messages I will be able to trace the exact point were the evil strokes).

note: I've added some comments like this <<nick: blah blah>>

----- Original Message ----- 
From: "Nehemiah, Mark" <mnehemiah at urschel.com>
To: <samba at samba.org>
Sent: Thursday, June 21, 2001 6:59 PM

Hello all.

I am trying to evaluate samba in a production environment for our company.
We use Clarion programming language for our windows database information. 
<<nick: I use MS Access>>
We have approx 200 users and currently data(~10Gig) resides on a Netware
4.11 server.  I have tried installing some of the applications on samba and
here are my results.

2 servers, both RH7.1 kern2.4.2-2(Intel)
1 running samba 2.0.7
1 running samba 2.2.0
( I know 2.2.1 has fixed some stale locking issues, but haven't tried it to
see if it  helps me.)  

samba 2.2

a))).single user database access - works
b)))multi user single shared database - works
c)))single user(machine) open data table twice, either 2 instances of the
same app, or 2 different apps that access the same data table - does not
work from 98se- appears to effectively lock any further file access for any
user.  (BIG problem for us) 
<<nick: exactly the same in my case>>


samba 2.0.7

a)))works
b)))works
c)))works

appears to work fine on 2.0.7
<<nick: I've made this test long ago, I think that in my case failed but I can't be sure...>>


***Troubleshooting so far:
move binaries from 1 machine to another.
I ran both versions of samba on both different machines with the same
results.mbstatus shows no locks on the files that are inaccessible

While trying to learn how Clarion locks I visited http://www.clarionmag.com site were I found a utility called testlock that they had available for free download.  Testlock is a program by www.burtonsys.com that is wrote in c for windows to test file sharing and locking on network servers.

I have been running testlk32(the 32bit version) with interesting results.
It has a switch that lets it run some tests and then wait for another instance to start up so they can both try locking on the same files.  So when I run it from 2 computers it 70-80% of the time fails while testing "2-session file region locking".  

<<nick: I run 2 sessions from the same PC and it always failed at that test (ofcourse it doesnt fail If you run it against a winNT or even win98 share)
Here is some part of the report that testlock gives in order for you to have a clue about what it tests and what errors came up:
----------------------------
Test #7-dual_session:
Open of "x:\test.tmp" for MODIFY was successful, handle=3 (os_hand=16)
_get_osfhandle(3)=16
dbg: lock(h=3, ofs=256, len=128), success=1
File/region lock succeeded (handle 3, offset 256, for 128 bytes).
created semaphore (x:\TESTLOCK.SEM)
...semaphore deleted by other session
_get_osfhandle(3)=16
File/region unlock succeeded (handle 3, offset 256, for 128 bytes).
created semaphore (x:\TESTLOCK.SEM)
...semaphore deleted by other session
_get_osfhandle(3)=16
dbg: lock(h=3, ofs=256, len=128), success=0
file/region lock failed (handle 3, offset 256, for 128 bytes).
Err=33=LOCK_VIOLATION
This is a retriable error (TLIB would display "awaiting access...").
Region-lock worked correctly: 2nd lock failed with retriable/locked error.
created semaphore (x:\TESTLOCK.SEM)
...semaphore deleted by other session

this is were things will go wrong ...

_get_osfhandle(3)=16
dbg: lock(h=3, ofs=256, len=128), success=0
file/region lock failed (handle 3, offset 256, for 128 bytes).
Err=33=LOCK_VIOLATION
This is a retriable error (TLIB would display "awaiting access...").
ERROR: after Copy #2 of testlock unlocked the region, we still could not lock
it (handle=3).  
created semaphore (x:\TESTLOCK.SEM)
...semaphore deleted by other session
Test #7-dual_session: FAILED! (testlock session 1)
------------------------------------
>>

note:testlock program is proprietary, but the company is willing to distribute source code, if wanted by developers (after a non-disclosure agreement is signed).

Is this possibly fixed in 2.2.1?

I would definitely suggest a good look at the testlock program suite, as it
may help the samba team.

regards,
Mark

*******************************
Mark E. Nehemiah              Urschel Laboratories, Inc.
Network Administrator         http://www.urschel.com/
mailto:mnehemiah at urschel.com  mailto:info at urschel.com
*******************************

P.S.
I would like to thank Mark for his nice documentation (Mark I've only done minor changes on your posting, I believe you don't mine)
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the samba-technical mailing list