-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Create a createdump static library for single-file dump generation #84864
Conversation
Tagging subscribers to this area: @tommcdon Issue DetailsA "createdump_static" lib is now built that is linked into the single-file host and in the future can be linked into a Native AOT host/app going forward. For single-file apps most of the same unhandled exception or crash dump generation code is the same (same env vars, most of all the PAL code is the same) except where createdump executable was execve, a callback invokes (set by the host) the static createdump lib entry point. File full dumps are generated (which currently are very large under MacOS) but the user can put the DAC side-by-side with their app and the smaller heap or mini dumps can be generated. The SDK could give an option to publish the DAC SXS for a single-file app.
|
/cc: @LakshanF |
8310ec7
to
c73f3b3
Compare
c73f3b3
to
ebf4931
Compare
This change adds only 125KB to the singlefilehost on Linux x64. |
Code review ping. |
@mikem8361 does this add into the single file host the ability to create a dump? |
It should end up working like regular app (with createdump/DAC side-by-side), where the Microsoft.Diagnostics.NETCore.Client WriteDump API can generate core dumps of the process. Calling the API on itself isn't well tested but should work I think. |
f905818
to
413fe23
Compare
@hoyosjs - ping. |
997490e
to
b0e6d3a
Compare
It would be nice if on Unix the dump could be requested by sending a signal (like Note that Mono has a thread dump feature via runtime/src/mono/mono/mini/mini-posix.c Lines 287 to 289 in aaa1de1
|
…p generation A "createdump_static" lib is now built that is linked into the single-file host and in the future can be linked into a Native AOT host/app going forward. For single-file apps most of the same unhandled exception or crash dump generation code is the same (same env vars, most of all the PAL code is the same) except where createdump executable was execve, a callback invokes (set by the host) the static createdump lib entry point. File full dumps are generated (which currently are very large under MacOS) but the user can put the DAC side-by-side with their app and the smaller heap or mini dumps can be generated. The SDK could give an option to publish the DAC SXS for a single-file app.
7d62fa3
to
4a89e23
Compare
@tmds, enabling SIGQUIT to generate dumps would be a feature requiring an new issue. This is complicated by the fact the runtime handles SIGQUIT to do some cleanup. |
Fixed #68676 |
A "createdump_static" lib is now built that is linked into the single-file host and in the future can be linked into a Native AOT host/app going forward. For single-file apps most of the same unhandled exception or crash dump generation code is the same (same env vars, most of all the PAL code is the same) except where createdump executable was execve, a callback invokes (set by the host) the static createdump lib entry point.
File full dumps are generated (which currently are very large under MacOS) but the user can put the DAC side-by-side with their app and the smaller heap or mini dumps can be generated. The SDK could give an option to publish the DAC SXS for a single-file app.