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 NT_SIGINFO NOTE to ELF dumps #82449

Merged
merged 3 commits into from
Mar 5, 2023
Merged

Conversation

mikem8361
Copy link
Member

Linux Watson needs this to better triage ELF dumps.

Add CreateDumpOptions helper struct to pass all the command options around. Add the "--code", "--errno", "--address" command line options used to fill the NT_SIGINFO NOTE. The runtime passes to createdump on a crash.

Added "ExceptionType" field to "Parameters" section of the Linux crash report json.

@mikem8361 mikem8361 requested review from hoyosjs and a team February 21, 2023 21:06
@mikem8361 mikem8361 self-assigned this Feb 21, 2023
@mikem8361
Copy link
Member Author

Issue: #40958

@mikem8361
Copy link
Member Author

@hoyosjs ping

Copy link
Member

@hoyosjs hoyosjs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is quite complete, although I am not sure if we care. System dumps also have the signal info in PRSTATUS under pr_info and potentially pr_cursig, although the last one is non-trivial for us to implement. Also, we are putting the process group in the PID field of the note. These two don't block this PR.

src/coreclr/debug/createdump/crashinfo.h Outdated Show resolved Hide resolved
src/coreclr/debug/createdump/createdump.h Show resolved Hide resolved
src/coreclr/debug/createdump/createdump.h Outdated Show resolved Hide resolved
src/coreclr/debug/createdump/main.cpp Show resolved Hide resolved
src/coreclr/debug/createdump/main.cpp Show resolved Hide resolved
src/coreclr/pal/src/thread/process.cpp Outdated Show resolved Hide resolved
Linux Watson needs this to better triage ELF dumps.

Add CreateDumpOptions helper struct to pass all the command options around. Add the
"--code", "--errno", "--address" command line options used to fill the NT_SIGINFO
NOTE. The runtime passes to createdump on a crash.

Added "ExceptionType" field to "Parameters" section of the Linux crash report json.
@mikem8361 mikem8361 merged commit 615de00 into dotnet:main Mar 5, 2023
@mikem8361 mikem8361 deleted the nt_siginfo branch March 5, 2023 17:50
@mikem8361
Copy link
Member Author

/backport to release/7.0

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2023

Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/4348724931

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2023

@mikem8361 backporting to release/7.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Add NT_SIGINFO NOTE to ELF dumps
Using index info to reconstruct a base tree...
M	src/coreclr/debug/createdump/crashinfo.cpp
M	src/coreclr/debug/createdump/crashinfo.h
M	src/coreclr/debug/createdump/crashreportwriter.cpp
M	src/coreclr/debug/createdump/createdump.h
M	src/coreclr/debug/createdump/threadinfo.cpp
M	src/coreclr/pal/src/thread/process.cpp
Falling back to patching base and 3-way merge...
Auto-merging src/coreclr/pal/src/thread/process.cpp
Auto-merging src/coreclr/debug/createdump/threadinfo.cpp
Auto-merging src/coreclr/debug/createdump/createdump.h
Auto-merging src/coreclr/debug/createdump/crashreportwriter.cpp
Auto-merging src/coreclr/debug/createdump/crashinfo.h
Auto-merging src/coreclr/debug/createdump/crashinfo.cpp
CONFLICT (content): Merge conflict in src/coreclr/debug/createdump/crashinfo.cpp
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Add NT_SIGINFO NOTE to ELF dumps
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2023

@mikem8361 an error occurred while backporting to release/7.0, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants