Hello Emerson, On Mon, Jan 14, 2019 at 10:26:40PM +0100, Emerson Gomes wrote: > Hello Tim, > > Sorry for the delayed answer. > The segfaults I had experinced apparently were related to something else - > Maybe some issue in my env. > At first I tried to apply the patch to 1.9.0, but after applying it to > 1.8.7, I no longer had the segfaults. > > So far I yet haven't experienced the underflow issue again. > I think it would be nice to merge this change to next releases - Not sure > how this is managed around here without the tracking tool :)
Thanks for the report! Tim, could you elaborate a little bit more on how the race reproduces ? I'm asking because if we only apply the underflow check, it will mean we'll constantly accumulate wrong values under load since until the counter crosses zero, the double discount is not detected. I'd rather be sure to address the cause (why do we decrement it twice) than the consequence (value becomes negative). thanks! Willy

