-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
fmt: panic in (*fmt).padString #18542
Comments
Ugh, of course I accidentally snipped the actual panic cause from the stack trace. The original panic was a nil dereference. I'll add the message back as soon as it happens again. |
Hi, unfortunately, this is not alot of information to go on. Some questions to help understand the situation better:
|
|
You might also re-try with the latest tip. An important runtime fix went in a few hours ago. Unlikely to be related, but worth checking if it is easy. Thanks. |
There's been no crash since I enabled the race detector. We usually have one crash per day, but it's possible we had less traffic over the weekend. Would enabling the race detector prevent a crash that otherwise would have occurred? |
Unlikely. |
After running for a week on go1.8beta2 with the race detector enabled, there were no crashes. When go1.8rc1 was released I upgraded and after a few days (without the race detector enabled) got the same crash:
I'm going to try go1.7.x now and see if it still happens. |
This looks suspicious:
That means Are you sure there's no unsafe going on in the code, making bogus strings manually? Alternatively, maybe the runtime code to return a zero value of a string is bogus, at least for this case. (Unlikely?) Or, are you concurrently modifying and accessing the map from different goroutines without locking? Is the code available somewhere? /cc @aclements @randall77 |
I'm not sure what's going on, but I can say that the panic is from attempting to deference the nil string pointer (in particular,
|
Sorry for the long silence on this. I was able to identify a race condition where the I'll re-open the issue if they occur again, but I believe it's just a data race. Thank you all for your help! |
What version of Go are you using (
go version
)?go version devel +9cd3c06 Thu Dec 15 20:06:07 2016 +0000 windows/amd64
(go1.8beta2
)What operating system and processor architecture are you using (
go env
)?What did you do?
I have a call with an environment like this:
Unfortunately this happens only occasionally on our production servers, and I can't duplicate on my development machine or the playground.
What did you expect to see?
No panics
What did you see instead?
The root function is:
The text was updated successfully, but these errors were encountered: