#5975: ghci can't load file whose name contains non-ASCII chars?
-------------------------------+--------------------------------------------
    Reporter:  j.waldmann      |       Owner:              
        Type:  bug             |      Status:  patch       
    Priority:  normal          |   Milestone:              
   Component:  GHCi            |     Version:  7.4.1       
    Keywords:                  |          Os:  Linux       
Architecture:  x86_64 (amd64)  |     Failure:  None/Unknown
  Difficulty:  Unknown         |    Testcase:              
   Blockedby:                  |    Blocking:              
     Related:                  |  
-------------------------------+--------------------------------------------

Comment(by pcapriotti):

 The patch for this issue does fix the problem, but uncovers a nasty race
 condition in the GHCi debugger. Here's the scenario:

  1. -fbreak-on-exception is on
  2. `runStmt` spawns a thread to evaluate a computation
  3. the computation throws, and consequently stays blocked on its
 `breakMVar`
  4. a module is loaded, which kills the thread from step 2, waking it up
  5. a new computation is started, which can set exceptionFlag back to 1
 before the previous thread terminates, interfering with the global state
 in an unpredictable way

 This is happening even before my patch for the encoding bug, but it was a
 lot harder to reproduce. The patch made the module loading code faster, so
 now it can be reproduced rather easily on the testcase break011.

 The solution seems to be to just wait in step 4 until the killed thread
 terminates, by taking its statusMVar. Patch attached.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5975#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to