What do you mean by "It won't work on the playground"? It runs for me. Are you saying you get different results when running locally? If so, what version of go are you running locally, on what platform, and what do you see?
Or are you saying the problem is really with something like this?
That indeed fails to run in the playground - it exits with signal 9 (128+9=137)
Running locally with go 1.16.3 under macOS (Intel) I see:
Allocs before: 82696
Allocs while running: 51496728
Allocs after: 40384112
Allocs after: 40384112
Allocs after: 40384112
Allocs after: 40384112
Allocs after: 40384112
That is 40MB that apparently isn't reclaimed, but it does get reused if you run more goroutines:
I don't know why that is. It's about 400 bytes per goroutine. Stack perhaps?