[Haskell-cafe] concurrent haskell debugging

Svein Ove Aas svein.ove at aas.no
Wed Feb 18 09:27:10 EST 2009


2009/2/18 Jianzhou Zhao <jianzhou at seas.upenn.edu>:
> Hi Folks,
>
> If I am using Control.Concurrent package, does GHC have any
> static or runtime tools or debuggers to detect problems,
> such as deadlock, data races?
>
Deadlocks should be detected out of the box if you compile with
-threaded, with the system being able to detect whenever there is
absolutely no possibility that a thread can ever wake again, but note
that installing signal handlers will tend to break (sort of) that
logic; after all, you might actually want to use signals to wake them.

Races, not so much. It's pretty easy to design your program so the
issue just never shows up, so I don't think anyone's given it much
thought.


More information about the Haskell-Cafe mailing list