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

Dump stack trace of tracee #63

Open
JeremyRand opened this issue May 2, 2023 · 3 comments
Open

Dump stack trace of tracee #63

JeremyRand opened this issue May 2, 2023 · 3 comments

Comments

@JeremyRand
Copy link
Member

Dumping the stack trace of the tracee when a leak is detected would be useful for debugging where the leak happened.

For bonus points, support dumping the stack trace of non-C languages too (e.g. I believe Python and Go have straightforward ways to dump a stack trace).

@JeremyRand
Copy link
Member Author

This is akin to the -k flag in C strace.

@sporksmith
Copy link

One relatively easy way to implement this is to send SIGABRT to the traced program; it should generate a core dump, which can then be loaded into gdb where the stack and other state can be inspected. (IIRC sending the signal natively will result in a ptrace stop, which will need to be handled to actually deliver the signal). Core dumps will also need to have been enabled by the user (e.g. ulimit -c unlimited)

This is of course fairly heavy-handed and not the best user experience.

robertmin1 added a commit that referenced this issue May 30, 2023
Dump stack trace : Includes process details -  PID, Process Name & Args
#63 & #64
@robertmin1
Copy link
Collaborator

Nice, I can implement both and make it configurable

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

3 participants