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: gentraceback no longer skips stack frames when printing #24628

odeke-em opened this issue Apr 1, 2018 · 2 comments


Copy link

commented Apr 1, 2018

I got some time today to finish up and add a rigorous test for CL which involves printing the top and bottom n frames for easy reading in case of a massive stackoverflow.

To detect that we are printing stackframes, we have this condition

printing := pcbuf == nil && callback == nil

and in order for it to work, we need to be able to skip a bunch of frames when printing the bottom n stack frames.

However, with code that we used to skip through physical frames previously, CL aka commit ee97216 changed that behavior assuming that we'd never use skip unless pcbuf != nil. However, we actually need to skip through physical frames when printing tracebacks otherwise on trying to print top and bottom stackframes, we always end up printing the top irrespective of our skip which is a regression that silently snuck in for an entire year as it wasn't used.

The code that disabled proper skipping is ee97216#diff-5a2de8a1053d4e11fbc71407a5361e93L321
screen shot 2018-04-01 at 1 59 10 am
screen shot 2018-04-01 at 2 07 18 am

/cc @davidlazar @aclements


This comment has been minimized.

Copy link

commented Apr 2, 2018

Is this a regression in a user-facing behavior, or just an internal function?

(I assume that it's blocking #7181; is that the only impact?)


This comment has been minimized.

Copy link
Member Author

commented Apr 2, 2018

@bcmills correct, it is only blocking #7181, but nonetheless a bug when skipping and printing -- something that hasn't yet been exposed though because we've been printing the entirety of stackframes.

@bcmills bcmills changed the title runtime: stackframe skipping while printing regression as skips now only work if pcbuf != nil runtime: gentraceback no longer skips stack frames when printing Apr 2, 2018
@bcmills bcmills added this to the Unplanned milestone Apr 3, 2018
@andybons andybons added the NeedsFix label Apr 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.