
On Wed, May 12, 2010 at 8:15 PM, Aran Donohue
Hi Cafe,
I have a program that I can reliably cause to hang. It's concurrent using STM, so I think it could be a deadlock or related issue. I also do some IO, so I think it could be blocking in a system call. It only hangs when compiled with -threaded. I tried building with -prof, and running with -hc -xt to get a clue where in which function it is stopping, but the resulting profile didn't help much.
Usually it's the other way around (hangs without threaded). So, I would guess that you're experiencing some sort of deadlock issue.
I've started sprinkling print statements, but I thought I'd trawl for better tips and techniques. Any suggestions on approaches?
Try threadscope: http://research.microsoft.com/en-us/projects/threadscope/ I haven't used it myself but I've heard it's *the* tool for investigating parallel program behavior for haskell programs. Hope that helps, Jason