Please answer these questions before submitting your issue. Thanks!
go version)?1.11.1 as reported by the server.
Not relevant. Server-side issue.
go env)?Not relevant. Server-side issue.
https://play.golang.org/p/jibIOKi7wqW
The game of life
go tool compile: exit status 2
fatal error: runtime: out of memory
The example does run (I tested on 1.10.3 locally). It just doesn't run on the golang.org site, likely due to a restriction on the back-end environment that's doing the compilation.
If the environment is what it's supposed to be (whatever that is), and the example just needs to be tweaked to use less memory, I'd be interested in taking care of that and sending a PR.
and the example just needs to be tweaked to use less memory,
I very much doubt this is the case. I suspect this is related to the bad caching on nondetermistic error issue the playground had: #26926. Not sure why it's still happening, in theory it should be fixed. I don't know if the fixed playground was deployed.
/cc @broady @andybons
Right now playground checks errors in the response.Events slice, that is for successfully built programs:
// Runtime error strings that will not be cached if found in an Event message.
var nonCachingRuntimeErrors = []string{"out of memory", "cannot allocate memory"}
But in our case it failed to build the program , response.Errors contains OOM message, response was cached and returned. We should do the same check for response.Errors too.
@katiehockman
Thanks for the extra context @ysmolsky. Looks like the original change fixed some issues, but not all.
@ALTree to answer your question, yes it was deployed shortly after the change was merged.
I'll assign this to myself and hopefully send out the fix very soon.
Change https://golang.org/cl/144297 mentions this issue: playground: prevent caching memory-related compile time errors
Commit golang/playground@d134d7d391d04bb6c1c7cd8abb1f3eec872c7de6 has been deployed now. Please let us know if the issue occurs again.
@dmitshur The issue is still happening live now...
https://play.golang.org/p/jibIOKi7wqW
Now that we know what the issue is, I can see that changing a single character in the code sample results in successful code execution. Clearing that cached execution result (the error) should get this working on the site again.
The cache will need to be cleared out first. Then it shouldn't pop up again.
On Fri, Oct 26, 2018, 7:14 PM Elliott Peay notifications@github.com wrote:
@dmitshur https://github.com/dmitshur The issue is still happening live
now...
https://play.golang.org/p/jibIOKi7wqW—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/golang/go/issues/28283#issuecomment-433566788, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AbdMAHRchNnBB3tEq3NekiN47ZMDzB6kks5uo5dhgaJpZM4XxRaa
.
The cache has been cleared. I don't see an error in the playground response any more.