Skip to content

[FR] log stack trace in the fatal signal handler #627

@mirageAlchemy

Description

@mirageAlchemy

Is your feature request related to a problem? Please describe.
Often in a program that is running online, an unexpected segment fault might happen. In this scenario a full stack trace(and possibly register context) on the thread that triggers the signal could be very useful in assisting trace down the bug.

Describe the solution you'd like
A new enable_stacktrace_printing in SignalHandlerOptions would be fine. If the enable_stacktrace_printing is true, print the stacktrace by cpptrace, <stacktrace>, or libunwind.

Additional context
I can indeed implement the signal handler myself, but in that case I would not be able to use features in SignalHandlerOptions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions