[Samba] FoxPro/lock troubles with samba 2.2.2/.3a

Jason Barker jbarker at edulog.com
Fri Mar 22 12:56:02 GMT 2002


Ouch, I haven't heard anything about these FoxPro corruption problems, been
away from the mailing list for 3-4 weeks.

I am very interested in the outcome of this, I am managing a Samba 2.2.3a
server for the company I work for, and so far we have had no problems. I set
the server up back in January with 2.2.2 and upgraded to 2.2.3a, and once I
had everything setup how we wanted it, a lot of stuff was moved on to it,
including the company's bugs database which uses FoxPro. So far, there have
been no problems, and no one has noticed any corruption, but after hearing
about these problems, I am going to see about doing a more thourough check.

It sounds like Jeremy is pretty sure he has fixed the problem, and I
certainly hope so. I took a quick look around the CVS through CVSweb and
noticed that you made changes to locking.c to fix this problem. I am
thinking about upgrading Samba 2.2.3a on the server to a version that has
this fix, and was wondering, would you recommend I download the latest
SAMBA_2_2 from CVS. Or can you tell me what files for this fix to grab (if
there are more than just locking.c) and then recompile 2.2.3a with them. I
only ask because I want to keep any new problems that could be created by
the latest CVS code to a minimum, since 2.2.3a seems to be working fine for
us. But at the same time would like to kill this problem before it has a
chance to bite us.

Also, is there some place to get Gerald's test program?

Oh, and Pablo, did you encounter the speed problems AFTER upgrading to the
Samba CVS version?

Thanks.


-Jason B.


-----Original Message-----
From: Pablo Alcaraz [mailto:pabloa at mbasystems.com.ar]
Sent: Friday, March 22, 2002 10:35 AM
To: Gerald Drouillard
Cc: samba at lists.samba.org
Subject: Re: [Samba] Locks troubles with samba 2.2.2/.3a


I installed the cvs 2.2 samba version in a server with 100 clients (w2k 
and win95) the lock problem has been solved! Thank you!

But I've a new problem: Samba is Slow compared with novell and w2k with 
the same hardware.

I'll send a mail with details and numbers.

The lock problem is solved for me at least!

Thank you

Pablo


Gerald Drouillard wrote:

> See the attached message from yesterday.  I submitted a test program a 
> few
> days ago to Jeremy and he was able to find a issue with Samba locking 
> which
> he believes is fixed now.
>
> Regards
> -------------------------
> Gerald Drouillard
> Owner and Consultant
> Drouillard & Associates
> http://www.Drouillard.ca
>
> > -----Original Message-----
> > From: samba-admin at lists.samba.org 
> [mailto:samba-admin at lists.samba.org ]On
> > Behalf Of Pablo Alcaraz
> > Sent: Friday, March 15, 2002 9:51 AM
> > To: samba at lists.samba.org
> > Cc: Pablo Alcaraz
> > Subject: [Samba] Locks troubles with samba 2.2.2/.3a
> >
> >
> > Hi,
> >
> > I just install 2.2.2 in a Red Hat 7.2 with kernel 2.4.16 on ext 3 + 
> lvm.
> >
> > The problem are the locks!!!!!!
> >
> > I've 5 users working in .dbf + cdx (foxpro) files with an 16 bits
> > application. It accesses to the files via DAO 2.0.  A lot of times in
> > the days the users gets 'currently locked' messages when the 
> application
> > open the dbf's files with read only access!
> >
> > I desactivated the oplocks, but the error continues.
> >
> > With the oplocks activated I get file corruptions inside the dbf's. For
> > example, one dbf was truncated to exactly 65kb...
> >
> > We work with Folio Infobase files. Now, when 2 users access to the same
> > record the second user get the locked messagge 30 sec after the locked
> > happened. This error happen on NT 4 +sp5/6 but it doesn't happen on
> > Windows 2000
> >
> > All these programs work perfectly with Novell and Windows file servers.
> >
> > We can't use samba 2.0.7 because the security is setted to domain.
> >
> > I upgraded to 2.2.3a but the errors continue happening.
> >
> > If someone can suggest *anything*, I'll be really happy to listen
> > him/her. If someone need that I test anything I have hardware to do so.
> >
> > I send you my smb.conf file.
> >
> > Please, CC me :-)
> >
> > Pablo
> >
> >
> >
> >
> >
>
>  
>
> ------------------------------------------------------------------------
>
> Subject:
>
> Fix for multi-user database corruption problems just checked in.
> From:
>
> Jeremy Allison <jra at samba.org>
> Date:
>
> Wed, 13 Mar 2002 17:40:20 -0300
> To:
>
> samba-technical at samba.org
>
>
> Hi all,
>
>         I discovered something today. I was given a test
> prgram by "Gerald Drouillard" <gerald at drouillard.ca> that
> allowed me to completely reproduce foxpro database corruption
> to a Samba 2.2.3a server - guarenteed.
>
> Ths same program did not fail when run against a W2K
> server.
>
> It was complaining about lock violations. Now Andrew's
> smbtorture lock tester does a *complete* test of
> our locking code against W2K and we pass as identical,
> so I really doubted that we were getting the lock
> semantics wrong, especially as these were very simple
> lock requests.
>
> One strange thing with the lock tests though - Samba
> is *much* faster at completing the smbtorture tests than Windows
> 2000 - which made me start to wonder.
>
> So I did some digging.......
>
> It turns out that when a Windows client asks for a lock,
> and tells the server that the timeout is zero (ie. don't
> wait to get the lock, just check *right now* to see if
> you could get it), then a W2K server seems to do a very strange
> thing. It apparently *spins* for a short time trying to get the
> lock - it *doesn't* respond immediately ! Samba wasn't doing
> that.
>
> And of course :-), the Foxpro database code seems to be dependent
> on this behavior.
>
> I have just added some code to Samba (SAMBA_2_2 and HEAD)
> to force Samba to spin a parameter dependent number of times
> and also to usleep a parameter dependent time between attempts.
> Currently I have these set to 3 spins and 10usecs.
>
> When I do this the test program passes *perfectly* against
> a SAMBA_2_2 CVS and HEAD server.
>
> So, for people whe are experiencing MS Access and Foxpro
> database corruption problems I'd appreciate it if you
> could check this new code out and test it - I think this
> is the answer (it also fully explains why W2K is so slow
> on the lock tester as well :-) to fix the database corruption
> problems.
>
> Let me know.....
>
> Jeremy.
>








More information about the samba mailing list