Update 2.1 to 3.1 netcoreapp in diagnostic repo documentation (#2706)
authorTom McDonald <tommcdon@microsoft.com>
Tue, 26 Oct 2021 22:54:12 +0000 (15:54 -0700)
committerGitHub <noreply@github.com>
Tue, 26 Oct 2021 22:54:12 +0000 (15:54 -0700)
* Update 2.1 to 3.1 netcoreapp in diagnostic repo documentation
Completes #1640

* Update a few instances of 2.1 I missed in the first commit

* Remove .NET version specific info in README.md

Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
README.md
documentation/dotnet-dump-instructions.md
documentation/installing-sos-instructions.md
documentation/installing-sos-windows-instructions.md
documentation/sos-debugging-extension-windows.md
documentation/sos-debugging-extension.md
documentation/tutorial/hung_app.md

index 5926f10b513ac877f10fd1b24424b439cc4b84ef..28b4412e512e165084bf8fa7bb53b2b3d51d078e 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 .NET Core Diagnostics Repo
 ==========================
 
-This repository contains the source code for various .NET Core runtime diagnostic tools. It currently contains SOS, the managed portion of SOS, the lldb SOS plugin and various global diagnostic tools. The goals of this repo is to build SOS and the lldb SOS plugin for the portable (glibc based) Linux platform (Centos 7) and the platforms not supported by the portable (musl based) build (Centos 6, Alpine, and macOS) and to test across various indexes in a very large matrix: OSs/distros (Centos 6/7, Ubuntu, Alpine, Fedora, Debian, RHEL 7.2), architectures (x64, x86, arm, arm64), lldb versions (3.9 to 9.0) and .NET Core versions (2.1, 3.1, 5.0.x).
+This repository contains the source code for various .NET Core runtime diagnostic tools. It currently contains SOS, the managed portion of SOS, the lldb SOS plugin and various global diagnostic tools. The goals of this repo is to build SOS and the lldb SOS plugin for the portable (glibc based) Linux platform (Centos 7) and the platforms not supported by the portable (musl based) build (Centos 6, Alpine, and macOS) and to test across various indexes in a very large matrix: OSs/distros (Centos 6/7, Ubuntu, Alpine, Fedora, Debian, RHEL 7.2), architectures (x64, x86, arm, arm64), lldb versions (3.9 to 9.0) and .NET Core (all in-development and supported major versions).
 
 Another goal to make it easier to obtain a version of lldb (currently 3.9) with scripts and documentation for platforms/distros like Centos, Alpine, Fedora, etc. that by default provide really old versions.
 
index 5043e8e3539c54aee1ec945d56dfff428e846df0..c75ac8a606bd5bdc82affcb020b925397b579584 100644 (file)
@@ -21,7 +21,7 @@ Here's a table showing how dotnet-dump fits into your dump debugging options:
 
 ## Installing dotnet-dump
 
-The first step is to install the dotnet-dump CLI global tool. This requires at least the 2.1 or greater .NET Core SDK to be installed. If you see the error message `Tool 'dotnet-dump' is already installed`, you will need to uninstall the global tool (see below). 
+The first step is to install the dotnet-dump CLI global tool. This requires at least the 3.1 or greater .NET Core SDK to be installed. If you see the error message `Tool 'dotnet-dump' is already installed`, you will need to uninstall the global tool (see below). 
 
     $ dotnet tool install -g dotnet-dump
     You can invoke the tool using the following command: dotnet-dump
index bb6a1660ee6190c50922ae805d971df208c0289c..4db1420e3268b62ac8c4f33e31b230895605bad4 100644 (file)
@@ -1,7 +1,7 @@
 Installing SOS on Linux and MacOS
 =================================
 
-The first step is to install the dotnet-sos CLI global tool. This requires at least the 2.1 or greater .NET Core SDK to be installed. If you see the error message `Tool 'dotnet-sos' is already installed`, you will need to uninstall the global tool (see below). 
+The first step is to install the dotnet-sos CLI global tool. This requires at least the 3.1 or greater .NET Core SDK to be installed. If you see the error message `Tool 'dotnet-sos' is already installed`, you will need to uninstall the global tool (see below). 
 
     $ dotnet tool install -g dotnet-sos
     You can invoke the tool using the following command: dotnet-sos
@@ -10,7 +10,7 @@ The first step is to install the dotnet-sos CLI global tool. This requires at le
 The next step is use this global tool to install SOS. 
 
     $ dotnet-sos install
-    Installing SOS to /home/mikem/.dotnet/sos from /home/mikem/.dotnet/tools/.store/dotnet-sos/3.0.47001/dotnet-sos/3.0.47001/tools/netcoreapp2.1/any/linux-x64
+    Installing SOS to /home/mikem/.dotnet/sos from /home/mikem/.dotnet/tools/.store/dotnet-sos/5.0.251802/dotnet-sos/5.0.251802/tools/netcoreapp3.1/any/linux-x64
     Creating installation directory...
     Copying files...
     Updating existing /home/mikem/.lldbinit file - LLDB will load SOS automatically at startup
@@ -72,7 +72,7 @@ Now any time you run lldb, SOS will automatically be loaded and the symbol downl
 The installer needs to be run again:
 
     $ dotnet-sos install
-    Installing SOS to /home/mikem/.dotnet/sos from /home/mikem/.dotnet/tools/.store/dotnet-sos/3.0.47001/dotnet-sos/3.0.47001/tools/netcoreapp2.1/any/linux-x64
+    Installing SOS to /home/mikem/.dotnet/sos from /home/mikem/.dotnet/tools/.store/dotnet-sos/5.0.251802/dotnet-sos/5.0.251802/tools/netcoreapp3.1/any/linux-x64
     Installing over existing installation...
     Creating installation directory...
     Copying files...
index 13511dfcfc2327c3f8e8dfb37b4302c84cf5cc96..cbde73e79e3f17fbac6e5e668ae5a20b9b7861b1 100644 (file)
@@ -18,7 +18,7 @@ To install the latest released SOS manually, use the dotnet-sos CLI global tool.
 Run the installer:
 
     C:\Users\mikem>dotnet-sos install
-    Installing SOS to C:\Users\mikem\.dotnet\sos from C:\Users\mikem\.dotnet\tools\.store\dotnet-sos\5.0.160202\dotnet-sos\5.0.160202\tools\netcoreapp2.1\any\win-x64
+    Installing SOS to C:\Users\mikem\.dotnet\sos from C:\Users\mikem\.dotnet\tools\.store\dotnet-sos\5.0.251802\dotnet-sos\5.0.251802\tools\netcoreapp3.1\any\win-x64
     Installing over existing installation...
     Creating installation directory...
     Copying files...
@@ -70,9 +70,9 @@ The latest released version of SOS will automatically be loaded from the interna
 
     0:000> sxe ld coreclr
     0:000> g
-    ModLoad: 00007ffe`e9100000 00007ffe`e9165000   C:\Program Files\dotnet\host\fxr\2.2.2\hostfxr.dll
-    ModLoad: 00007ffe`e7ba0000 00007ffe`e7c32000   C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.6\hostpolicy.dll
-    ModLoad: 00007ffe`abb60000 00007ffe`ac125000   C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.6\coreclr.dll
+    ModLoad: 00007ffe`e9100000 00007ffe`e9165000   C:\Program Files\dotnet\host\fxr\3.0.3\hostfxr.dll
+    ModLoad: 00007ffe`e7ba0000 00007ffe`e7c32000   C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.20\hostpolicy.dll
+    ModLoad: 00007ffe`abb60000 00007ffe`ac125000   C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.20\coreclr.dll
     ntdll!ZwMapViewOfSection+0x14:
     00007fff`16e2fb74 c3              ret
     0:000> .chain
index 9ff741b7d6fc7d82fd3115eafb15031b97a4670b..6fc8785afd94d187eb98efc907d279015d337cbf 100644 (file)
@@ -123,7 +123,7 @@ Type `!help <functionname>` for detailed info on that function.
 |**SaveModule** \<*Base address*> \<*Filename*>|Writes an image, which is loaded in memory at the specified address, to the specified file.|
 |**SOSFlush**|Flushes an internal SOS cache.|
 |**SOSStatus** [**-netfx**] [**-netcore**] [**-reset**]|Display internal SOS status, reset the internal cached state, or change between the desktop .NET framework or .NET Core runtimes when both are loaded in the process or dump.<br/><br/>-netfx   - switch to the desktop .NET Framework runtime if loaded.<br/>-netcore - switch to the .NET Core runtime if loaded.<br/>-reset   - reset all the cached internal SOS state.<br/><br/>|
-|**SetHostRuntime** [**-netcore**] [**-netfx**] [\<runtime-directory\>]|This command controls the runtime that is used to host the maanged code that runs as part of SOS in the debugger (cdb/windbg). The default is the desktop .NET Framework. The "-netcore" option allows the installed .NET Core runtime be used. The "-netfx" option allows switches back to the .NET Framework runtime.<br/><br/>Normally, SOS attempts to find an installed .NET Core runtime to run its managed code automatically but this command is available if it fails. The default is to use the same runtime (libcoreclr) being debugged. Use this command if the default runtime being debugged isn't working enough to run the SOS code or if the version is less than 2.1.0.<br/><br/>If you received the following error message when running a SOS command, use this command to set the path to 2.1.0 or greater .NET Core runtime. <br/><br/>`(lldb) clrstack`<br/>`Error: Fail to initialize CoreCLR 80004005 ClrStack failed`<br/><br/>`(lldb) sethostruntime /usr/share/dotnet/shared/Microsoft.NETCore.App/2.1.6`<br/><br/>You can use the "dotnet --info" in a command shell to find the path of an installed .NET Core runtime.|
+|**SetHostRuntime** [**-netcore**] [**-netfx**] [\<runtime-directory\>]|This command controls the runtime that is used to host the maanged code that runs as part of SOS in the debugger (cdb/windbg). The default is the desktop .NET Framework. The "-netcore" option allows the installed .NET Core runtime be used. The "-netfx" option allows switches back to the .NET Framework runtime.<br/><br/>Normally, SOS attempts to find an installed .NET Core runtime to run its managed code automatically but this command is available if it fails. The default is to use the same runtime (libcoreclr) being debugged. Use this command if the default runtime being debugged isn't working enough to run the SOS code or if the version is less than 3.1.<br/><br/>If you received the following error message when running a SOS command, use this command to set the path to 3.1 or greater .NET Core runtime. <br/><br/>`(lldb) clrstack`<br/>`Error: Fail to initialize CoreCLR 80004005 ClrStack failed`<br/><br/>`(lldb) sethostruntime /usr/share/dotnet/shared/Microsoft.NETCore.App/3.1.20`<br/><br/>You can use the "dotnet --info" in a command shell to find the path of an installed .NET Core runtime.|
 |**StopOnException** [**-derived**] [**-create** &#124; **-create2**] \<*Exception*> \<*Pseudo-register number*>|Causes the debugger to stop when the specified exception is thrown, but to continue running when other exceptions are thrown.<br /><br /> The **-derived** option catches the specified exception and every exception that derives from the specified exception.|
 |**SyncBlk** [**-all** &#124; \<*syncblk number*>]|Displays the specified `SyncBlock` structure or all `SyncBlock` structures.  If you do not pass any arguments, the **SyncBlk** command displays the `SyncBlock` structure corresponding to objects that are owned by a thread.<br /><br /> A `SyncBlock` structure is a container for extra information that does not need to be created for every object. It can hold COM interop data, hash codes, and locking information for thread-safe operations.|
 |**ThreadPool**|Displays information about the managed thread pool, including the number of work requests in the queue, the number of completion port threads, and the number of timers.|
index 5c4628fe79dcd7e106ee002fe4b4acab35a5cd0d..cda591f82c348479f165191c528f9900211148ac 100644 (file)
@@ -113,7 +113,7 @@ importance. Shortcut names for popular functions are listed in parenthesis. Type
 |**SyncBlk** [**-all** &#124; \<*syncblk number*>]|Displays the specified `SyncBlock` structure or all `SyncBlock` structures.  If you do not pass any arguments, the **SyncBlk** command displays the `SyncBlock` structure corresponding to objects that are owned by a thread.<br /><br /> A `SyncBlock` structure is a container for extra information that does not need to be created for every object. It can hold COM interop data, hash codes, and locking information for thread-safe operations.|
 |**SOSFlush**|Flushes an internal SOS cache.|
 |**SOSStatus** [**-reset**]|Displays internal SOS status or reset the internal cached state.|
-|**SetHostRuntime** [\<runtime-directory\>]|This command sets the path to the .NET Core runtime to use to host the managed code that runs as part of SOS in the debugger (lldb). The runtime needs to be at least version 2.1.0 or greater. If there are spaces in directory, it needs to be single-quoted (').<br/><br/>Normally, SOS attempts to find an installed .NET Core runtime to run its managed code automatically but this command is available if it fails. The default is to use the same runtime (libcoreclr) being debugged. Use this command if the default runtime being debugged isn't working enough to run the SOS code or if the version is less than 2.1.0.<br/><br/>If you received the following error message when running a SOS command, use this command to set the path to 2.1.0 or greater .NET Core runtime. <br/><br/>`(lldb) clrstack`<br/>`Error: Fail to initialize CoreCLR 80004005 ClrStack failed`<br/><br/>`(lldb) sethostruntime /usr/share/dotnet/shared/Microsoft.NETCore.App/2.1.6`<br/><br/>You can use the "dotnet --info" in a command shell to find the path of an installed .NET Core runtime.|
+|**SetHostRuntime** [\<runtime-directory\>]|This command sets the path to the .NET Core runtime to use to host the managed code that runs as part of SOS in the debugger (lldb). The runtime needs to be at least version 3.1 or greater. If there are spaces in directory, it needs to be single-quoted (').<br/><br/>Normally, SOS attempts to find an installed .NET Core runtime to run its managed code automatically but this command is available if it fails. The default is to use the same runtime (libcoreclr) being debugged. Use this command if the default runtime being debugged isn't working enough to run the SOS code or if the version is less than 3.1.<br/><br/>If you received the following error message when running a SOS command, use this command to set the path to 3.1 or greater .NET Core runtime. <br/><br/>`(lldb) clrstack`<br/>`Error: Fail to initialize CoreCLR 80004005 ClrStack failed`<br/><br/>`(lldb) sethostruntime /usr/share/dotnet/shared/Microsoft.NETCore.App/3.1.20`<br/><br/>You can use the "dotnet --info" in a command shell to find the path of an installed .NET Core runtime.|
 |**SetSymbolServer** [**-ms**] [**-disable**] [**-log**] [**-loadsymbols**] [**-cache** \<cache-path>] [**-directory** \<search-directory>] [**-sympath** \<windows-symbol-path>] [\<symbol-server-URL>]|Enables the symbol server downloading support.<br/><br/>The **-ms** option enables downloading from the public Microsoft symbol server.<br/><br/>The **-disable** option turns on the symbol download support.<br/><br/>The **-cache** \<cache-path> option specifies a symbol cache directory. The default is $HOME/.dotnet/symbolcache if not specified.<br/><br/>The **-directory** option add a path to search for symbols. Can be more than one.<br/><br/>The **-sympath** option adds server, cache and directory paths in the Windows symbol path format.<br/><br/>The **-log** option enables symbol download logging.<br/><br/>The **-loadsymbols** option attempts to download the native .NET Core symbols for the runtime.|
 |**Token2EE** \<*module name*> \<*token*>|Turns the specified metadata token in the specified module into a `MethodTable` structure or `MethodDesc` structure.<br /><br /> You can pass `*` for the module name parameter to find what that token maps to in every loaded managed module. You can also pass the debugger's name for a module, such as `mscorlib` or `image00400000`.|
 |**Threads** (**clrthreads**) [**-live**] [**-special**]|Displays all managed threads in the process.<br /><br /> The **Threads** command displays the debugger shorthand ID, the CLR thread ID, and the operating system thread ID.  Additionally, the **Threads** command displays a Domain column that indicates the application domain in which a thread is executing, an APT column that displays the COM apartment mode, and an Exception column that displays the last exception thrown in the thread.<br /><br /> The **-live** option displays threads associated with a live thread.<br /><br /> The **-special** option displays all special threads created by the CLR. Special threads include garbage collection threads (in concurrent and server garbage collection), debugger helper threads, finalizer threads, <xref:System.AppDomain> unload threads, and thread pool timer threads.|
index 52a8928ed419a82fb6c3a7aecc627cb783be810c..a4fa89f39068cdb440ef58f1794f86b63913bce0 100644 (file)
@@ -330,7 +330,7 @@ Lastly, the code prints out the dictionary allowing us to see the duplicate call
 Build the dotnet-dump tool (dotnet build) and run it from the following location on the same dump that we generated earlier:
 
 ```bash
-~/diagnostics/artifacts/bin/dotnet-dump/Debug/netcoreapp2.1/publish/dotnet dotnet-dump.dll analyze ~/.dotnet/tools/core_20190513_143916
+~/diagnostics/artifacts/bin/dotnet-dump/Debug/netcoreapp3.1/publish/dotnet dotnet-dump.dll analyze ~/.dotnet/tools/core_20190513_143916
 ```
 
 You can now use the 'uniquestacks' command and see the following output (partial):