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

runtime: stack should indicate when stack frames are omitted #53349

Closed
rogpeppe opened this issue Jun 13, 2022 · 3 comments
Closed

runtime: stack should indicate when stack frames are omitted #53349

rogpeppe opened this issue Jun 13, 2022 · 3 comments

Comments

@rogpeppe
Copy link
Contributor

What version of Go are you using (go version)?

$ go version
go version devel go1.19-2bea43b0e7 Thu May 12 04:47:29 2022 +0000 linux/amd64

Does this issue reproduce with the latest release?

Yes.

What did you do?

https://go.dev/play/p/S-RsQFj9gL1

What did you expect to see?

I'd expect to see an indication that stack frames have been omitted from the
stack trace.

What did you see instead?

I didn't see any indication that frames were omitted, which makes it easy to misinterpret the traceback output.

There is logic inside src/runtime/traceback.go that seems to be intended to print "...additional frames elided..." but that logic doesn't seem to be triggered. A rough bisection through Go major versions indicates that this was broken some time between go1.7 and go1.8.

As an additional consideration, it would be great if it were possible to configure the number of frames printed (for example with a tracebacklimit setting inside $GODEBUG for example).

@randall77
Copy link
Contributor

I was hoping one day we would fix #7181 and maybe cure this one as a side effect.

@seankhliao
Copy link
Member

dup of #32383 ?

@rogpeppe
Copy link
Contributor Author

@seankhliao Indeed so - I searched but didn't find that.
@randall77 Yes, that would be great! (especially if that allowed runtime configuration of the number of frames to show).

I'll close this as a dupe of #32383.

@golang golang locked and limited conversation to collaborators Jun 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants