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
x/net/trace: NewEventLog() occasionally panics with slice bounds out of range #35792
Comments
/cc @mikioh as the owner |
@toothrot hi, thanks for following up, however it seems that mikioh doesn't have much recent activity on github, so I wondered if you had some thoughts or other owners or pointers around this (I can try to do more investigation on my side too but I'm not sure where to start) , thanks! |
Hey @ThomasJannaud, I know that the relevant code was written by @Sajmani, but that @bradfitz @ianlancetaylor may also be able to provide more context here. I'm not sure where the hard-coded |
I can't reproduce this or see how it can happen. I didn't look at the source to older versions of Go's runtime or x/net/trace, though. |
@bradfitz Is it possible that runtime.Callers could be returning the wrong value? I don't understand how else this panic could happen. |
@toothrot, maybe. I looked at master's version of Callers/gentraceback and didn't see anything but I didn't look at old versions of Go. /cc @cherrymui @aclements |
after investigation, we were calling Sorry for the false alarm and thank you guys for having looked |
What version of Go are you using (
go version
)?go1.12.11 on a debian docker image (I cannot access go version directly, it is running on a system in prod)
Does this issue reproduce with the latest release?
I cannot tell either I don't have control on this. I can run my code locally with a more recent version but it is hard to reproduce the panic I describe.
Our service is running on prod with a pretty high qps and I see only a handful of panics a day.
What operating system and processor architecture are you using (
go env
)?debian docker image
What did you do?
Using grpc library upfront (if it matters), using a custom connection
https://play.golang.org/p/kRC1ZwTeN9J
What did you see instead?
panic: runtime error: slice bounds out of range
at...vendor/golang.org/x/net/trace/events.go:140
from the line 39:
NewEventLog...
in the playground linkwhich corresponds to the line
el.stack = el.stack[:n]
below (fromx/net/trace/events.go:140
)I have no idea how a panic can happen here.
newEventLog()
seems to return a very "threadsafe" result.The text was updated successfully, but these errors were encountered: