Skip to content

Inductive-implicit-benchmark fails locally before bootstrap but not on CI #4951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Blaisorblade opened this issue Aug 15, 2018 · 1 comment
Closed

Comments

@Blaisorblade
Copy link
Contributor

Since a while, testCompilation fails on inductive-implicits-bench.scala with a stack overflow before bootstrap, but not after bootstrap or on CI. This passes after bootstrap, I think, because of methods that are only tail-recursive if track is inlined. And it passes with -Xss2m in agentOptions (apparently neither sbt's JVM options nor ones in RunnerOrchestration are involved).

Still, why does this pass in the CI? @nicolasstucki wonders if it's due to Linux on the CI (I and @nicolasstucki are on Mac and both see the issue), I wonder if it's due to a different JVM version (FWIW I'm on 1.8.0_172-b11).

[info] Test dotty.tools.dotc.CompilationTests.pos started
-- Error: /Users/pgiarrusso/git/dotty-master-nonwt/tests/pos-deep-subtype/inductive-implicits-bench.scala:60:20 --------
60 |  val sel = Selector[L, Boolean]
   |                    ^
   |Recursion limit exceeded.
   |Maybe there is an illegal cyclic reference?
   |If that's not the case, you could also try to increase the stacksize using the -Xss JVM option.
   |A recurring operation is (inner to outer):
   |
   |  subtype H <:< Int
   |  subtype H :: T <:< Int :: Int :: Int :: Int :: Int :: Int :: Int :: Boolean :: shapeless.HNil
   |  subtype shapeless.Selector[H :: T, H] <:< shapeless.Selector[Int :: Int :: Int :: Int :: Int :: Int :: Int :: Boolean :: shapeless.HNil, Boolean]
[=======================================] completed (1/1, 1 failed, 3s)
[error] Test dotty.tools.dotc.CompilationTests.pos failed: java.lang.AssertionError: Expected no errors when compiling, failed for the following reason(s):
[error]
[error]   - encountered 1 test failures(s), took 4.157 sec
[error]     at dotty.tools.vulpix.ParallelTesting$CompilationTest.checkCompile(ParallelTesting.scala:959)
[error]     at dotty.tools.dotc.CompilationTests.pos(CompilationTests.scala:101)
[error]     ...
[info] Test dotty.tools.dotc.CompilationTests.tastyBootstrap started
No files matched "inductive-implicits-bench" in test
No files matched "inductive-implicits-bench" in test
No files matched "inductive-implicits-bench" in test
No files matched "inductive-implicits-bench" in test
[info] Test dotty.tools.dotc.CompilationTests.posTwice started
No files matched "inductive-implicits-bench" in test
[info] Test dotty.tools.dotc.CompilationTests.genericJavaSignatures started
No files matched "inductive-implicits-bench" in test

================================================================================
Test Report
================================================================================

0 suites passed, 1 failed, 1 total
    tests/pos-deep-subtype/inductive-implicits-bench.scala failed
@Blaisorblade
Copy link
Contributor Author

Since it doesn't always fail locally, I expect it might fail or pass depending on how optimized the code is. I'll propose increasing the stack size before bootstrap.

Blaisorblade added a commit to dotty-staging/dotty that referenced this issue Aug 23, 2018
To test, use `testCompilation inductive-implicits-bench` before and after,
locally.
Blaisorblade added a commit that referenced this issue Aug 24, 2018
Fix #4951: Increase stack size before bootstrap to reduce tests flakyness
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant