Skip to content

PerformanceCounterLib is not fully thread safe #24202

@danmoseley

Description

@danmoseley

PerformanceCounterLib instances are stored in a static table such that there's a single instance for a machine/LCID combination. As such there is an expectation that operations are thread safe (since to the caller they appear to be static operations)

The code attempts to achieve this but it appears to have holes, eg _customCategoryTable, a HashTable, is modified here without protection against concurrent write at this same location (or in other places).

Make a pss through PerformanceCounterLib to make it thread safe through its static members.

dotnet/corefx#25401

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.DiagnosticsenhancementProduct code improvement that does NOT require public API changes/additionshelp wanted[up-for-grabs] Good issue for external contributors

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions