Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Avoid nested read locks on BucketLock #3898
Calls to unmarshalPrincipal are making nested read lock on context.BucketLock, which deadlocks when someone else requests the write lock between the two read locks.
The BucketLock handling in general looks like a relatively clunky way to avoid races associated with bucket teardown. Should be cleaned up or potentially removed altogether.