GHC eventlog: thread stop status codes modified (breaking ghc-events, threadscope, edentv)
|Reported by:||jberthold||Owned by:||ezyang|
|Keywords:||Cc:||simonmar, jberthold, ezyang|
|Type of failure:||Other||Test Case:|
|Related Tickets:||Differential Rev(s):|
A patch in GHC-7.7 modified the "thread stop status" encoding, so the current ghc-events (version 0.4.2.0 from 2012) produces wrong stop reasons when reading an eventlog written by GHC-7.8.2.
The GHC patch is http://git.haskell.org/ghc.git/commit/70e20631742e516c6a11c3c112fbd5b4a08c15ac The MVarRead block reason was added in the middle, shifting all following block reason codes one up.
The error can be observed when a thread blocks on a black hole during a program run. Attached is a small test program which produces this situation, and two event logs for the same program run with the same arguments and RTS parameters. The program's two threads evaluate the same data, the parent thread typically blocks on a blackhole created by a forked child thread. Note the sequence around user event "child": The log written by GHC-7.6.3 correctly shows blocking on a black hole, while the log written by GHC-7.8.2 claims the main thread blocks "on I/O read".
Change History (22)
comment:9 Changed 2 years ago by ezyang
- Milestone changed from 7.8.4 to 7.8.3
- Owner changed from simonmar to ezyang