Repository navigation
Conversation
To eliminate global spinlock in stack trace saving to exceptions, the format of the stack trace storage has changed. The `_stackTrace` array can now be either a byte[] with the actual stack trace as before or an object[] where the first element references the byte[] with the actual stack trace and the following elements contain references to System.Resolver or System.Reflection.LoaderAllocator instances that keep code of methods that can be collected alive. This change modifies SOS to handle the object[] case properly, while staying compatible with the old way. Since the same code to get the stack trace was duplicated at two places, I have taken this opportunity to refactor it into a separate function.
|
@janvorli - This looks like all previous versions of SOS that don't have this change won't work against new runtime versions so we probably want to bump the breaking change version number. Anyone who tries to use a version of SOS containing the old version number gets an error saying their SOS is out-of-date and they should update it. I'll let Mike take a look at the rest of the code change but it looked good to me 👍 fyi @elinor-fung @lambdageek - this looks like an example where SOS is directly inspecting runtime internal data structures without using a DAC API. Whether the code stays in SOS or migrates to a new API that cDAC implements this parsing code would not work cross-bitness as-is. |
|
@noahfalk thank you for pointing it out, I'll add bumping the version in the runtime change. |
- Update Alpine versions (#4589) - Followup 1ES template changes (#4596) - Fix Test Results tab in github UI (#4607) - Move the symstore repo to diagnostics (#4603) - Fix recent Alpine repo build (#4612) - Fix issue #4611 - Switch to cross build for Alpine (#4621) - Add waithandle to --clrevents option (#4624) - Fix SOS unit tests dump generation fixture (#4636) - Fix CONTRACT return type (#4649) - [SymbolStore] Add support to index .NET Framework Runtime debugging modules (#4616) - [test][SOS] Disable OtherCommands Dumpmt test on Alpine (#4656) - Supports collecting GCSettingsEvent for gc-collect profile (#4615) - Update ipc-protocol.md (#4658) - Fixing a case where we should set the RundownKeyword (#4662) - Fix versioning of symstore ported assets (#4670) - Add ubuntu 22.04 testing. Update 6,7 and 8 runtime versions (#4676) - Update locker action version to update node version (#4682) - Use managed identity for blob upload of release assets (#4680) - Remove the symweb symbol server support (#4694) - [RISC-V] Add gcinfodumper implementation. (#4703) - Fix `pathto` SOS command. (#4706) - Add support for new exception trace storage format (#4635) - Change SOS breaking change from warning to error; better dotnet-dump target errors (#4713) - [Symbol] Add manifest generator (#4693) - Remove references to obsolete storage account variables (#4719) - Update DIA to 17.10.0-beta1.24272.1 (#4683) - Reenable SDL requirements (#4722) --------- Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Rich Lander <[email protected]> Co-authored-by: Mike McLaughlin <[email protected]> Co-authored-by: Jan Vorlicek <[email protected]> Co-authored-by: Grégoire <[email protected]> Co-authored-by: Tom McDonald <[email protected]> Co-authored-by: Mitchell Hwang <[email protected]> Co-authored-by: Andrew Au <[email protected]> Co-authored-by: Noah Falk <[email protected]> Co-authored-by: Mikhail Kurinnoi <[email protected]> Co-authored-by: Matt Mitchell <[email protected]>
- Update Alpine versions (#4589) - Followup 1ES template changes (#4596) - Fix Test Results tab in github UI (#4607) - Move the symstore repo to diagnostics (#4603) - Fix recent Alpine repo build (#4612) - Fix issue #4611 - Switch to cross build for Alpine (#4621) - Add waithandle to --clrevents option (#4624) - Fix SOS unit tests dump generation fixture (#4636) - Fix CONTRACT return type (#4649) - [SymbolStore] Add support to index .NET Framework Runtime debugging modules (#4616) - [test][SOS] Disable OtherCommands Dumpmt test on Alpine (#4656) - Supports collecting GCSettingsEvent for gc-collect profile (#4615) - Update ipc-protocol.md (#4658) - Fixing a case where we should set the RundownKeyword (#4662) - Fix versioning of symstore ported assets (#4670) - Add ubuntu 22.04 testing. Update 6,7 and 8 runtime versions (#4676) - Update locker action version to update node version (#4682) - Use managed identity for blob upload of release assets (#4680) - Remove the symweb symbol server support (#4694) - [RISC-V] Add gcinfodumper implementation. (#4703) - Fix `pathto` SOS command. (#4706) - Add support for new exception trace storage format (#4635) - Change SOS breaking change from warning to error; better dotnet-dump target errors (#4713) - [Symbol] Add manifest generator (#4693) - Remove references to obsolete storage account variables (#4719) - Update DIA to 17.10.0-beta1.24272.1 (#4683) - Reenable SDL requirements (#4722) - Disable CG on musl leg due to lack of proper support (#4726) - Update SOS breaking change version for Exception's _stackTrace changes in .NET 9 (#4733)
To eliminate global spinlock in stack trace saving to exceptions, the format of the stack trace storage has changed. The
_stackTracearray can now be either abyte[]with the actual stack trace as before or anobject[]where the first element references the byte[] with the actual stack trace and the following elements contain references toSystem.ResolverorSystem.Reflection.LoaderAllocatorinstances that keep code of methods that can be collected alive.This change modifies SOS to handle the
object[]case properly, while staying compatible with the old way. Since the same code to get the stack trace was duplicated at two places, I have taken this opportunity to refactor it into a separate function.