|
RE: ghci crash after exception: msg#00037lang.haskell.glasgow.bugs
On 29 June 2004 00:49, Erkok, Levent wrote: > I've a read-eval-print loop based program that I've been trying to > make more robust by catching and responding to any exceptions that > might be thrown; mainly using Control.Exception.evaluate and > Control.Exception.catch. However, I noticed that once I catch a > non-termination type of error and take care of it, ghc throws me a > "thread blocked indefinitely" message and immediately crashes in the > next read-eval-print attempt right away. I was trying to come up with > a small bit of code to demonstrate this when I noticed ghci behaves > the same: [ ... snip ... ] > Loading package base ... linking ... done. > Prelude> let x=x in x > *** Exception: <<loop>> > Prelude> 3 > > Fail: thread blocked indefinitely Thanks, that's an interesting bug. I've committed a workaround, but the underlying cause of the bug still remains: when a thread is found to be unreachable by the garbage collector, perhaps because it is blocked on itself or an unreachable MVar, then anything it refers to can be finalized. Strangely this problem doesn't affect GHCi on Unix, because the signal handler for ^C keeps the main thread alive and hence everything it points to... Cheers, Simon
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | HOpenGL buglet, Ketil Malde |
|---|---|
| Next by Date: | RE: Nit with 6.2.1, Simon Marlow |
| Previous by Thread: | HOpenGL buglet, Ketil Malde |
| Next by Thread: | RE: Nit with 6.2.1, Simon Marlow |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |