[MLton] Problem with the setitimer() emulation for MinGW

Wesley W. Terpstra wesley at terpstra.ca
Mon Aug 31 10:58:32 PDT 2009


On Mon, Aug 31, 2009 at 10:34 AM, Nicolas Bertolotti <
Nicolas.Bertolotti at mathworks.fr> wrote:

>  TimeLimit is included in smlnj-lib/Util. It uses the structure Engine
> (same location) which itself relies on MLton.Itimer.
>
Ahh, I see. I have never used smlnj-lib myself.

> 10 seconds means nothing for my program. The time limit I set is 30
> minutes.
>
Is the time it takes to fail the same on computers with different processing
speeds? ie: on a computer twice as slow will it crash in 20 seconds or still
10 seconds?

> The computation we perform in the application is pure mathematics
>
This is very odd. It reproducibly fails after 10s each time? What is the
failure message anyway?

One way to debug the problem might be to watch what system calls the program
is doing right before it dies. There are a few tools for windows that work
like 'strace' in Unix. I've found them useful in debugging problems like
this in my own programs, but I don't recall the name of the one I used most
recently. I think it may have been straceNT [1].

Please note that I also could not manage to extract a sample program that
> reproduces the issue (I experienced it using Windows XP) … it would have
> been too easy.
>

If you could try slowly eliminating your program until the problem
disappears, we might find what the interaction is.

[1] <http://www.intellectualheaven.com/default.asp?BH=projects&H=strace.htm>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mlton.org/pipermail/mlton/attachments/20090831/8d1b7a41/attachment.htm


More information about the MLton mailing list