Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
runtime: throw + allglock ordering problem #42669
More importantly, if
One option (thanks @mknyszek) is to simply not take
I don't know the guarantees/non-guarantees of freezetheworld, but it seems like the current chance of deadlock is better than any chance of corruption as we're going through the process of throwing.
Regardless of what decision is made, it may be worth putting a reference to this bug and allglock's role during throw in lockrank.go. I think I meant to make a comment about allglock in the lock rank code, but then forgot to do it.
This is actually mentioned, though a bit indirectly: https://cs.opensource.google/go/go/+/master:src/runtime/lockrank_on.go;l=69;drc=420c68dd68c648af6642dd7e5cf6dacf9f067f6e
I was definitely primarily motivated here by annoyance at the
I definitely split on deadlock vs corruption: corruption is definitely worse, but I don't know how frequently freezetheworld fails to stop things in time. I suspect we don't really know how reliable it is because typically other threads failing to stop wouldn't cause any problems with the throw.