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
could be caused by simple misuse of time.Timer.Reset. The above crash was easily reproduced with the (incorrect) program
package main
import "time"
func main() {
t := time.NewTimer(100 * time.Hour)
for i := 0; i < 8; i++ {
go func() {
for {
t.Reset(100 * time.Hour)
}
}()
}
select {}
}
What did you expect to see?
The detection of the concurrent use of time.Timer and a friendly crash, the same way concurrent accesses to map (sometimes) fail with a friendly error instead of corrupting memory.
What did you see instead?
A runtime crash "fatal error: panic holding locks", which lead me to believe that the Go runtime was at fault.
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?go version devel +4bb649fba8 Wed May 23 12:26:19 2018 +0000 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?linux/amd64
What did you do?
While debugging #25619 it took me a while to realize that the scary runtime crash
could be caused by simple misuse of time.Timer.Reset. The above crash was easily reproduced with the (incorrect) program
What did you expect to see?
The detection of the concurrent use of time.Timer and a friendly crash, the same way concurrent accesses to map (sometimes) fail with a friendly error instead of corrupting memory.
What did you see instead?
A runtime crash "fatal error: panic holding locks", which lead me to believe that the Go runtime was at fault.
The text was updated successfully, but these errors were encountered: