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
+54.7k Golang : Unmarshal JSON from http response
+25.4k Golang : How to write CSV data to file
+13.7k Golang : Fix cannot use buffer (type bytes.Buffer) as type io.Writer(Write method has pointer receiver) error
+13.1k Golang : Generate Code128 barcode
+6.9k Golang : Dealing with postal or zip code example
+45.6k Golang : Read tab delimited file with encoding/csv package
+13.8k Golang : Simple word wrap or line breaking example
+85.9k Golang : How to convert character to ASCII and back
+7.8k Golang : Append and add item in slice
+9.9k Golang : Text file editor (accept input from screen and save to file)
+19.4k Golang : Measure http.Get() execution time
+15k Golang : Delete certain files in a directory