[GHC] #8006: Asynchronous exception rethrown synchronously inside runStmt
GHC
ghc-devs at haskell.org
Fri Jun 28 11:25:14 CEST 2013
#8006: Asynchronous exception rethrown synchronously inside runStmt
---------------------------------+------------------------------------------
Reporter: edsko | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Changes (by simonmar):
* difficulty: => Unknown
Comment:
Thanks for looking into this. I expect you're right that it's infeasible
to figure out what to do when `throwTo` returns.
I would be OK with a solution that did all the lazy loading of interface
files first before running the snippet, as long as we can be reasonably
sure that it works. (that is, not just "I tried it and it seems to work",
but asking somebody who has a reasonable idea of where we do all the
`unsafePerformIO`s, i.e., simonpj). I'm not sure, but I think that we
might lazily read in `IdInfo` from the interface file, so poking on the
arity of an `Id` might cause an `unsafePerformIO` to happen, and that
would be outside of the typechecker.
A couple of other approaches spring to mind:
* make `forkM` be `forkIO` (or `async`). I don't know how much overhead
that would entail, though. We could try it.
* put a `mask_` inside `forkM`. Perhaps `uninterruptibleMask` is
justified in this case, since it's hard to guarantee that we don't have
any interruptible operations, yet we're reasonably sure that it shouldn't
block. However, that might mean we couldn't ^C the typechecker if it
looped...
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/8006#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list