Skip to content

dotnet dump creates empty file for process not running managed code #3064

Closed

Description

@danmoseley

A nit, but it would be more helpful to error with "Process {pid} is not executing managed code." or something similar.

C:\temp> notepad

C:\temp>dotnet dump collect -p 636

Writing full to C:\temp\dump_20220511_104610.dmp
Complete

C:\temp>dir *4610*
 Volume in drive C has no label.
 Volume Serial Number is 28B3-5CB5

 Directory of C:\temp

05/11/2022  10:46 AM                 0 dump_20220511_104610.dmp
               1 File(s)              0 bytes
               0 Dir(s)  98,358,513,664 bytes free

Activity

  1. self-assigned this
    on May 11, 2022
  2. added this to the 7.0.0 milestone on May 11, 2022
  3. mikem8361 commented on May 11, 2022

    @mikem8361
    Contributor

    This is related to improving dotnet-dump's error messages: dotnet/runtime#54521

  4. mikem8361 commented on May 21, 2022

    @mikem8361
    Contributor

    dotnet-dump collect on Windows just calls MiniDumpWriteDump to generate the dump. There isn't a lot we can do to detect that there is no managed code, but there must be something else going on because you should have still have gotten a partial dump anyway even if it isn't a .NET process.

  5. ghost locked as resolved and limited conversation to collaborators on Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions