Skip to content

Commit

Permalink
Merge main into release/stable
Browse files Browse the repository at this point in the history
  • Loading branch information
hoyosjs committed Feb 1, 2023
2 parents bd63c2f + f27aa9f commit f993832
Show file tree
Hide file tree
Showing 136 changed files with 1,449 additions and 1,945 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ To install the platform's prerequisites and build:
* [FAQ](documentation/FAQ.md) - Frequently asked questions.
* [The LLDB Debugger](http://lldb.llvm.org/index.html) - More information about lldb.
* [SOS](https://msdn.microsoft.com/en-us/library/bb190764(v=vs.110).aspx) - More information about SOS.
* [Debugging CoreCLR](https://github.com/dotnet/runtime/blob/main/docs/workflow/debugging/coreclr/debugging.md) - Instructions for debugging .NET Core and the CoreCLR runtime.
* [Debugging CoreCLR](https://github.com/dotnet/runtime/blob/main/docs/workflow/debugging/coreclr/debugging-runtime.md) - Instructions for debugging .NET Core and the CoreCLR runtime.
* [dotnet/runtime](https://github.com/dotnet/runtime) - Source for the .NET Core runtime.
* [Official Build Instructions](documentation/building/official-build-instructions.md) - Internal official build instructions.

Expand Down
2 changes: 1 addition & 1 deletion documentation/design-docs/ipc-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ Example usage:
$ export DOTNET_DiagnosticPorts=$DOTNET_DiagnosticPorts;~/mydiagport.sock,nosuspend;
```

Any diagnostic ports specified in this configuration will be created in addition to the default port (`dotnet-diagnostic-<pid>-<epoch>`). The suspend mode of the default port is set via the new environment variable `DOTNET_DefaultDotnetPortSuspend` which defaults to `0` for `nosuspend`.
Any diagnostic ports specified in this configuration will be created in addition to the default port (`dotnet-diagnostic-<pid>-<epoch>`). The suspend mode of the default port is set via the new environment variable `DOTNET_DefaultDiagnosticPortSuspend` which defaults to `0` for `nosuspend`.

Each port configuration specifies whether it is a `suspend` or `nosuspend` port. Ports specifying `suspend` in their configuration will cause the runtime to pause early on in the startup path before most runtime subsystems have started. This allows any agent to receive a connection and properly setup before the application startup continues. Since multiple ports can individually request suspension, the `resume` command needs to be sent by each suspended port connection before the runtime resumes execution.

Expand Down
249 changes: 0 additions & 249 deletions documentation/sos-debugging-extension-windows.md

This file was deleted.

272 changes: 0 additions & 272 deletions documentation/sos-debugging-extension.md

This file was deleted.

3 changes: 1 addition & 2 deletions documentation/sos.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ Getting a version of lldb that works for your platform can be a problem sometime

## Using SOS

* [SOS debugging for Linux/MacOS](sos-debugging-extension.md)
* [SOS debugging for Windows](sos-debugging-extension-windows.md)
* [SOS debugging](https://learn.microsoft.com/dotnet/core/diagnostics/sos-debugging-extension)
* [Debugging a core dump](debugging-coredump.md)

## New SOS Features
Expand Down
6 changes: 3 additions & 3 deletions documentation/tutorial/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# .NET Core Diagnostics Overview

With .NET Full running on Windows we have grown accustomed to a plethora of great diagnostics tools ranging from dump generation and manual analysis to more sophisticated collection engines such as DebugDiag. As .NET core is picking up (cross platform) steam what types of diagnostics capabilities are available to us when we need to do production diagnostics? It turns out that a lot of work has been done in this area and specifically .net core 3 promises to bring a wide range of diagnostics capabilities.
With .NET Full running on Windows we have grown accustomed to a plethora of great diagnostics tools ranging from dump generation and manual analysis to more sophisticated collection engines such as DebugDiag. As .NET core is picking up (cross platform) steam what types of diagnostics capabilities are available to us when we need to do production diagnostics? It turns out that a lot of work has been done in this area and specifically .net core 3 promises to bring a wide range of diagnostics capabilities.

To learn more about production diagnostics in .net core 3, we'll be running through a set of diagnostics scenarios using the built in runtime/sdk tools. The walkthroughs are all run on Ubuntu 16.04 and use the latest .net core preview bits.
To learn more about production diagnostics in .net core 3, we'll be running through a set of diagnostics scenarios using the built in runtime/sdk tools. The walkthroughs are all run on Ubuntu 16.04 and use the latest .net core preview bits.

Before we jump in head first, let's take a look at some basic methodologies as it relates to production diagnostics. When an outage occurs in production, typically the first and foremost goal is mitigation. Mitigation typically involves getting the app back up and running as quickly as possible. Common mitigation techniques involve restarting the app or sometimes one or more nodes/servers. While restarting is a quick and effective mitigation technique, root cause of the failure is still expected to be understood and appropriate fix(es) made to avoid future downtime. In order to get to root cause, we need to collect as much diagnostics data as we can prior to executing the mitigation strategy. The diagnostics data collected can then be analyzed postmortem to determine root cause and possible fixes. Each of the scenarios we will explore here will outline what capabilities .net core 3 has in terms of diagnostics data collection and analysis.

Expand Down Expand Up @@ -30,4 +30,4 @@ Please note that you have to be using at least preview 5 for most of the capabil

### [Scenario - App is not responding](hung_app.md)

### Scenario - App is experiencing intermittent exceptions
### [Scenario - App is experiencing intermittent exceptions](intermittent_exceptions.md)
24 changes: 24 additions & 0 deletions documentation/tutorial/intermittent_exceptions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# App is experiencing intermittent exceptions

In this scenario, an ASP.NET application throws intermittent and sporadic exceptions making it challenging to use on demand dump generation tools to capture a dump precisely at the point of the exception being thrown. .NET has the capability to automatically generate dumps when an application exits as a result of an unhandled exception. However, in the case of ASP.NET the ASP.NET runtime catches all exceptions thrown to avoid the application exiting and as such we can't rely on the automatic core dump generation since an exception thrown never becomes unhandled. Fortunately, the Sysinternals ProcDump (v1.4+) for Linux allows you to generate dumps when the application throws any 1st chance exception.
ProcDump for Linux download/installation instructions can be found here - [ProcDump for Linux](https://github.com/Sysinternals/ProcDump-for-Linux)


For example, if we wanted to generate a core dump when an application throws a 1st chance exception, we can use the following:

> ```bash
> sudo procdump -e MyApp
> ```
If we wanted to specify which specific exception to generate a core dump on we can use the -f (filter) switch:

> ```bash
> sudo procdump -e -f System.InvalidOperationException MyApp
> ```
We can comma separate the list of exceptions in the exception filter.


### Performance considerations

ProcDump for Linux implements exception monitoring by using the profiler API. It attaches the profiler to the target process and waits for the exception notifications to arrive and if the filter is satisfied uses the .NET diagnostics pipe to instruct the runtime to generate a dump. Having a profiler attached to a process represents some amount of overhead but unless the application throws a large number of exceptions the overhead should be minimal.
7 changes: 0 additions & 7 deletions eng/AuxMsbuildFiles/SdkPackOverrides.targets
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@
<KnownRuntimePack>
<LatestRuntimeFrameworkVersion Condition="'%(TargetFramework)' == 'net6.0'">$(MicrosoftNETCoreApp60Version)</LatestRuntimeFrameworkVersion>
</KnownRuntimePack>

<KnownFrameworkReference>
<LatestRuntimeFrameworkVersion Condition="'%(TargetFramework)' == 'netcoreapp3.1'">$(MicrosoftNETCoreApp31Version)</LatestRuntimeFrameworkVersion>
</KnownFrameworkReference>
<KnownAppHostPack>
<AppHostPackVersion Condition="'%(TargetFramework)' == 'netcoreapp3.1'">$(MicrosoftNETCoreApp31Version)</AppHostPackVersion>
</KnownAppHostPack>
</ItemGroup>
</Target>
</Project>
13 changes: 7 additions & 6 deletions eng/Build-Native.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ if /i %__BuildCrossArch% EQU 1 (

echo Generating Version Header
set __GenerateVersionLog="%__LogDir%\GenerateVersion.binlog"
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%\eng\common\msbuild.ps1" "%__ProjectDir%\eng\CreateVersionFile.csproj" /bl:!__GenerateVersionLog! /t:GenerateVersionFiles /restore /p:FileVersionFile=%__RootBinDir%\bin\FileVersion.txt /p:GenerateVersionHeader=true /p:NativeVersionHeaderFile=%__ArtifactsIntermediatesDir%\_version.h %__CommonBuildArgs%
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%\eng\common\msbuild.ps1" "%__ProjectDir%\eng\CreateVersionFile.proj" /bl:!__GenerateVersionLog! /t:GenerateVersionFiles /restore /p:FileVersionFile=%__RootBinDir%\bin\FileVersion.txt /p:GenerateVersionHeader=true /p:NativeVersionHeaderFile=%__ArtifactsIntermediatesDir%\_version.h %__CommonBuildArgs%
if not !errorlevel! == 0 (
echo Generate Version Header FAILED
goto ExitWithError
Expand All @@ -194,7 +194,7 @@ if /i %__BuildCrossArch% EQU 1 (
set __ExtraCmakeArgs="-DCLR_MANAGED_BINARY_DIR=!__ManagedBinaryDir!" "-DCLR_BUILD_TYPE=%__BuildType%" "-DCLR_CMAKE_TARGET_ARCH=%__BuildArch%" "-DCMAKE_SYSTEM_VERSION=10.0" "-DNUGET_PACKAGES=%NUGET_PACKAGES:\=/%"

pushd "%__CrossCompIntermediatesDir%"
call "%__ProjectDir%\eng\native\gen-buildsys.cmd" "%__ProjectDir%" "%__CrossCompIntermediatesDir%" %__VSVersion% %__CrossArch% !__ExtraCmakeArgs!
call "%__ProjectDir%\eng\native\gen-buildsys.cmd" "%__ProjectDir%" "%__CrossCompIntermediatesDir%" %__VSVersion% %__CrossArch% %__BuildOS% !__ExtraCmakeArgs!
@if defined _echo @echo on
popd

Expand Down Expand Up @@ -253,7 +253,7 @@ if %__Build% EQU 1 (

echo Generating Version Header
set __GenerateVersionLog="%__LogDir%\GenerateVersion.binlog"
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%\eng\common\msbuild.ps1" "%__ProjectDir%\eng\CreateVersionFile.csproj" /bl:!__GenerateVersionLog! /t:GenerateVersionFiles /restore /p:FileVersionFile=%__RootBinDir%\bin\FileVersion.txt /p:GenerateVersionHeader=true /p:NativeVersionHeaderFile=%__ArtifactsIntermediatesDir%\_version.h %__CommonBuildArgs%
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%\eng\common\msbuild.ps1" "%__ProjectDir%\eng\CreateVersionFile.proj" /bl:!__GenerateVersionLog! /t:GenerateVersionFiles /restore /p:FileVersionFile=%__RootBinDir%\bin\FileVersion.txt /p:GenerateVersionHeader=true /p:NativeVersionHeaderFile=%__ArtifactsIntermediatesDir%\_version.h %__CommonBuildArgs%
if not !errorlevel! == 0 (
echo Generate Version Header FAILED
goto ExitWithError
Expand All @@ -267,7 +267,7 @@ if %__Build% EQU 1 (
set __ExtraCmakeArgs="-DCMAKE_SYSTEM_VERSION=10.0" "-DCLR_MANAGED_BINARY_DIR=!__ManagedBinaryDir!" "-DCLR_BUILD_TYPE=%__BuildType%" "-DCLR_CMAKE_TARGET_ARCH=%__BuildArch%" "-DNUGET_PACKAGES=%NUGET_PACKAGES:\=/%"

pushd "%__IntermediatesDir%"
call "%__ProjectDir%\eng\native\gen-buildsys.cmd" "%__ProjectDir%" "%__IntermediatesDir%" %__VSVersion% %__BuildArch% !__ExtraCmakeArgs!
call "%__ProjectDir%\eng\native\gen-buildsys.cmd" "%__ProjectDir%" "%__IntermediatesDir%" %__VSVersion% %__BuildArch% %__BuildOS% !__ExtraCmakeArgs!
@if defined _echo @echo on
popd

Expand Down Expand Up @@ -296,8 +296,9 @@ if %__Build% EQU 1 (

REM Copy the native SOS binaries to where these tools expect for CI & VS testing

set "__dotnet_sos=%__RootBinDir%\bin\dotnet-sos\%__BuildType%\netcoreapp3.1"
set "__dotnet_dump=%__RootBinDir%\bin\dotnet-dump\%__BuildType%\netcoreapp3.1"
set "__targetRid=net6.0"
set "__dotnet_sos=%__RootBinDir%\bin\dotnet-sos\%__BuildType%\%__targetRid%"
set "__dotnet_dump=%__RootBinDir%\bin\dotnet-dump\%__BuildType%\%__targetRid%"
mkdir %__dotnet_sos%\win-%__BuildArch%
mkdir %__dotnet_sos%\publish\win-%__BuildArch%
mkdir %__dotnet_dump%\win-%__BuildArch%
Expand Down
8 changes: 0 additions & 8 deletions eng/CleanupPrivateBuild.csproj

This file was deleted.

9 changes: 9 additions & 0 deletions eng/CleanupPrivateBuild.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.Build.NoTargets">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<SkipGetTargetFrameworkProperties>false</SkipGetTargetFrameworkProperties>
</PropertyGroup>

<Import Project="$(RepositoryEngineeringDir)\InstallRuntimes.proj" />
</Project>
8 changes: 5 additions & 3 deletions eng/CreateVersionFile.csproj → eng/CreateVersionFile.proj
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<!-- All Rights Reserved. Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.Build.NoTargets">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<SkipGetTargetFrameworkProperties>false</SkipGetTargetFrameworkProperties>
</PropertyGroup>

<Target Name="GenerateVersionFiles" DependsOnTargets="GenerateVersionHeader;GenerateVersionSourceFile" />

Expand Down
6 changes: 1 addition & 5 deletions eng/InstallRuntimes.proj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
$(MicrosoftAspNetCoreAppRefVersion) - latest dotnet aspnetcore stable version (the version that actually is installed)
$(MicrosoftNETCoreApp60Version) $(MicrosoftAspNetCoreApp60Version) - 6.0 version
$(MicrosoftNETCoreApp31Version) $(MicrosoftAspNetCoreApp31Version) - 3.1 version
$(SingleFileRuntimeLatestVersion) - The latest version of the runtime used to build single-file apps
$(SingleFileRuntime60Version) - The 6.0.x version of the runtime used to build single-file apps
Expand Down Expand Up @@ -86,7 +85,6 @@
<ItemGroup Condition="!$(InternalReleaseTesting) and !$(PrivateBuildTesting)">
<TestVersions Include="Latest" RuntimeVersion="$(VSRedistCommonNetCoreSharedFrameworkx6470Version)" AspNetVersion="$(MicrosoftAspNetCoreAppRefInternalVersion)" />
<TestVersions Include="60" RuntimeVersion="$(MicrosoftNETCoreApp60Version)" AspNetVersion="$(MicrosoftAspNetCoreApp60Version)" />
<TestVersions Include="31" RuntimeVersion="$(MicrosoftNETCoreApp31Version)" AspNetVersion="$(MicrosoftAspNetCoreApp31Version)" Condition="$(Enable31Testing)" />
</ItemGroup>

<!-- Local private build testing -->
Expand Down Expand Up @@ -153,11 +151,9 @@
Outputs="$(TestConfigFileName)">

<PropertyGroup Condition="'$(PrivateBuildTesting)' != 'true' AND '$(InternalReleaseTesting)' != 'true'">
<RuntimeVersion31 Condition="$(Enable31Testing)">$(MicrosoftNETCoreApp31Version)</RuntimeVersion31>
<AspNetCoreVersion31 Condition="$(Enable31Testing)">$(MicrosoftAspNetCoreApp31Version)</AspNetCoreVersion31>

<RuntimeVersion60>$(MicrosoftNETCoreApp60Version)</RuntimeVersion60>
<AspNetCoreVersion60>$(MicrosoftAspNetCoreApp60Version)</AspNetCoreVersion60>
<!-- TODO: Add others -->
</PropertyGroup>

<PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions eng/SourceBuildPrebuiltBaseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<UsageData>
<IgnorePatterns>
<UsagePattern IdentityGlob="*/*" />
<UsagePattern IdentityGlob="Microsoft.SourceBuild.Intermediate.*" />
</IgnorePatterns>
</UsageData>
</UsageData>
35 changes: 20 additions & 15 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,36 +1,31 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.SymbolStore" Version="1.0.357801">
<Dependency Name="Microsoft.SymbolStore" Version="1.0.408101">
<Uri>https://github.com/dotnet/symstore</Uri>
<Sha>46033d5bdad3149da529dadb21be3a1f48db5d93</Sha>
<Sha>117c711598f1cc144e0c9d82c4e9f78638e0315d</Sha>
</Dependency>
<Dependency Name="Microsoft.Diagnostics.Runtime" Version="2.2.332302">
<Dependency Name="Microsoft.Diagnostics.Runtime" Version="2.3.408001">
<Uri>https://github.com/microsoft/clrmd</Uri>
<Sha>877b2d049d5ff5c5b4182606e397b6c92de090f6</Sha>
<Sha>2cb33315a52ca3f542c9a66e3ca84c1740d21d1a</Sha>
</Dependency>
<Dependency Name="Microsoft.Diagnostics.Runtime.Utilities" Version="2.0.325901">
<Dependency Name="Microsoft.Diagnostics.Runtime.Utilities" Version="2.3.408001">
<Uri>https://github.com/microsoft/clrmd</Uri>
<Sha>a64d9ac11086f28fbd4b2b2337c19be7826fbfa9</Sha>
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="8.0.0-alpha.1.22580.1">
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
<Sha>4ed7440e89d5fe7d4375102a441c713fadd5357c</Sha>
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
<Sha>2cb33315a52ca3f542c9a66e3ca84c1740d21d1a</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.22575.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.22630.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>b61fcdfe86b30fe91898bfb296f4f4396fe5d87a</Sha>
<Sha>e82404fca08383513e0b0b3c5308d4a9b18b7c7a</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="7.0.0-beta.22316.2" Pinned="true">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>ccfe6da198c5f05534863bbb1bff66e830e0c6ab</Sha>
</Dependency>
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="7.0.101-servicing.22571.1">
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="7.0.103-servicing.23073.22">
<Uri>https://github.com/dotnet/installer</Uri>
<Sha>d02d33e069bf59d00b6374e304d39d6ceb20e18a</Sha>
<Sha>e36f7f3feaa561782a66165b8db55f4c0bbdf963</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.App.Ref.Internal" Version="7.0.0-rtm.22513.7">
<Uri>https://github.com/dotnet/aspnetcore</Uri>
Expand All @@ -48,5 +43,15 @@
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>cd2d83798383716204eb580eb5c89ef5b73b8ec2</Sha>
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="8.0.0-alpha.1.23076.1">
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
<Sha>d114eecff6c3149a55cb643fba6c4e7580b9f0b7</Sha>
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceLink.GitHub" Version="1.2.0-beta-22518-02" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
<Uri>https://github.com/dotnet/sourcelink</Uri>
<Sha>d047202874ad79d72c75b6354c0f8a9a12d1b054</Sha>
<SourceBuild RepoName="sourcelink" ManagedOnly="true" />
</Dependency>
</ToolsetDependencies>
</Dependencies>

0 comments on commit f993832

Please sign in to comment.