[GHC] #14171: STM causes program to suddenly exit

GHC ghc-devs at haskell.org
Sat Sep 2 00:03:34 UTC 2017


#14171: STM causes program to suddenly exit
----------------------------------+----------------------------------------
        Reporter:  MichaelBurge   |                Owner:  bgamari
            Type:  bug            |               Status:  new
        Priority:  highest        |            Milestone:
       Component:  libraries/stm  |              Version:  8.2.1
      Resolution:                 |             Keywords:
Operating System:  Linux          |         Architecture:  Unknown/Multiple
 Type of failure:  Runtime crash  |            Test Case:
      Blocked By:                 |             Blocking:
 Related Tickets:                 |  Differential Rev(s):
       Wiki Page:                 |
----------------------------------+----------------------------------------

Comment (by bgamari):

 I had another quick look at this and believe that the critical mistake is
 this,
 {{{
 dmdAnal:app
   dmd = <C(C(S(SL))),C1(C1(U(U,A)))>
   expr = catchRetry#
            @ ()
            (\ (s_a2KK [Dmd=<B,U>, OS=OneShot] :: State# RealWorld) ->
               case readTVar# @ RealWorld @ [Int] ww_s485 s_a2KK of
               { (# ipv_a2Kl [Dmd=<B,U>], ipv1_a2Km [Dmd=<B,A>] #) ->
               retry# @ () ipv_a2Kl
               })
   fun dmd_ty = <xC(S),1*C1(U)><L,1*C1(U)><L,U>
   arg dmd = <xC(S),1*C1(U)>
   arg dmd_ty = ([s485 :-> <xB,U>], b)
   res dmd_ty = <L,1*C1(U)><L,U>
   overall res dmd_ty = <L,1*C1(U)><L,U>b {s485-><xB,U>}
 }}}

 Note that `arg dmd_ty` bottoms, due to its use of `retry#`. However, `arg
 dmd` is `ExnStr` and therefore should catch this bottom. However, `overall
 res dmd_ty` nevertheless bottoms. I'm not yet sure why, but it's quite
 intriguing. This all seems quite reminiscentv of #13916, but it doesn't
 seem to be the same issue.

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


More information about the ghc-tickets mailing list