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
runtime: "lock ordering problem" between fin and wbufSpans #41021
This looks like a missing, but valid, edge on the wbufSpans lock. I'll send a CL.
IIUC, wbufSpans may be taken in any context that allows write barriers. As such, I'm a bit surprised to see its partial order list is not longer. The mheap list (locks held in contexts which may allocate) is significantly longer, but I'd expect contexts which may allocate and contexts which may have write barriers to be very similar.
This difference may just be because we've observed fewer of these edges since write barriers are only enabled during GC, while allocations can happen consistently.
@mknyszek do you see any extra locks that should obviously be added to wbufSpans? https://cs.opensource.google/go/go/+/master:src/runtime/lockrank.go;l=233-234