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

Richard Sharpe realrichardsharpe at gmail.com
Fri Dec 4 09:46:20 UTC 2015


On Wed, Nov 25, 2015 at 8:51 AM, Jeremy Allison <jra at samba.org> wrote:
> 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.

Is it possible that this is the cause of
https://bugzilla.samba.org/show_bug.cgi?id=11394 as well.

We seem to be able to hit this from time to time.

I will get someone to try Metze's patch to see if it resolves that problem.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)



More information about the samba-technical mailing list