[Samba] File remains locked on samba server after client crashed

Jeremy Allison jra at samba.org
Fri Oct 21 16:18:38 GMT 2005

On Fri, Oct 21, 2005 at 10:23:24AM +0200, Christoph Peus wrote:
> Hello experts,
> we have encountered this problem several times with different samba 
> versions (3.0.20b now) and need a solution now which works without 
> restarting the samba server: sometimes when a client crashes for 
> whatever reason while it has a file on the samba server opened, this 
> file cannot be opened for writing after the client has rebootet. The 
> locking entry is then associated with a nonexistent pid.
> What's the cause of this problem? How can we make this file r/w 
> accessible again without restart of the samba server (and deletion of 
> the locking.tdb file)?

Once the process holding the record lock has died, the next
smbd trying to open this file should clean out the dead lock.
You can test this be trying to open the file from another
client - this should clean the lock. If it doesn't I'd like
to see a debug level 10 log from the client doing the open
to clean the lock.


More information about the samba mailing list