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

Add "core dump" support to the runtime. #4408

Closed
OtherCrashOverride opened this issue Jul 31, 2015 · 7 comments
Closed

Add "core dump" support to the runtime. #4408

OtherCrashOverride opened this issue Jul 31, 2015 · 7 comments
Assignees
Labels
area-Diagnostics-coreclr enhancement Product code improvement that does NOT require public API changes/additions
Milestone

Comments

@OtherCrashOverride
Copy link

The runtime should have a feature to perform a "core dump" when an un-handled exception occurs. This would assist debugging greatly in being able to view the state everything was in when the exception happened.

(Issue was previously part of #4402 )

@ayende
Copy link
Contributor

ayende commented Jul 31, 2015

Better yet, instead of tying this to unhandled exception, we want an API
that we can call that would give this.

Something like:

Environment.CreateCrashDump(path);

The idea is that we might want this not only for crashes. It would be
useful to ask our own software to get dumps from high cpu, high memory, etc.

*Hibernating Rhinos Ltd *

Oren Eini* l CEO l *Mobile: + 972-52-548-6969

Office: +972-4-622-7811 *l *Fax: +972-153-4-622-7811

On Fri, Jul 31, 2015 at 3:32 PM, OtherCrashOverride <
notifications@github.com> wrote:

The runtime should have a feature to perform a "core dump" when an
un-handled exception occurs. This would assist debugging greatly in being
able to view the state everything was in when the exception happened.

(Issue was previously part of #4402
https://github.com/dotnet/coreclr/issues/1311 )


Reply to this email directly or view it on GitHub
https://github.com/dotnet/coreclr/issues/1321.

@gkhanna79
Copy link
Member

Environment.FailFast should result in Core dump generation. Is that not happening?

@stephentoub
Copy link
Member

I get core dumps both for unhandled exceptions that crash the app and for Environment.FailFast, though the defaults on my system mean I need to use something like ulimit -c unlimited or else they won't be generated.

I assume @ayende though is asking for the ability to generate a dump without crashing the proces, ala "Create dump file" with Task Manager on Windows.

@mikem8361 mikem8361 self-assigned this May 15, 2017
@lt72
Copy link
Contributor

lt72 commented Nov 1, 2017

This shipped with 2.0

@lt72 lt72 closed this as completed Nov 1, 2017
@ayende
Copy link
Contributor

ayende commented Feb 7, 2018

@lt72 How do I force a dump without killing the process, I've not been able to find it.

@lt72
Copy link
Contributor

lt72 commented Feb 7, 2018

@mikem8361: does our tool allows creating a dump without killing the process?

@mikem8361
Copy link
Member

You can attach gdb and run "generate-core-file ". I think you can detach without killing the process, but I'm not sure with gdb.

If you have the createdump enabled (see doc) with the COMPlus_DbgEnableMiniDump=1 env var set before the program is run, you can send a SIGILL signal and that will tell coreclr to create a dump. This may not work in all situations and is not offically supported.

@msftgits msftgits transferred this issue from dotnet/coreclr Jan 30, 2020
@msftgits msftgits added this to the Future milestone Jan 30, 2020
@dotnet dotnet locked as resolved and limited conversation to collaborators Jan 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Diagnostics-coreclr enhancement Product code improvement that does NOT require public API changes/additions
Projects
None yet
Development

No branches or pull requests

7 participants