Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet-dump should show error message for OS errors #2976

Closed
danmoseley opened this issue Apr 4, 2022 · 0 comments
Closed

dotnet-dump should show error message for OS errors #2976

danmoseley opened this issue Apr 4, 2022 · 0 comments
Assignees
Labels
dotnet-dump enhancement New feature or request
Milestone

Comments

@danmoseley
Copy link
Member

As a minor issue, it would be an improvement if dotnet-dump would include the message string when there's an error from a system API. This string can be gotten with new Win32Exception(err).Message

C:\Users\dan>dotnet-dump collect -p 832

Writing full to C:\Users\dan\dump_20220404_115922.dmp
Invalid process id 832 error: 5

C:\Users\dan>net helpmsg 5

Access is denied.
@hoyosjs hoyosjs added enhancement New feature or request dotnet-dump labels Apr 4, 2022
@mikem8361 mikem8361 self-assigned this Apr 5, 2022
@mikem8361 mikem8361 added this to the .NET 7.0 milestone Apr 5, 2022
mikem8361 added a commit to mikem8361/diagnostics that referenced this issue May 20, 2022
mikem8361 added a commit that referenced this issue May 24, 2022
Add error message to WriteDump response

Add the new generate core dump command that can receive error text on failure.

Fix issue #2976
mikem8361 added a commit that referenced this issue Jun 1, 2022
* Update dependencies from https://github.com/dotnet/aspnetcore build 20220406.3 (#2990)

[main] Update dependencies from dotnet/aspnetcore

* Update dependencies from https://github.com/dotnet/runtime build 20220406.5 (#2991)

[main] Update dependencies from dotnet/runtime

* Set the build ID using arcade's scripts instead of retrieving it from another job (#2993)

* Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20220328.1 (#2967)

[main] Update dependencies from dotnet/source-build-reference-packages

* Update dependencies from https://github.com/dotnet/arcade build 20220406.10 (#3000)

[main] Update dependencies from dotnet/arcade

* Update dependencies from https://github.com/dotnet/symstore build 20220410.1 (#3002)

Microsoft.SymbolStore
 From Version 1.0.320401 -> To Version 1.0.321001

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>

* Update dependencies from https://github.com/dotnet/installer build 20220410.6 (#3001)

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.104-servicing.22181.15 -> To Version 6.0.104-servicing.22210.6

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>

* Update dependencies from https://github.com/dotnet/symstore build 20220411.1 (#3007)

[main] Update dependencies from dotnet/symstore

* Update dependencies from https://github.com/dotnet/aspnetcore build 20220411.2 (#3006)

[main] Update dependencies from dotnet/aspnetcore

* Update dependencies from https://github.com/dotnet/runtime build 20220411.4 (#3008)

[main] Update dependencies from dotnet/runtime

* Update dependencies from https://github.com/dotnet/runtime build 20220412.7 (#3011)

[main] Update dependencies from dotnet/runtime

* Update dependencies from https://github.com/dotnet/symstore build 20220412.1 (#3010)

[main] Update dependencies from dotnet/symstore

* Rewrite DumpAsync in C# (#2964)

* Rewrite DumpAsync in C#

This rewrites the dumpasync command as a C# SOS extension.  Doing so makes the code easier to maintain and add features to in the future.  Along with the rewrite, a variety of requests for the feature have been satisfied:
- Added a "coalesced stacks" view (`--coalesce`) that coalesces stacks together to create a high-level view of the state of the process
- Improved filtering so that a specified filter (address, method table, substring) applies to any frame of a stack and not just to the top frame
- Improved stack stitching to always consider task objects from the heap and not just if `--tasks` was specified.  This helps to better connect state machines separated by constructs like Task.Run.
- Added synthesized frames to try to show what's being awaited in the case where the top frame is an async method.
- Added DML links for more things to better navigate through results.

* Fix tests

* Fix tests for DumpAsync on WebApp3

* Skip visiting tasks multiple times

* Special case completion sentinnel

* Only synthesize faux awaiter frame if the task is not completed.

* PR feedback

Co-authored-by: Juan Sebastian Hoyos Ayala <[email protected]>

* Update dependencies from https://github.com/dotnet/runtime build 20220413.11 (#3014)

Microsoft.NETCore.App.Runtime.win-x64 , VS.Redist.Common.NetCore.SharedFramework.x64.6.0
 From Version 6.0.5 -> To Version 6.0.5

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>

* Update dependencies from https://github.com/dotnet/aspnetcore build 20220413.12 (#3013)

[main] Update dependencies from dotnet/aspnetcore

* Use symstore retry changes in tests (#2968)

* Create clear error messages for dotnet-trace (#3012)

* Catch UnauthorizedAccessException, Win32Exception and simplify for loop

* altered to conventional C# style

* Set symstore HTTP retry count in all test cases (#3015)

* Set symstore HTTP retry count in all test cases

* Update src/Microsoft.Diagnostics.DebugServices/ISymbolService.cs

Co-authored-by: Juan Hoyos <[email protected]>

* Code review feedback

Co-authored-by: Juan Hoyos <[email protected]>

* Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20220415.1 (#3016)

[main] Update dependencies from dotnet/source-build-reference-packages

* Update dependencies from https://github.com/dotnet/arcade build 20220415.2 (#3017)

[main] Update dependencies from dotnet/arcade

* Update lldb instuctions (#3020)

Mostly just delete distro versions that are not supported for any supported .NET version.

* Use minipal in more places (#3019)

* Port minipal/getexepath.h from runtime repo

* Use ARRAY_SIZE from minipal in more places

* Fix C4996 warning on windows

* Introspect sys/auxv.h in SOS configuration

* Fix include

* [main] Update dependencies from dotnet/installer (#3018)

* Update dependencies from https://github.com/dotnet/installer build 20220415.3

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.104-servicing.22210.6 -> To Version 6.0.105-servicing.22215.3

* Fix single-file runtime version

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Mike McLaughlin <[email protected]>

* Update dependencies from https://github.com/dotnet/symstore build 20220418.1 (#3022)

[main] Update dependencies from dotnet/symstore

* Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20220419.2 (#3023)

[main] Update dependencies from dotnet/source-build-reference-packages

* Create EventPipeFormat.md (#3024)

* Update dependencies from https://github.com/dotnet/arcade build 20220422.4 (#3027)

[main] Update dependencies from dotnet/arcade

* Update dependencies from https://github.com/dotnet/installer build 20220419.37 (#3028)

[main] Update dependencies from dotnet/installer

* dotent-trace report - account for missing symbol (#3021)

* Update dependencies from https://github.com/microsoft/clrmd build 20220426.1 (#3035)

[main] Update dependencies from microsoft/clrmd

* Write temp files to tempdir (#3031)

* update to use viewport-relative coordinates (#3034)

This fixes some rendering issues of dontet-counters, however, dotnet-counters renders incorrectly when: 
- terminal changes size while the tool is running
- terminal is not wide enough to print the output

As noted in #3036

* Update dependencies from https://github.com/dotnet/installer build 20220429.9 (#3038)

[main] Update dependencies from dotnet/installer

* Update dependencies from https://github.com/dotnet/arcade build 20220425.6 (#3037)

[main] Update dependencies from dotnet/arcade

* Update dependencies from https://github.com/dotnet/symstore build 20220502.1 (#3040)

[main] Update dependencies from dotnet/symstore

* Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20220503.1 (#3043)

[main] Update dependencies from dotnet/source-build-reference-packages

* Update dependencies from https://github.com/dotnet/aspnetcore build 20220503.6 (#3041)

[main] Update dependencies from dotnet/aspnetcore

* Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20220504.3 (#3045)

[main] Update dependencies from dotnet/source-build-reference-packages

* Update dependencies from https://github.com/dotnet/aspnetcore build 20220504.26 (#3044)

[main] Update dependencies from dotnet/aspnetcore

* Update dependencies from https://github.com/dotnet/aspnetcore build 20220505.18 (#3046)

[main] Update dependencies from dotnet/aspnetcore

* Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20220505.1 (#3048)

[main] Update dependencies from dotnet/source-build-reference-packages

* Update dependencies from https://github.com/microsoft/clrmd build 20220505.1 (#3047)

[main] Update dependencies from microsoft/clrmd

* Update EventPipeStress (#3049)

* Update dependencies from https://github.com/dotnet/arcade build 20220505.2 (#3052)

[main] Update dependencies from dotnet/arcade

* Update dependencies from https://github.com/dotnet/installer build 20220504.12 (#3053)

[main] Update dependencies from dotnet/installer

* Update dependencies from https://github.com/microsoft/clrmd build 20220509.1 (#3056)

[main] Update dependencies from microsoft/clrmd

* Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20220509.4 (#3058)

[main] Update dependencies from dotnet/source-build-reference-packages

* Update dependencies from https://github.com/dotnet/symstore build 20220509.1 (#3057)

[main] Update dependencies from dotnet/symstore

* Update dependencies from https://github.com/dotnet/aspnetcore build 20220509.8 (#3055)

[main] Update dependencies from dotnet/aspnetcore

* Port setsymbolserver command to C# (#3050)

* Port setsymbolserver command to C#

Fixes issue: #3032

Removes quite a bit of native and interop code.

Remove some noisy logging in success paths.

Rename ISymbolService.DownloadModule to DownloadModuleFile. Add ISymbolService.DownloadSymbolFile.

Rename some IModule properties to functions. Add IModule.LoadSymbols().

Fix MacOS test failures

Make setsymbolserver a global command

* Update dependencies from https://github.com/dotnet/aspnetcore build 20220510.8 (#3063)

[main] Update dependencies from dotnet/aspnetcore

* Enable SDL required warnings explicitly (#3054)

* Enable SDL required warnings explicitly
* Fix build issues that don't escape on failure properly

* Add devcontainer infra to diagnostics repo (#2986)

* Pass by reference (#3066)

* Update dependencies from https://github.com/dotnet/aspnetcore build 20220512.8 (#3070)

[main] Update dependencies from dotnet/aspnetcore

* Fix Typo (#3071)

* Misc dbgshim and SOS fixes (#3072)

* Fix some issues found with netcoredbg

* Fix some sign-extension issues on alpine arm32

* Fix DbgShim.UnitTest's Microsoft.Diagnostics.DbgShimAPI+NativeRuntimeStartupCallbackDelegate being called after collected by the GC

* Code review feedback

* [main] Update dependencies from dotnet/installer (#3076)

[main] Update dependencies from dotnet/installer


 - Update single-file version

* Update dependencies from https://github.com/dotnet/symstore build 20220516.1 (#3079)

[main] Update dependencies from dotnet/symstore

* Update dependencies from https://github.com/dotnet/arcade build 20220512.8 (#3075)

[main] Update dependencies from dotnet/arcade

* Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20220511.1 (#3068)

[main] Update dependencies from dotnet/source-build-reference-packages

* Update dependencies from https://github.com/dotnet/arcade build 20220519.3 (#3086)

[main] Update dependencies from dotnet/arcade

* Enable shipping dbgshim packages (#3088)

* Add error message to WriteDump response (#3084)

Add error message to WriteDump response

Add the new generate core dump command that can receive error text on failure.

Fix issue #2976

* Use Environment.GetFolderPath to obtain home directory (#3087)

* Use Environment.GetFolderPath to obtain home directory

* Format documents in changeset

* Update dependencies from https://github.com/dotnet/symstore build 20220523.1 (#3091)

[main] Update dependencies from dotnet/symstore

* Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20220520.1 (#3085)

[main] Update dependencies from dotnet/source-build-reference-packages

* SOS fixes for regions (#3062)

Noticed that DacpHeapSegmentData::Request doesn't set the highAllocMark for regions correctly, and that we haven't fixed GCHeapSnapshot::GetGeneration for regions yet.

Moved fix for highAllocMark into the DAC, but keep some logic here so things work correctly for older DACs with segments.

Fix more places where we need to use highAllocMark.

Kudos to @cshung for pointing out the better way to fix this!

* Update dependencies from https://github.com/dotnet/arcade build 20220526.1 (#3096)

[main] Update dependencies from dotnet/arcade

* Update dependencies from https://github.com/dotnet/installer build 20220527.1 (#3097)

[main] Update dependencies from dotnet/installer

* Update dependencies from https://github.com/dotnet/symstore build 20220530.1 (#3098)

[main] Update dependencies from dotnet/symstore

* Fix dbgshim's OpenVirtualProcess on windows arm64 (#3099)

Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Juan Hoyos <[email protected]>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Stephen Toub <[email protected]>
Co-authored-by: Juan Sebastian Hoyos Ayala <[email protected]>
Co-authored-by: mikelle-rogers <[email protected]>
Co-authored-by: Dan Moseley <[email protected]>
Co-authored-by: Adeel Mujahid <[email protected]>
Co-authored-by: John Salem <[email protected]>
Co-authored-by: Andrew Au <[email protected]>
Co-authored-by: Martin-Molinero <[email protected]>
Co-authored-by: Peter Sollich <[email protected]>
@ghost ghost locked as resolved and limited conversation to collaborators Jun 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dotnet-dump enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants