[GHC] #12117: Thread by forkIO freezes (while read :: Int if error appears) when compiled with -threaded option