Open dcharkes opened 1 year ago
Is it a setting? Tests always run serially for me.
Re segfault, it might be classpath issue, which should throw exception when dart-lang/native#786 is implemented. Again classpath issue may be related to concurrent run.
Re lock, what's the best way? I think a lock file would be still prone to concurrency issues when all tests are run parallely.
The segfault is caused by a run order which I or CI never encountered before. On my system mvn_jar are always cached so never thought about this case.
Basically JAR folder is empty and classpath is empty. Since bindings aren't handling exceptions yet, the JNI call when an exception is pending segfaults.
Fixed it by running jni_gen:download_maven_jars before test. (Once cached in system ~/.m2, maven doesn't need to download again and again, so I think that's fine.)
The loadclass segfault dart-lang/native#783 though, it's strange.
Re: summarizer build happening concurrently, what's the best approach?
Write a lock file, and other process poll repeatedly in fixed intervals until lock gets deleted?
Re: summarizer build happening concurrently, what's the best approach?
Write a lock file, and other process poll repeatedly in fixed intervals until lock gets deleted?
Yes, something like that. You could use an exponential back-off. Every time wait 2x as long as previous time. Or do a fixed interval, whatever makes more sense. (How long does the build typically take.) Maybe also add a timeout, instead of relying on the tests timing out themselves. Then in the timeout it is clear the build failed to complete on time, rather than the test timing out at the default timeout of the tests package without a clear indication why.
When running
dart test
from scratch injni_gen/
:Cannot rename file to './.dart_tool/jni_gen/ApiSummarizer.jar', path = './.dart_tool/jni_gen/target/ApiSummarizer.jar' (OS Error: No such file or directory, errno = 2)
.I believe we're trying to compile the ApiSummerizer multiple times concurrently, because the tests run concurrently.
We either need some kind of locking mechanism so that only one will try to concurrently do it, or we need to only check if it is built in the tests and print an error message with how to build if it is not built or not built since files where changed.
Full log: