[PATCHES] Cleanup dead records in messages.tdb

Jeremy Allison jra at samba.org
Wed Apr 2 11:20:15 MDT 2014

On Wed, Apr 02, 2014 at 10:51:47AM +0200, Volker Lendecke wrote:
> On Tue, Apr 01, 2014 at 01:49:13PM -0700, Christof Schmitt wrote:
> > When a smbd process dies, pending messages.tdb records for this process
> > will not get cleaned up. I have seen one case where the messages.tdb
> > file grew very large after I/O requests were delayed and smbd child
> > processes died.
> > 
> > These patches implement cleanup of messages.tdb records that is
> > triggered after a smbd dies; any record with an invalid key or a
> > non-existing PID will get deleted.
> Can we avoid the traverse in the normal case? Is it really
> that the smbds in your case left corrupt keys behind? In
> remove_child_pid we know which child died, so we could
> directly check and delete its record. Traverses always scare
> me :-)

We could always add a new message MSG_SMB_MSG_VALIDATE
and have it act the same as MSG_SMB_BRL_VALIDATE does in
cleaning up the brl lock db. That way we only traverse
in the 'known child fail' case.

I'll have a go at coding that up !



More information about the samba-technical mailing list