Skip to content

proposal: cmd/go: allow setting runtime godebugs in go.mod / go:debug directives #71283

Open
@hajimehoshi

Description

Proposal Details

Now asyncpreemptoff=1 cannot be specified by //go:debug:

examples\test\main.go:1:1: invalid //go:debug: unknown //go:debug setting "asyncpreemptoff"

However, there are many situations where disabling async preemption is required as a workaround to make applications work correctly:

I propose to enable to specify asyncpreemptoff=1 as //go:debug and godebug section in go.mod.

Note that it is still possible to specify it by -ldflags="-X=runtime.godebugDefault=asyncpreemptoff=1", but this is pretty hacky.

Metadata

Assignees

No one assigned

    Labels

    ProposalToolProposalIssues describing a requested change to a Go tool or command-line program.

    Type

    No type

    Projects

    • Status

      Incoming

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions