Bug in IO manager when increasing the number of capabilities
The new IO manager in HEAD has a logic error in the function responsible for creating more IO manager threads after increasing the number of capabilities with setNumCapabilities. This results in an index-out-of-range error later on in the program when one perform blocking IO.
Test case:
import GHC.Conc
main = do
setNumCapabilities 2
getLine
$ ghc-stage2 -threaded program.hs
$ ./program
program: Ix{Int}.index: Index (1) out of range ((0,0))
The fix is simple and will be arriving shortly.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/base |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |