[PATCH] Fix bug #11375 - ordering issue in teardown in server exit.

Jeremy Allison jra at samba.org
Wed Nov 25 16:51:46 UTC 2015


On Wed, Nov 25, 2015 at 01:05:11PM +0100, Stefan Metzmacher wrote:
> Am 25.11.2015 um 08:05 schrieb Stefan Metzmacher:
> > Hi Jeremy,
> > 
> >> On Tue, Nov 24, 2015 at 10:09:39PM +0100, Stefan Metzmacher wrote:
> >>> smbXsrv_session_logoff() sets session->table = NULL;
> >>> and should exit immediately the 2nd time.
> >>> Am I missing something?
> >>>
> >>> This can only explained if it's NOT called twice,
> >>> but the first time AFTER sconn is already gone.
> >>
> >> Yes, you're right. It must be the first call
> >> after sconn is deleted.
> >>
> >>> A wild guess, could we have a bug in dbwrap_rbt traverse?
> >>> That may skip entries randomly?
> >>
> >> That's a tricky recursive function. Maybe.
> >> I'll take a close look....
> > 
> > I added some tests. I started to write this mail
> > saying it all works, but I just got this:
> > 
> > And the failure reproduces very often, but
> > valgrind doesn't give errors.
> > 
> > I'd guess it's related to __rb_rotate_right and __rb_rotate_left
> > and our traverse code doesn't have this in mind.
> > I'm wondering if we need to somehow make use of rb_next(), rb_prev(),
> > rb_first() and rb_last().
> 
> I don't understand that code and added a linked list that
> is used for the traverse.

Great detective work Metze ! Congratulations.

I'm out for US Thanksgiving until next week,
but I'll try and make some time between family
things to keep up on email/reviews.

Cheers & thanks,

Jeremy.



More information about the samba-technical mailing list