Fix fatal error: evacuation not done in time problem
Encounter one of the strangest error messages in Go today regarding evacuation. Now, what the heck "evacuation" has to do with programming language ? Apparently it has something to do with locks.
This error message :
"fatal error: evacuation not done in time"
is caused by accessing a map from multiple go-routines and ....map is not thread-safe.
Solution :
Check if the RLock or Lock is in proper place. Might need some fine tuning through trial and error.
p/s : This solution is applicable to the error message fatal error: bad state
as well.
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+30.3k Golang : How to declare kilobyte, megabyte, gigabyte, terabyte and so on?
+18.1k Golang : Defer function inside init()
+9.2k Golang : How to capture return values from goroutines?
+28.8k Golang : Read, Write(Create) and Delete Cookie example
+21.3k Golang : Convert(cast) string to rune and back to string example
+10.1k Golang : Check if user agent is a robot or crawler example
+24.1k Golang : Use regular expression to validate domain name
+9.3k Golang : does not implement flag.Value (missing Set method)
+5.3k Golang : The Tao of importing package
+11.8k Golang : Calculations using complex numbers example
+13.9k Golang : Check if an integer is negative or positive