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

Feature request: (optionally) include full call stack in dump #55

Open
dreusel opened this issue Jan 10, 2025 · 2 comments
Open

Feature request: (optionally) include full call stack in dump #55

dreusel opened this issue Jan 10, 2025 · 2 comments

Comments

@dreusel
Copy link
Contributor

dreusel commented Jan 10, 2025

First, thank you so much for providing and maintaining wtfnode! It has been indispensible in so many 'wtf' situations for me and my team.

Right now my typical workflow when I encounter a mystrious hangs-on-terminate issue is to run things with wtfnode and then instrument the functions that show up in the dump with something print stack traces because almost always the problem lies a few calls up. Even though in the end this usually gets me there, its clearly not ideal for several reasons:

  • I have to go and instrument my code
  • Since at the point where I instrument the code it's not yet known for any given invocation whether it will eventually lead to a 'wtf' situation or not I usually end up with (potentially very very many) printed stack traces from the same number of invocations and then after the fact need to sift through them to find the ones that are causing the issue

Clearly all of this could be much nicer if wtfnode could just include full stack traces for any invocation in the dump.
From having a quick glance at the code it seems that complete stack frames are actually already generated so computational impact should be minimal.

@dreusel
Copy link
Contributor Author

dreusel commented Jan 10, 2025

I went ahead and implemented it here: #56
Of course, everything is open for discussion.

@myndzi
Copy link
Owner

myndzi commented Jan 10, 2025

Glad it has helped you :)

I was busy typing up a response when I got your PR... sorry about the mess that is the code, I started on a much cleaner rewrite ages ago but wound up getting busy. I think this is a reasonable request, my main concern was whether it would be too noisy to understand. I'll check out the branch and poke at it to make sure things seem good.

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