Skip to content

runtime: merge workarounds to false deadlocks #40518

Open
@prattmic

Description

@prattmic

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsFixThe path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions