[MLton-devel] D2 problem
Stephen Weeks
MLton@mlton.org
Fri, 19 Apr 2002 10:05:54 -0700
> As regards the second problem (alloc/gc failure):
>
> 1) I was able to reproduce the problem with the version you
> indicated (20020410);
>
> 2) the swap file of my W2K system is now 2024Mb large (it was 1Gb
> before).
>
> I am including two logs of the run, with gc-messages on:
>
> crash.log: run under Windows, with 512Mb RAM
> crash.ok.log: run under Linux, with 512Mb RAM
>
> The last part of crash.log looks particularly suscpicious to me:
>
> live(bytes): 685,348 (10.8%)
> /tmp/fileMfaXAD.2.S 59356: GC_doGC
> Starting gc. bytesRequested = 0
> fromSpace = 23c80000 toSpace = 490000
> fromSpace size = 640,860,160 toSpace 6,262,784
> Out of memory (forward).
> size=512000008 skip=0 remaining=6203104 s->fromSize=640860160
> s->toSize=6262784 headerBytes=8 objectBytes=512000000 header=4000
> Diagnostic: probably a RAM problem.
>
> The size of toSpace is less than that of live.
Yeah, I guess this is because MLton was not able to allocate any more
space. Although, in that case I would have expected to see the
backoff messages in computeSemiSize. Could you try compiling gc.c
with DEBUG_MEM = TRUE, and with an additional call to showMem on line
1487, so we can see the state of virtual memory at the point of
failure? Like this
if (s->back + size + skip > s->toLimit) {
showMem ();
die("Out of memory (forward).\nsize=%u skip=%u remaining=%u s->fromSize=%u s->toSize=%u headerBytes=%d objectBytes=%u header=%x\nDiagnostic: probably a RAM problem.",
size, skip, s->toLimit - s->back, s->fromSize, s->toSize, headerBytes, objectBytes, header);
}
> Notice that the
> corresponding log under Linux seems more understandable:
>
> live(bytes): 685,348 (10.8%)
> /tmp/filecRKdyp.2.S 61514: GC_doGC
> Starting gc. bytesRequested = 0
> fromSpace = 4014e000 toSpace = 98000000
> fromSpace size = 640,860,160 toSpace 640,860,160
> Shrinking new space at 98000000 to 640798720 bytes.
> Shrinking old space at 4014e000 to 0 bytes.
> Finished gc.
>
> Can you reproduce the problem on your Windows machine ? If not,
> how much RAM do you use ? Asumming you have more RAM than me,
> perhaps you may want to modify the crash.sml source to allocate
> 1Gb instead of 0.5Gb ?
I run my Windows machine with 408M when doing large tests. I'll play
around with your program and try to recreate the error.
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel