|
calling back to Haskell from several C threads: msg#00064lang.haskell.glasgow.bugs
attached program crashes under GHC-6.2.1/mingw32 and GHC-6.4/mingw32 algorithm: 1. we create several threads with forkOS 2. each thread calls C function 3. C function in each thread made several calls back to Haskell 4. called Haskell functions do some work with memory 5. all these threads ended because C functions returns 6. we create another several threads... after repeating these steps several times program crashes may be, this error is due to the following from "The GHC Commentary - Supporting multi-threaded interoperation.htm": > Note: As of 20020413, the implementation of the RTS API only serializes > access to the allocator between multiple OS threads wanting to call into > Haskell (via the RTS API.) It does not coordinate this access to the > allocator with that of the OS worker thread that's currently executing within > the RTS. This weakness/bug is scheduled to be tackled as part of an > overhaul/reworking of the RTS API itself. -- Best regards, Bulat mailto:bulatz@xxxxxxxxxx
Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@xxxxxxxxxxx http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ ghc-Bugs-1183229 ] Missing 'x' in User's Guide 7.7: Arrow Notation, SourceForge.net |
|---|---|
| Next by Date: | RE: calling back to Haskell from several C threads, Simon Marlow |
| Previous by Thread: | [ ghc-Bugs-1183229 ] Missing 'x' in User's Guide 7.7: Arrow Notation, SourceForge.net |
| Next by Thread: | RE: calling back to Haskell from several C threads, Simon Marlow |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |