Skip to content

runtime/metrics: data race detected in Read [1.17 backport] #53589

@gopherbot

Description

@gopherbot

@prattmic requested issue #53542 to be considered for backport to the next 1.17 minor release.

@gopherbot please backport to 1.17 and 1.18.

This triggers a false positive in the race detector for programs calling runtime/metrics.Read from multiple goroutines. There is a workaround: use a single global lock around all calls to metrics.Read in the program. However, that is quite invasive and has serious performance implications for a high-performance API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions