Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Error when clicking run rapidly #31

Closed
cdsmith opened this Issue · 1 comment

1 participant

@cdsmith
Owner

If the Run button is double-clicked, the result is:

<no location info>: mkTopLevEnv: not interpreted main:Main

as a compiler error. This may have something to do with non-reentrancy of the GHC API? But at the same time, use of CacheMap should be a guarantee that the GHC API is used synchronously, at least within a single mode. So this needs some more investigation about what's going on.

@cdsmith
Owner

Fixing the retention for compiles seems to have mitigated this one, but it's still there; it just will require lots of simultaneous submits of different source code to trigger now.

It looks temptingly like a reentrancy bug with the GHC API, but even wrapping the GHC API usage with a global lock doesn't seem to help. At the same time, performance a manual garbage collection directly before calling the GHC API seems to make things worse, sometimes even triggering the bug when there hasn't been a particularly long time since the last use of the GHC API.

@cdsmith cdsmith closed this issue from a commit
@cdsmith Switch to interpreted mode for the compiler. Because we open up the
top-level scope, we need to interpret anyway; so this avoids some effort
and compiler bugs triggered by writing out the compiled versions too.
(fixes #31)
34b31ce
@cdsmith cdsmith closed this in 34b31ce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.