Does your program use unsafe? What about cgo?
I used unsafe and cgo. I will remove the unsafe call and pressure test cgo.
Does it print any warning when run with the race detector enabled? -race?
I found many print places with the race detector enabled. I will fix these places.
Thanks. As you know a program containing data races is not a valid Go program, and it's very very likely that this crash is caused by these data races (they can corrupt internal runtime structure). I'm closing here for now, but feel free to comment if you can still reproduce the crasher after fixing the program.