Bug#575534: [GHC] #4074: Forking not possible with large processes
#4074: Forking not possible with large processes
---------------------------------+------------------------------------------
Reporter: nomeata | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.12.1 | Keywords:
Os: Linux | Testcase:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
If a haskell program requires a lot of memory, trying to fork() fails
because, due to the program size, the clone() syscall takes long and will
interrupted by the ghc runtime timer, restarting the syscall, just to be
interrupted again.
This happens repeatedly with ghc 6.12, which seems to require noticeable
more memory than 6.10, when building large Haskell programs on slower
arches, and causes some problems with Haskell in Debian.
The problem can also be observed by running a simple C program that
malloc’s a lot of memory (in the range of 1G) and then tries to fork with
profiling enabled.
In the corresponding Debian bug report against libc
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=575534), which also has
the demo C code, it was suggested that it might be the program’s
responsibility to disable such timers while clone() runs.
Do you agree with that? Is it something you can do? Might this be related
to #1882 (which mentions timers and fork)?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4074>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
Reply to: