Sysinternals / ProcDump-for-Linux

A Linux version of the ProcDump Sysinternals tool
MIT License
2.94k stars 303 forks source link

Failed to create dump #134

Closed mathewhoopertr closed 1 year ago

mathewhoopertr commented 2 years ago

Expected behavior

Dump file to be created!

Actual behavior

Getting the following error message:

An error occurred while generating the core dump for .NET 3.x+ process

Steps to reproduce the behavior

  1. Run the following command as root - procdump -w dotnet -d
  2. Review the output from syslog
  3. Getting the following log output

Feb 21 17:04:48 ProcDump[10035]: [17:04:48 - INFO]: Found process with PID 3747 Feb 21 17:04:48 ProcDump[10035]: [17:04:48 - DEBUG]: TimerThread: Starting Trigger Thread in src/TriggerThreadProcs.c, at line 291 Feb 21 17:04:48 ProcDump[10035]: [17:04:48 - INFO]: Timed: Feb 21 17:04:48 ProcDump[10035]: [17:04:48 - DEBUG]: CoreCLR diagnostics socket: #020#022 in src/CoreDumpWriter.c, at line 140 Feb 21 17:04:48 ProcDump[10035]: [17:04:48 - DEBUG]: Failed to connect to socket for .NET Core dump generation. in src/CoreDumpWriter.c, at line 287 Feb 21 17:04:48 ProcDump[10035]: [17:04:48 - ERROR]: An error occurred while generating the core dump for .NET 3.x+ process Feb 21 17:04:50 ProcDump[10035]: [17:04:50 - INFO]: Quit Feb 21 17:04:50 ProcDump[10035]: [17:04:50 - DEBUG]: TimerThread: Exiting Trigger Thread in src/TriggerThreadProcs.c, at line 312

So with my very limited knowledge of c++, it looks like it successfully creates the diagnostics socket but fails to connect

System information (e.g., distro, kernel version, etc.)

Amazon Linux 2

To install the package, I used yum localinstall filenameof.rpm where it installed the dependency for it.

MarioHewardt commented 2 years ago

Thanks for reporting this. Can you try explicitly targeting the target process using the PID? You can use a plethora of ways to find the PID such as ps. Also, what version of .NET is the target process running?

mathewhoopertr commented 2 years ago

Hey @MarioHewardt

I probably should have added that I tried that with the same result - I assumed it did the same thing with the exception of finding the process ID. The target version of .net is 3.1.

Thanks

MarioHewardt commented 1 year ago

Looping back to this, sorry for the delay.

How are you executing your dotnet app? Is it via 'dotnet run'? I believe there can be multiple instances of the dotnet process if executed via dotnet and only the main app will have the diagnostics socket open. Do you see multiple dotnet processes running when you are able to reproduce the problem (do a ps -a and look for dotnet processes or your target app process name)?

MarioHewardt commented 1 year ago

Closing for now. If you are still seeing the issue, please feel free to reopen.