[racket-dev] errors from `force`

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Aug 29 11:17:36 EDT 2012

At Wed, 29 Aug 2012 10:34:02 -0400, Sam Tobin-Hochstadt wrote:
> On Wed, Aug 29, 2012 at 9:20 AM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> > At Mon, 27 Aug 2012 17:36:42 -0400, Sam Tobin-Hochstadt wrote:
> >> Since I've made the Typed Racket tests run in parallel, there have
> >> been intermittent errors in DrDr, like this:
> >>
> >>   http://drdr.racket-lang.org/25278/collects/tests/typed-racket/run.rkt
> >>
> >> I'm not sure exactly what could be causing this -- I don't think
> >> promises should ever fail to `force`.  Might there be something I'm
> >> doing wrong, or is this a bug in promises?
> >
> > I've fixed a race in `delay/sync' that I think could cause the error.
> Unfortunately, this DrDr build with your fix still has the problem:
> http://drdr.racket-lang.org/25292/collects/tests/typed-racket/run.rkt
> I've never been able to reproduce this bug on my machine, though.

For this problem, I think I should be looking at `delay/thread',
instead of `delay/sync'.

I can provoke the error in the DrDr report with

 (force (delay/thread (kill-thread (current-thread))))

I'll fix `delay/thread'. But could it be that a test wrapped with
`delay/thread' times out and aborts by killing the current thread?

Posted on the dev mailing list.