[Samba] strangely lingering lock, samba 3.0.22

Michael Morgan mlmorgan at iodynamics.com
Tue Aug 1 20:52:08 GMT 2006


I have seen the exact same behavior on a recently installed Samba server 
(was 3.0.22, now running 3.0.23 as of last night's update). I also have 
oplocks set to false, but that doesn't seem to make any difference. 
Fortunately, it isn't a problem that happens every time, only occasionally.

Eventually, the lock does expire, but it takes a couple hours or so.

I have 4 other samba servers running at the same location, all various 
versions of Fedora Core and samba (depending on what was current at the 
time of installation). None of the older systems have had any troubles, 
but the new server that I installed 2 weeks ago (fc5, smb 3.0.23) has 
been trouble from the very beginning.

The same server is also generating a lot of packet errors at the network 
level, which causes other machines to drop the network connection to the 
file server. The users have to log off and back onto the network to 
re-establish the connection to the new server. The packet errors are not 
global (or at least the severity isn't). It seems to concentrate on a 
few users at a time. I'm planning to put a different network card into 
the server tonight to see if it makes any difference in tomorrow's 
operations. I'll let you know.

Mike

Logan Shaw wrote:
> Hello everyone,
> 
> Today a user (call them 'abc') came to me and described the
> following sequence of events:
> 
> 1.  They opened an Excel file, made some changes, saved it, and
>     closed it.
> 
> 2.  They tried to open it again and got an error dialog within
>     Excel that says this:
> 
>         File in Use
> 
>         FooBar.xls is locked for editing
> 
>         by 'abc'.
> 
>         Open 'Read-Only' or, click 'Notify' to open read-only
>         and receive notication when the document is no longer
>         in use.
> 
> 3.  They rebooted their desktop machine and tried again, and
>     got the same dialog again.
> 
> No matter what they do, the file remains locked.  The same file
> is locked for other Windows users and on other Windows computers
> as well, so obviously there is some sort of state on the Samba
> server that is telling the clients that the file is locked.
> 
> So, I logged into the Samba server (3.0.22 running on Slackware
> 10.2, with kernel 2.4.31), and tried to see if I could see any
> evidence of a lock.  The file did not show up in the output of
> "smbstatus --locks".  Running "fuser" on the file didn't show
> that any process had it open.  So apparently no process has
> it open on the Linux machine.
> 
> Also, I noticed that if I make a copy of the file on the Linux
> machine ("cp FooBar.xls FooBar-new.xls"), the copy does not
> retain the lock.  So, it would appear that this is not related
> to the actual contents of the file.
> 
> I also tracked down the individual smbd that user abc's machine
> is connected to and killed it.  Another one restarted, but
> the lock was still not released.
> 
> For what it's worth, I have "oplocks = no" and "level2 oplocks =
> no" in my smb.conf, so presumably this isn't an oplock issue.
> 
> Anyone have any ideas what's going on?  As far as I can tell,
> this must be a server-related issue since all clients see
> the file as locked, and it's apparently not an issue with the
> contents of the file (like Excel writing some flag into the
> actual file contents itself), but I can't find any indication
> on the server that the file is locked.
> 
>   - Logan

-- 
Michael L. Morgan
Director of Operations
Iodynamics, LLC
(435) 760-1046


More information about the samba mailing list