Locking database cleanup?
jra at samba.org
Wed Apr 5 14:19:54 GMT 2006
On Wed, Apr 05, 2006 at 10:20:22AM +0400, Alexey Lobanov wrote:
> Hello all.
> A quite simple sutuation. One SMBD servicing one user said "segfault"
> (e.g., because of CUPS interaction problem) and died. Yes, we are in
> Brave Robust Unix World, and one daemon death does not affect other
> daemons and remote clients. But... the locking database still contains
> records related to this non-existent PID, and any new attempts to use
> same files fail. The affected share becomes completely unusable until we
> restart the *whole* Samba subsystem, killing open files of all the other
> innocent clients. Welcome back to the monolythic server.
> Is this behavior normal for Samba 2 and 3 architecture? Or I do not
> understand something?
You're not understanding something. As part of the validation
process when reading a record containing open and locking info,
we validate the pid associated with that record by sending it
a zero signal. If we get an ESRCH (no such process) error back
we delete the record.
So long as pid's don't wrap this should be robust.
More information about the samba-technical