simonmar / monad-par

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getEmpty unit test fails in a way that calls into question exception handling

rrnewton opened this issue · comments

See notes in ParTests.hs.

This is only an issue with the Direct scheduler, and seems to emerge from the attempt to catch errors on worker threads. Trace doesn't bother, and misses any exceptions from child threads, so it avoids this problem.

Turning on WAIT_FOR_WORKERS in Direct does not help the problem. However, it does seem to result in a bunch of downstream failures currently:

  justReturn: [Failed]
ERROR: thread blocked indefinitely in an MVar operation

  oneIVar: [OK]

  forkNFill: [Failed]
ERROR: thread blocked indefinitely in an MVar operation

  getEmpty: [Failed]
ERROR: thread blocked indefinitely in an MVar operation

  test diamond: [Failed]
ERROR: thread blocked indefinitely in an MVar operation


Exception inside child thread "(worker 0 of originator ThreadId 13)", ThreadId 40: thread blocked indefinitely in an MVar operation

Exception inside child thread "(worker 1 of originator ThreadId 13)", ThreadId 41: thread blocked indefinitely in an MVar operation
Exception inside child thread "(worker 3 of originator ThreadId 13)", ThreadId 43: thread blocked indefinitely in an MVar operation

  test pmrr1: [Failed]
ERROR: thread blocked indefinitely in an MVar operation