Hi William,

On Fri, Mar 05, 2021 at 01:28:34PM +0100, William Dauchy wrote:
> Hi,
> 
> On Wed, Mar 3, 2021 at 4:09 PM Christopher Faulet <cfau...@haproxy.com> wrote:
> >    - An issue leading to possible infinite loops because of a double locking
> >      effect in the mt lists was fixed by Olivier. If MT_LIST_TRY_ADDQ()
> >      macro, it was possible to try to lock twice the same element, making 
> > the
> >      second lock attempt to fail in loop.
> > Olivier Houchard (1):
> >        BUG/MEDIUM: lists: Avoid an infinite loop in MT_LIST_TRY_ADDQ().
> 
> not very clear in which conditions it can be triggered. Do you have
> more details about it?

That's something I encountered while trying to simplify some code, I
noticed that under certain circumstances my tests would deadlock, even
with a single thread. I seem to remember that it happens with there's
exactly one element in the list and you try to add it again into the
same list. It just turns out that the rare places where this is used
could not trigger this condition. And its sibling, MT_LIST_TRY_ADD()
was safe.

Hoping this helps,
Willy

Reply via email to