[GHC] #15136: High CPU when asynchronous exception and unblocking retry on TVar raced

GHC ghc-devs at haskell.org
Mon May 14 22:52:15 UTC 2018


#15136: High CPU when asynchronous exception and unblocking retry on TVar raced
-------------------------------------+-------------------------------------
        Reporter:  nshimaza          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.6.1
       Component:  Runtime System    |              Version:  8.4.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Runtime crash     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by bgamari):

 Thanks for the small repro! Indeed I am able to easily reproduce this.

 The racing threads look like this,
 {{{

 Thread 8 (LWP 25960):
 #0  0x000000000049c0df in stmCommitTransaction ()
 #1  0x00000000004a9de4 in stg_atomically_frame_info ()
 #2  0x0000000000000000 in ?? ()

 Thread 1 (LWP 25948):
 #0  0x000000000049b290 in lock_tvar ()
 #1  0x000000000049b559 in remove_watch_queue_entries_for_trec ()
 #2  0x000000000049b95b in stmAbortTransaction ()
 #3  0x000000000049984c in raiseAsync ()
 #4  0x0000000000499ba3 in throwToMsg ()
 #5  0x0000000000499e82 in throwTo ()
 #6  0x00000000004a6aac in stg_killThreadzh ()
 #7  0x0000000000000000 in ?? ()
 }}}

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


More information about the ghc-tickets mailing list