Skip to content

Rare AssertionError in AnalyzerTest #5180

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

Open
sjrd opened this issue May 25, 2025 · 2 comments
Open

Rare AssertionError in AnalyzerTest #5180

sjrd opened this issue May 25, 2025 · 2 comments

Comments

@sjrd
Copy link
Member

sjrd commented May 25, 2025

I just ran into this error while locally running linker2_12/test:

[error] Test org.scalajs.linker.AnalyzerTest.bigCycleInInheritanceChain failed: java.util.concurrent.ExecutionException: Boxed Error, took 0.007 sec
[error]     at scala.concurrent.impl.Promise$.resolver(Promise.scala:97)
[error]     at scala.concurrent.impl.Promise$.scala$concurrent$impl$Promise$$resolveTry(Promise.scala:89)
[error]     at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:294)
[error]     at scala.concurrent.Promise.complete(Promise.scala:53)
[error]     at scala.concurrent.Promise.complete$(Promise.scala:52)
[error]     at scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:197)
[error]     at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:42)
[error]     at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:74)
[error]     at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423)
[error]     at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
[error]     at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
[error]     at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
[error]     at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
[error]     at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
[error] Caused by: java.lang.AssertionError: assertion failed: unresolved root: ClassName<D>
[error]     at scala.Predef$.assert(Predef.scala:223)
[error]     at org.scalajs.linker.analyzer.AnalyzerRun.$anonfun$lookupOrSynthesizeClassCommon$1(Analyzer.scala:351)
[error]     at org.scalajs.linker.analyzer.AnalyzerRun.$anonfun$lookupOrSynthesizeClassCommon$1$adapted(Analyzer.scala:345)
[error]     at scala.util.Success.$anonfun$map$1(Try.scala:255)
[error]     at scala.util.Success.map(Try.scala:213)
[error]     at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)
[error]     ... 8 more
[error] Failed: Total 163, Failed 1, Errors 0, Passed 162
[error] Failed tests:
[error]         org.scalajs.linker.AnalyzerTest
[error] (linker2_12 / Test / test) sbt.TestsFailedException: Tests unsuccessful

I could not reproduce it, so I'm documenting it for future investigation.

@sjrd sjrd changed the title Rare error in AnalyzerTest Rare AssertionError in AnalyzerTest May 25, 2025
@Huge
Copy link

Huge commented May 26, 2025

@sjrd What did you try to reproduce it? What was the OS/setup you've run the test on?

I'd suggest running just this specific test repeatedly, like for a whole hour maybe, to see if you can probabilistically reproduce the failure. Try to have various workloads on the OS/environment to see if resource constraints might be causing it.

Most likely guess for this would be a race condition.

@sjrd
Copy link
Member Author

sjrd commented May 26, 2025

Thanks. Yes, it's most certainly a race condition. We'll have to investigate, as I mentioned.

(this was Linux, Temurin 17; other details are probably irrelevant)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants