Slew of input/output errors when syncing

This sounds very much like a bug, possibly in AFP but possibly in the go runtime. Go uses some of the lesser used filing system interfaces and in combination with its async preemption it can tickle kernel bugs.

You could try turning off async preemption by setting the env var GODEBUG=asyncpreemptoff=1 and see if that helps.