Skip to content

Scheduling bug with forkOS + MVar

I have noticed a weird scheduling behavior when performing some experiments with the fasta benchmark [1] from The Computer Language Benchmarks Game. When I switch forkIO by forkOS the scheduler stops to assign work for some capabilities, and they stay idle for the whole execution of the program.

ThreadScope view using forkIO: https://s31.postimg.org/r3mclspe3/fork_IO_N8_ghc8.png

ThreadScope view using forkOS: https://s31.postimg.org/p9n265fff/fork_OS_N8_ghc8.png

I was able to reproduce this behavior in both GHC 7.10.2 and GHC 8.0.2. I was also able to reproduce it on two different machines running Ubuntu Server 14.04.3 LTS (kernel 3.19.0-25):

  • 2x10-core Intel Xeon E5-2660 v2 processors (Ivy Bridge), 2.20 GHz, with 256GB of DDR 1600MHz

  • 4-core Intel i7-3770 (IvyBridge) with 8 GB of DDR 1600MHz

Source code + .eventlog files: https://dl.dropboxusercontent.com/u/5798150/fasta-bug.zip

[1] http://benchmarksgame.alioth.debian.org/u64q/program.php?test=fasta&lang=ghc&id=7

Trac metadata
Trac field Value
Version 8.0.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Runtime System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC simonmar
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information