Skip to content

Rare deadlock in GraphNode.GetOrComputeValue #18115

Closed
@majocha

Description

@majocha

GraphNode.GetOrComputeValue can deadlock when the threadpool is under some pressure.

See: https://dev.azure.com/dnceng-public/public/_build/results?buildId=886415&view=logs&j=966a6946-91f0-5397-81f4-d998467880f9&t=344839a9-08c6-5829-65fb-26f32c5a016f&l=17626

Repro steps

This is reproducible in #17872 locally. For example:
in VS select all BuildGraphTests in Test Explorer and "run until failure".
The tests run in parallel and after few dozens or some more iterations the test case Many requests to get a value asynchronously might evaluate the computation more than once even when some requests get canceled will get stuck here

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Compiler-ServiceVarious compiler service issues which do not belong to other labels/areas.BugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.

    Type

    Projects

    Status

    New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions