Dead oplocks

Andrew Bartlett abartlet at
Tue Jun 12 10:34:39 GMT 2001

Simon Allenby wrote:
> Hi all,
> I I am running Samba 2.2.0 on RH6.1
> Although the file locking is much better than the previous version I was
> using (good work everyone!) I am starting to see some problems with files
> that are locked, but no user process to go with them.
> I don't know whether it's relevant, but one of the users is a DHCP laptop
> user, and may just disconnect from the network and leave without closing the
> files first. I know this is bad, and have tried telling her not to do it,
> but the way Samba handles this appears to be wrong. If the client's smbd
> process dies or is killed, surely any locks related to this process should
> also be removed? I have seen this problem without laptops, though, and I
> suspect it is happening if a PC dies with files open. I have got a deadtime
> set, and I am not sure whether it's the client dying or the deadtime that's
> closing the smbd client process.
> Is there any way of manually removing a single oplock from the lock table,
> without throwing all of the users off and fully restarting Samba?
> Is there anything I can do to help track down the problem further? Has
> anyone come across this problem before?

I think most of this has been fixed in current CVS, both in removing the
entries of dead smbds, and in undoing tdb entries when a smbd daemon
shutsdown abnormally (like the client dropping the connection at the
wrong moment).  There has certainly been plenty of work in this area...

Andrew Bartlett

Andrew Bartlett
abartlet at

More information about the samba-technical mailing list