[GHC] #16065: Stack squeezing during context switches makes for non-determinism in allocations
GHC
ghc-devs at haskell.org
Wed Dec 19 15:02:14 UTC 2018
#16065: Stack squeezing during context switches makes for non-determinism in
allocations
-------------------------------------+-------------------------------------
Reporter: sgraf | Owner: (none)
Type: task | Status: new
Priority: normal | Milestone: ⊥
Component: Runtime System | Version: 8.6.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #4450, #8861 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Old description:
> As #4450 and #8611 show, stack squeezing in the RTS makes allocation
> numbers between two different runs of the same binary non-deterministic,
> because its effect is depending on when context switches are bound to
> happen.
>
> A short-term solution might be to deactivate stack squeezing for
> vulnerable benchmarks with `+RTS -Z` like in Phab:D5460, but IMO a more
> elegant solution would be to only deactivate stack squeezing in
> `threadPause` calls that happen due to context switches. Would you agree?
New description:
As #4450 and #8611 show, stack squeezing in the RTS makes allocation
numbers between two different runs of the same binary non-deterministic,
because its effect is depending on when context switches are bound to
happen.
A short-term solution might be to deactivate stack squeezing for
vulnerable benchmarks with ~~`+RTS -Z`~~ `+RTS -V0` like in Phab:D5460,
but IMO a more elegant solution would be to only deactivate stack
squeezing in `threadPause` calls that happen due to context switches.
Would you agree?
--
Comment (by sgraf):
Updated the patch for #8611 to reflect this.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16065#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list