-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
math/rand: index out of range in (*rngSource).Int63 #21099
Comments
The out-of-bounds must be on
So when we use them to access the vector, both Considering you can't reproduce this, it smells like memory corruption (possibly caused by a data race). |
I didn't look at the code yet but I agree that it shouldn't be possible to have an out-of-bounds panic here. I don't think it's in a data race in our process as that would normally make it happen much more of then than this once in a year. This was on a Google Compute instance which wasn't doing anything else. Not sure how susceptible these are to memory corruptions from something else but I guess it can happen. |
It's also possible that the memory corruption was caused by a bug in the Go runtime. This issue, thought, as it is, it's not actionable: the stack trace tells us nothing, and you can't reproduce the crash, so we cannot use your report to extract a reproducer for a (possible) runtime bug. Leaving this open in case someone else want to say something about this. |
fasthttp plays games with unsafe and sharing memory between |
I'm not sure the unsafe behavior of fasthttp is to blame, I would expect it to happen much more often in this case. I think it was just some random memory corruption so it will be impossible to debug. |
I found my mistake. As you can see from the stack trace I am using |
@erikdubbelboer thanks for the update! |
I'm not sure if reporting this is useful as I can't replicate this at all. Maybe it was just a cosmic ray or maybe someone can use the stack trace to find some obscure bug.
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?What did you do?
Run a program that receives around 5000 requests per second using https://github.com/valyala/fasthttp
What did you expect to see?
No crashes
What did you see instead?
A very unusual panic in the Go source that I haven't seen before:
The text was updated successfully, but these errors were encountered: