
#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: |
----------------------------------+----------------------------------------
Changes (by bgamari):
* owner: (none) => bgamari
* priority: normal => highest
Comment:
This sounds quite bad. Furthermore, it seems that `check#` has absolutely
no test coverage.
I suspect this is due to our treatment of STM in the demand analyser; `x`
in the above program ends up looking like this after strictness analysis,
{{{#!hs
x_s2KO :: E -> State# RealWorld -> (# State# RealWorld, () #)
x_s2KO
= \ (e_a2hN [Dmd=], ipv1_a2Kk [Dmd=] :: State# RealWorld) ->
case e_a2hN of
{ E ds_d2EV [Dmd=] ->
case ds_d2EX of { GHC.Conc.Sync.TVar tvar#_a2JR
[Dmd=] ->
case readTVar#
@ RealWorld @ [Int] tvar#_a2JR s_a2Ki
of
{ (# ipv_a2JG [Dmd=], ipv1_a2JH [Dmd=]
{ __DEFAULT -> (# s'_a2Kv, GHC.Tuple.() #) }
})
eta_B1
}}}
Which then leads us to conclude that the failure in `installSanityChecks`
is redundant. Concerningly, this doesn't seem to be caught by the
`-fcatch-bottoms` flag introduced in #13916.
I'll try to come back to this tomorrow or after ICFP.
--
Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14171#comment:1
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler