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

Print stacktrace on SIGSEGV exceptions #1402

Merged
merged 2 commits into from
Aug 18, 2022

Conversation

vtikoo
Copy link
Collaborator

@vtikoo vtikoo commented Aug 16, 2022

Currently this only prints functions names for exceptions originated in the kernel. Supporting application symbols would require the kernel to store some symbol information about loaded modules.

Sample output from a forced kernel crash -

*** Kernel segmentation fault 
0x1007c0448: _fs_read()
0x1007b3904: _fs_read()
0x1007f7080: myst_syscall_read()
0x1007fe9c8: _SYS_read()
0x1008059f8: _syscall()
0x10082b4e2: __morestack()

Signed-off-by: Vikas Tikoo vikasamar@gmail.com

@vtikoo vtikoo force-pushed the vtikoo.dump-stktrace-on-segv branch from d3284fa to bcfbf30 Compare August 16, 2022 20:30
vtikoo added 2 commits August 16, 2022 21:38

Verified

This commit was signed with the committer’s verified signature.
Signed-off-by: Vikas Tikoo <vikasamar@gmail.com>
…one_signal

_handle_one_signal can make downcalls to OE if tracing is turned on,
either by toggling the build time TRACE define, or running with --strace.
For exceptions originating in userspace, the fs value is the one managed
by pthreads. OE mandates that the mystikos set the fs back to the OE managed
value.

Signed-off-by: Vikas Tikoo <vikasamar@gmail.com>
@vtikoo vtikoo force-pushed the vtikoo.dump-stktrace-on-segv branch from bcfbf30 to 011eba4 Compare August 16, 2022 22:47
Copy link
Collaborator

@mingweishih mingweishih left a comment

Choose a reason for hiding this comment

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

LGTM

@vtikoo vtikoo merged commit 76722b7 into deislabs:main Aug 18, 2022
@vtikoo vtikoo deleted the vtikoo.dump-stktrace-on-segv branch August 18, 2022 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants