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: merge workarounds to false deadlocks #40518

Open
prattmic opened this issue Jul 31, 2020 · 4 comments
Open

runtime: merge workarounds to false deadlocks #40518

prattmic opened this issue Jul 31, 2020 · 4 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@prattmic
Copy link
Member

prattmic commented Jul 31, 2020

In #40368, I avoided false deadlocks from startm in sysmon by reserving M ids in advance to make it look like the new M is already running to checkdead.

Later, I discovered that @dvyukov fixed a nearly identical issue in #6070 by temporarily decrementing the number of idle locked M's, to make checkdead see an extra M. Slightly different approach, but same end result.

We should merge these two approaches back to one just to keep things simpler and easier to understand.

cc @aclements @mknyszek @ianlancetaylor

@prattmic prattmic added the NeedsFix The path to resolution is known, but the work has not been done. label Jul 31, 2020
@prattmic prattmic added this to the Go1.16 milestone Jul 31, 2020
@prattmic prattmic self-assigned this Jul 31, 2020
@aclements
Copy link
Member

aclements commented Jul 31, 2020

With your change to startm to reserve an ID while holding sched.lock, is the logic in sysmon even necessary?

@prattmic
Copy link
Member Author

prattmic commented Jul 31, 2020

I'm almost certain that the incidlelocked logic in sysmon is unnecessary after my change. There is similar logic in retake that I'll need to look at more closely.

@aclements
Copy link
Member

aclements commented Dec 8, 2020

Bumping to 1.17, but @prattmic, please bump to Backlog if you don't plan on working on this in 1.17.

@aclements aclements modified the milestones: Go1.16, Go1.17 Dec 8, 2020
@ianlancetaylor
Copy link
Contributor

ianlancetaylor commented Apr 30, 2021

@prattmic Is anything going to happen in 1.17? If not, we should change the milestone to Backlog. Thanks.

@prattmic prattmic modified the milestones: Go1.17, Backlog May 3, 2021
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Projects
Status: Todo
Development

No branches or pull requests

4 participants