'select' fails for very large arguments to 'threadDelay'
The following program crashes GHC with an internal error:
import Control.Concurrent
main = threadDelay 9223372036840001
That seems to be the smallest value that still crashes threadDelay. The next smallest value works. Interestingly, the largest value that works happens to be equal to:
((maxBound :: Int) div 10^7 - 1) * 10^4
- .. for whatever that's worth.
If you compile this (with or without optimizations) on ghc-7.4.1, the program crashes with the following error message:
select: Invalid argument bug: internal error: select failed
(GHC version 7.4.1 for x86_64_unknown_linux)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Aborted
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.4.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |