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.4k Golang : Selection sort example
+22.3k Golang : How to run Golang application such as web server in the background or as daemon?
+13.2k Golang : How to get a user home directory path?
+24.6k Golang : Change file read or write permission example
+16k Golang : Read a file line by line
+7k Golang : Calculate BMI and risk category
+4.9k Which content-type(MIME type) to use for JSON data
+13.6k Golang : Count number of runes in string
+19.8k Golang : Get current URL example
+5.5k Golang : Reclaim memory occupied by make() example
+22.2k Golang : Repeat a character by multiple of x factor
+11.2k Golang : How to determine a prime number?