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
+6.7k Gogland : Where to put source code files in package directory for rookie
+8.9k Golang : Simple Jawi(Yawi) to Rumi(Latin/Romanize) converter
+12.7k How to automatically restart your crashed Golang server
+2k Golang : Fix go-cron set time not working issue
+5.2k Linux/Unix : Commands that you need to be careful about
+10.7k Golang : Detect user location with HTML5 geo-location
+7.6k Golang : Sort lines of text example
+30.1k Golang : Math pow(the power of x^y) example
+10.6k Golang : Setup API server or gateway with Caddy and http.ListenAndServe() function example
+16.3k Golang : Login and logout a user after password verification and redirect example
+13.9k Golang : Find location by IP address and display with Google Map
+22.4k Golang : Use regular expression to validate domain name