libecj-bootstrap-native_3.6.2.bb failing in do_compile randomly
libecj-bootstrap-native_3.6.2.bb failing in do_compile randomly in my build. The failure occurrence is very less.
I am triggering build by removing all sstate cache, multiple times and liecj-bootstrap-native gets fail for 2 times out of 50. The occurrence rate is very less but still, I think we need to check the issue.
Below are some of the failure messages.
Found 1 semantic error compiling "source/org/eclipse/jdt/internal/compiler/problem/DefaultProblemFactory.java":
24. public class DefaultProblemFactory implements IProblemFactory {
^-------------^
*** Semantic Error: Type "IProblemFactory" was not found.
*** Semantic Error: Type "org.eclipse.jdt.internal.compiler.AbstractAnnotationProcessorManager" was not found.
61. import org.eclipse.jdt.internal.compiler.ICompilerRequestor;
^----------------^
*** Semantic Error: Type "org.eclipse.jdt.internal.compiler.ICompilerRequestor" was not found.
I think some race condition is occurring while compilation. I checked the do_compile code, BB_NUMBER_THREAD is getting used for making the compilation of java files parallel, I think that might be causing the race condition but I am not sure. If we remove the use of BB_NUMBER_THREAD then compilation will get single-threaded but I am not sure if that will be fine. And as the issue is not occurring very often it's hard to say if this will fix the issue.