
Joey Adams wrote:
Off the top of my head, I'm not aware of any (non-Windows-related) gotchas with using -threaded. However, some functions in MissingH (e.g. in System.Cmd.Utils) call forkProcess. To quote the documentation of forkProcess [1]:
--- forkProcess comes with a giant warning: since any other running threads are not copied into the child process, it's easy to go wrong: e.g. by accessing some shared resource that was held by another thread in the parent. ---
Perhaps the forked process is inheriting an interleaved computation that tries to use resources in the parent process.
This does seem at least a possibility, I'll try forcing inputs and see. Are there any good general methods to debug threading mutex type problems in ghc? -- see shy jo