[Samba] Samba locks with PC crash

Yannick Bergeron Yannick.Bergeron at USherbrooke.ca
Thu Oct 13 23:08:40 GMT 2005

Quoting Jeremy Allison <jra at samba.org>:

> On Thu, Oct 13, 2005 at 08:23:27AM -0400, Yannick Bergeron wrote:
> > We are experiencing this current problem: some users are locking Lotus
> Notes
> > files on a Samba share. When their pc crash (ex: power off the pc without
> > shutting down windows), the file is still locked. So when they boot up a
> few
> > mins after the crash, they can't open Lotus Notes because some files are
> still
> > locked by themself. So we need to kill the samba process. This is happening
> a
> > lots of time in a week and we are looking for a better solution.
> >
> > I just want to know how does Samba is working with this kind of situation?
> > (timeout maybe? if there is a timeout, after how many time?)
> As an smbd process reads the locking record for a file, it does a kill(pid,0)
> on any stored lock owned by process <pid>, ensuring this process still
> exists.
> If it doesn't exist, it removes that record and ignores the lock. That's how
> the locking db is self-cleaning. There are no timeouts.
> Jeremy.

It's ok if the process of the client that has crashed isn't running anymore, but
it's still running (since we must kill the process to remove the lock). So with
your answer, my question is now: If a client connected to Samba share crash,
what's happening to the smb child process on the Samba server?

Yannick Bergeron
burgergold at hotmail.com
Yannick.Bergeron at USherbrooke.ca

More information about the samba mailing list