Skip to content

runtime: infinite loop in runtime_mapassign_faststr #76641

@felixge

Description

@felixge

Go version

go1.24.10

Output of go env in your module/workspace:

GOARCH=arm64

What did you do?

We are observing a Go application that occasionally becomes completely unresponsive while using 1 CPU core. We don't have Go CPU profiles or runtime metrics from this time period because they also stopped reporting.

However, we have profiles form the opentelemetry-ebpf-profiler, which indicate the the program is spending all of it's time spinning inside of runtime_mapassign_faststr (linked section corresponds to the line numbers we see in the profile below) as well as stopTheWorldWithSema. The latter seems stuck because the former is not async preemptible (and the function calls it makes are inlined).

Image

We have ruled out concurrent access to the map (see SetTag holding a lock while and setMeta manipulates the map).

From the evidence we've gathered, we suspect a bug in the map implementation that is causing an infinite loop in the runtime.

cc @prattmic

What did you see happen?

Go program becoming unresponsive.

What did you expect to see?

Go program not becoming unresponsive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions