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 backtrace on crash? #49

Open
kevinushey opened this issue May 13, 2021 · 1 comment
Open

print backtrace on crash? #49

kevinushey opened this issue May 13, 2021 · 1 comment

Comments

@kevinushey
Copy link

I put together a small experiment using gdb to print a backtrace when the process crashes. The core implementation lives here:

https://github.com/kevinushey/mortem/blob/main/src/mortem.c

I wonder if winch could consider doing something similar; that is, register some signal handlers for fatal / deadly signals, and then use winch / libbacktrace to print a stack trace when that crash occurs?

This could be especially useful in debugging CI crashes.

@krlmlr
Copy link
Member

krlmlr commented Mar 16, 2022

Thanks, missed that.

How do we register the signal handlers? Should we export a function that enables/disables this feature?

Would you like to send a PR?

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

No branches or pull requests

2 participants