-
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
Better createdump error messages #69663
Conversation
Tagging subscribers to this area: @tommcdon Issue DetailsRedirect stderr when launching createdump to get any error text. Added a new generate core dump ipc message that allows a error message string Fixes or improves:
|
Redirect stderr when launching createdump to get any error text. Added a new generate core dump ipc message that allows a error message string to be returned for more detail on createdump errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of additional smaller comments. Apart from that I believe the EventPipe related changes look good!
Does anybody know how to code a empty ep_char16_t string that works across all our platforms, OS's and runtimes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do another pass later today on the createdump half of things. The EventPipe side of things looks good to me 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple nits. Other than that this LGTM 👍
@@ -2399,16 +2431,36 @@ PROCCreateCrashDump(std::vector<const char*>& argv) | |||
{ | |||
// Ignore any error because on some CentOS and OpenSUSE distros, it isn't | |||
// supported but createdump works just fine. | |||
ERROR("PROCCreateCrashDump: prctl() FAILED %d (%s)\n", errno, strerror(errno)); | |||
ERROR("PROCCreateCrashDump: prctl() FAILED %s (%d)\n", errno, strerror(errno)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you forget to swap errno
and strerror(errno)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, looks like I did. I'll fix it in a future PR.
Redirect stderr when launching createdump to get any error text.
Added a new generate core dump ipc message that allows a error message string
to be returned for more detail on createdump errors.
Fixes or improves:
#54521
#64069
dotnet/diagnostics#3064
dotnet/diagnostics#2976