You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.
I know it's totally my bad to cause this in the first place, but I've somehow made err.Error() recurse forever, which means the err itself is the cause. I haven't tracked it down yet, but detecting if the Error() chain loops might be nice, as I had to use delve and print 200k lines of stacktrace to figure out what was wrong.
On Fri, Sep 1, 2017 at 9:39 AM, Ryan Hileman ***@***.***> wrote:
I know it's totally my bad to cause this in the first place, but I've
somehow made err.Error() recurse forever, which means the err itself is
the cause. I haven't tracked it down yet, but detecting if the Error()
chain loops might be nice, as I had to use delve and print 200k lines of
stacktrace to figure out what was wrong.
https://github.com/pkg/errors/blob/master/errors.go#L228
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#131>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAcAxPeF54EreBUipOKNROlsD9MpcNlks5sd0Q7gaJpZM4PJieV>
.
Okay, so this was a different problem than I thought- so not a recursive error- (and totally my fault): a file format parser bug resulted in the next input "frame" being parsed as a recursion of the previous frame. When the very last frame throws io.EOF, it bubbles all the way out (200k stack frames, 200k times errors.Wrap()).
quadratic 511.538ms 100005
linear 2.830926ms 100008
It was taking tens of seconds to print the error message, which is why my stack trace was just miles of withMessage.Error().
Now, I don't think this is real-world case enough to actually fix like this (as a dumb list join is slower for real-world error nesting, like ~20), but if someone in the future ever ends up with this many nested errors.withMessage they will be just as confused as me.
I know it's totally my bad to cause this in the first place, but I've somehow made
err.Error()
recurse forever, which means the err itself is thecause
. I haven't tracked it down yet, but detecting if theError()
chain loops might be nice, as I had to use delve and print 200k lines of stacktrace to figure out what was wrong.https://github.com/pkg/errors/blob/master/errors.go#L228
The text was updated successfully, but these errors were encountered: