typelead / eta

The Eta Programming Language, a dialect of Haskell on the JVM
https://eta-lang.org
BSD 3-Clause "New" or "Revised" License
2.61k stars 141 forks source link

Running a tasty test suite hangs in circleci with eta master docker image #922

Open jneira opened 5 years ago

jneira commented 5 years ago

When running a tasty test suite with the default number of threads the execution hangs indefinitely in a circleci env with eta master docker image. In my local windows env the test suite never hangs.

Description

Examples:

However when i've restricted tasty execution to use only one thread, the build successes consistently:

Not sure if it is related with #916 I suspect this change could be related. No succesful multi-threaded execution after it.

Expected Behavior

The execution ot tasty test suite with multiple theads hangs idefinitely

Actual Behavior

The execution should finish

Possible Fix

Maybe is is related with some thead race considition over some resource (files?)

Steps to Reproduce

  1. Remove --num-threads 1 from step "Running tests" from circleci config of dhall-eta master

Context

Setup test suite for dhall-eta

Your Environment

rahulmutt commented 5 years ago

This may or may not be responsible:

screen shot 2019-01-16 at 7 10 23 pm

The reason it starts so many threads is that tasty is written in a way that expects green threads but unless you explicitly use fibers, you're stuck with good old blocking threads in Eta.

Two options here: 1) Rewrite the threading bit of tasty making use of the information above. 2) Implement non-blocking STM operations and add Fiber APIs for them and replace them accordingly in the tasty package.

There's also a chance that I'm wrong and that there's a deeper problem here - perhaps there's a bug in the thread scheduler.

I probably won't get around to investigating this further anytime soon because there's a workaround (just use --num-threads 1).

If anyone needs this fixed, please let me know.