Skip to content

Symbols API: full thread-safety #3991

Open
Open
@auduchinok

Description

@auduchinok

There're some APIs using which from multiple threads at the same time may lead to a dead lock or to an infinite looping.
I've seen this in several places and when attaching a debugger to a hanging process, it was hanging inside Dictionary`2. (part of parallels stack screenshot is attached below).

I've seen it in FSharpEntity.BaseType, FSharpMemberOrFunctionOrValue.XmlDocSig and now in FSharpChecker.GetProjectOptionsFromScript(...). Adding locks around uses of the first two APIs fixes the the issue for me. If needed I can remove the locks to reproduce it and provide stack traces.

Can we replace uses of Dictionary with ConcurrentDictionary in places that may be (indirectly) called by FCS clients?

screen shot 2017-11-21 at 16 54 43

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-LangService-APIBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.

    Type

    Projects

    Status

    In Progress

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions