#4303: Segfault in RTS (FFI related?)
-------------------------+--------------------------------------------------
Reporter: patperry | Owner:
Type: bug | Status: new
Priority: normal | Component: Runtime System
Version: 6.12.3 | Keywords:
Testcase: | Blockedby:
Os: MacOS X | Blocking:
Architecture: x86 | Failure: Runtime crash
-------------------------+--------------------------------------------------
The RTS crashes in the middle of a long-running computation involving
multiple FFI calls. I suspect this has something to do with the foreign
call spawning multiple threads, but I'm not sure.
Specifically, the crash is in the middle of a long loop. Each iteration
performs a lot of memory allocation, so GC collections happen fairly
frequently. Also, each iteration involves calls to the (external) BLAS
function DGER. On my machine (dual-processor Mac OS with vecLib), BLAS
functions are often multi-threaded. When I comment out the call to DGER,
the bug does not manifest.
Here is the site of the crash (as reported by gdb):
{{{
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0xc000162d
0x003154ce in StgReturn () at rts/StgCRun.c:137
137 __asm__ volatile (
}}}
Sometimes the crash is at:
{{{
rtsbug: internal error: ASSERTION FAILED: file rts/Schedule.c, line 536
}}}
I'm attaching source files for the buggy program. Unfortunately, they
require BLAS and LAPACK. If there's anything I can do to help, I would be
glad to assist.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4303>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs