Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't reap connections that have already been reassigned #25707
Nope, testing races is an ugly business, it is usually done via concurrent torture test suites. They are heavyweight and I don't think we have a capacity to implement them right now (and keep running them on CI).
PS: that is a mindbogglingly sloppy race in my code, sorry.
Yeah, I don't see any way to inject latches to force the worst-case sequencing. I guess I'll just go with the increased runtime assertions.
I think the phrase you're looking for is "I can't believe I wrote that", in which case... well...
Your reduction of locking obviously made it much more likely to occur, but I think the race was present (in an actual, possible-to-manifest, way) in 4.2 too: the