You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Lock contention in StackTrace/Exception.ToString() #90563
The contention is caused by <DebugType>full</DebugType> debug format by some of the libraries. This debug format makes the runtime switch to read-write variant of the metadata readers that is unnecessary and introduces the contention.
DebugType=portable (default in .NET Core/5+): rmdir /s /q bin obj && dotnet build -c Release && dotnet run -c Release
21,000 exceptions thrown, formatted and handled per second
DebugType=full (default in .NET Framework): rmdir /s /q bin obj && dotnet build -c Release /p:DebugType=full && dotnet run -c Release
1,400 exceptions thrown, formatted and handled per second (more than one order of magnitude less)
Expected results
DebugType=portable and DebugType=full should be able to achieve a roughly same exception handling rate.
Activity
jkotas commentedon Aug 15, 2023
The contention is caused by
<DebugType>full</DebugType>debug format by some of the libraries. This debug format makes the runtime switch to read-write variant of the metadata readers that is unnecessary and introduces the contention.Standalone repro: https://gist.github.com/jkotas/617109b64d9b0ad52b491cdf021b2f8a
Actual results
20 core dev box
DebugType=portable (default in .NET Core/5+):
rmdir /s /q bin obj && dotnet build -c Release && dotnet run -c Release21,000 exceptions thrown, formatted and handled per second
DebugType=full (default in .NET Framework):
rmdir /s /q bin obj && dotnet build -c Release /p:DebugType=full && dotnet run -c Release1,400 exceptions thrown, formatted and handled per second (more than one order of magnitude less)
Expected results
DebugType=portableandDebugType=fullshould be able to achieve a roughly same exception handling rate.PdbReaderSigResolver: sig-only IMetaDataImport for the in-process PDB…
PdbReaderSigResolver: sig-only IMetaDataImport for the in-process PDB…
PdbReaderSigResolver: sig-only IMetaDataImport for the in-process PDB…
Use no-op MD Importer for DIA-backed stacktraces (#129866)
Use no-op MD Importer for DIA-backed stacktraces (#129866)