Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: add Gscan to the lock ranking order #38922

Closed
danscales opened this issue May 7, 2020 · 4 comments
Closed

runtime: add Gscan to the lock ranking order #38922

danscales opened this issue May 7, 2020 · 4 comments
Labels
Milestone

Comments

@danscales
Copy link

@danscales danscales commented May 7, 2020

I'd like to check in this lock ranking update, https://go-review.googlesource.com/c/go/+/228417, that inserts the Gscan bit into the locking order. This has been in process for a while, but only just finished up now. This change is useful for documentation and checking of the ordering between locks and the Gscan bit. Just in working on this change, I've added more documentation on the almost-cycle between the Gscan bit and the hchan locks (not actually possible because the relevant G is suspended in the case of the unusual Gscan -> hchan ordering), and also ran into a possible deadlock (very unlikely) involving the paniclk and allg locks.

Since this code is only activated when GOEXPERIMENT=staticlockranking, this should be quite safe. We have a builder now that automatically runs staticlockranking for linux-amd64 on each check in.

/cc @andybons @rsc

@FiloSottile
Copy link
Member

@FiloSottile FiloSottile commented May 7, 2020

This was mailed before the freeze, so IIUC it's fine to merge until EOD today (one week after the freeze).

@gopherbot
Copy link

@gopherbot gopherbot commented May 7, 2020

Change https://golang.org/cl/228417 mentions this issue: runtime: incorporate Gscan acquire/release into lock ranking order

@danscales
Copy link
Author

@danscales danscales commented May 7, 2020

This was mailed before the freeze, so IIUC it's fine to merge until EOD today (one week after the freeze).

OK, I see, but I'll let @andybons confirm.

@andybons
Copy link
Member

@andybons andybons commented May 7, 2020

yep you’re good.

@andybons andybons changed the title freeze exception: runtime: add Gscan to the lock ranking order runtime: add Gscan to the lock ranking order May 7, 2020
@andybons andybons added NeedsFix and removed NeedsDecision labels May 7, 2020
@andybons andybons added this to the Go1.15 milestone May 7, 2020
@gopherbot gopherbot closed this in f9640b8 May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.