rascal
                                
                                 rascal copied to clipboard
                                
                                    rascal copied to clipboard
                            
                            
                            
                        Intermittent failure with parallel builder jobs
Describe the bug
The Rascal compile mojo sometimes fails with the following stacktrace. After re-running the same job, the issue has never appeared again immediately. Just after a few days or weeks it sometimes pops up.
This behavior could hypothetically be caused by some kind of race condition. However, this is not visible from
the stacktrace. The stacktrace shows an effect, not a cause. Here we apparantly have a module that is
not fully loaded, or one of its dependencies has not loaded and so it can not find the function solver.
Maybe the module has not fully loaded yet? That would explain this bug, but I don't know how likely this guess is.
org.rascalmpl.interpreter.staticErrors.UndeclaredVariable: Undeclared variable: solver
Advice: |http://tutor.rascal-mpl.org/Errors/Static/UndeclaredVariable/UndeclaredVariable.html|
    at Solver.? (/analysis/typepal/Solver.rsc:1737)
    at org.rascalmpl.semantics.dynamic.Expression$QualifiedName.interpret (Expression.java:2113)
    at org.rascalmpl.semantics.dynamic.Expression$CallOrTree.interpret (Expression.java:477)
    at org.rascalmpl.semantics.dynamic.Declarator$Default.interpret (Declarator.java:52)
    at org.rascalmpl.semantics.dynamic.LocalVariableDeclaration$Default.interpret (LocalVariableDeclaration.java:36)
    at org.rascalmpl.semantics.dynamic.Statement$VariableDeclaration.interpret (Statement.java:1003)
    at org.rascalmpl.interpreter.result.RascalFunction.runBody (RascalFunction.java:388)
    at org.rascalmpl.interpreter.result.RascalFunction.call (RascalFunction.java:329)
    at org.rascalmpl.interpreter.result.OverloadedFunction.callWith (OverloadedFunction.java:410)
    at org.rascalmpl.interpreter.result.OverloadedFunction.call (OverloadedFunction.java:370)
    at org.rascalmpl.semantics.dynamic.Expression$CallOrTree.interpret (Expression.java:535)
    at org.rascalmpl.semantics.dynamic.Statement$Expression.interpret (Statement.java:365)
    at org.rascalmpl.semantics.dynamic.Statement$Assignment.interpret (Statement.java:205)
    at org.rascalmpl.interpreter.result.RascalFunction.runBody (RascalFunction.java:388)
    at org.rascalmpl.interpreter.result.RascalFunction.call (RascalFunction.java:329)
    at org.rascalmpl.semantics.dynamic.Expression$CallOrTree.interpret (Expression.java:535)
    at org.rascalmpl.semantics.dynamic.Statement$Expression.interpret (Statement.java:365)
    at org.rascalmpl.semantics.dynamic.Statement$Assignment.interpret (Statement.java:205)
    at org.rascalmpl.semantics.dynamic.Statement$NonEmptyBlock.interpret (Statement.java:759)
    at org.rascalmpl.semantics.dynamic.Statement$IfThen.interpret (Statement.java:604)
    at org.rascalmpl.semantics.dynamic.Statement$NonEmptyBlock.interpret (Statement.java:759)
    at org.rascalmpl.semantics.dynamic.Statement$While.interpret (Statement.java:1089)
    at org.rascalmpl.semantics.dynamic.Statement$NonEmptyBlock.interpret (Statement.java:759)
    at org.rascalmpl.semantics.dynamic.Statement$Try.evalStatementTry (Statement.java:939)
    at org.rascalmpl.semantics.dynamic.Statement$Try.interpret (Statement.java:932)
    at org.rascalmpl.interpreter.result.RascalFunction.runBody (RascalFunction.java:388)
    at org.rascalmpl.interpreter.result.RascalFunction.call (RascalFunction.java:329)
    at org.rascalmpl.semantics.dynamic.Expression$CallOrTree.interpret (Expression.java:535)
    at org.rascalmpl.semantics.dynamic.Statement$Expression.interpret (Statement.java:365)
    at org.rascalmpl.semantics.dynamic.Statement$Assignment.interpret (Statement.java:205)
    at org.rascalmpl.interpreter.result.RascalFunction.runBody (RascalFunction.java:388)
    at org.rascalmpl.interpreter.result.RascalFunction.call (RascalFunction.java:329)
    at org.rascalmpl.interpreter.result.AbstractFunction.call (AbstractFunction.java:206)
    at org.rascalmpl.interpreter.Evaluator.call (Evaluator.java:736)
    at org.rascalmpl.interpreter.Evaluator.call (Evaluator.java:719)
    at org.rascalmpl.interpreter.Evaluator.call (Evaluator.java:525)
    at org.rascalmpl.interpreter.Evaluator.call (Evaluator.java:482)
    at org.rascalmpl.maven.CompileRascalMojo.runCheckerSingle (CompileRascalMojo.java:408)
    at org.rascalmpl.maven.CompileRascalMojo.lambda$null$8 (CompileRascalMojo.java:323)
    at org.rascalmpl.util.ConcurrentSoftReferenceObjectPool.useAndReturn (ConcurrentSoftReferenceObjectPool.java:96)
    at org.rascalmpl.maven.CompileRascalMojo.lambda$runChecker$10 (CompileRascalMojo.java:319)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
    at java.lang.Thread.run (Thread.java:748)
In which part of the build is it? Since the prelude is typechecked without any parallel operations.
But in general, we construct a fresh evaluator for every workerthread. But this looks like the import went wrong but still continued loading?
this is in the main phase (after the pre-phase is finished):
at org.rascalmpl.maven.CompileRascalMojo.lambda$null$8 (CompileRascalMojo.java:323)
Notice how it finds the check function just fine, it's only when executing it and other functions that check calls that the solver function is not resolved (anymore). I suspect that the current evaluator that throws this exception has never been in a correct state and that other evaluators were used to compile the prelude. Can't be sure.
Maybe we should make sure error messages aren't dropped during import?
they are all reported via the monitor interface (calls to warning), so if
the monitor is implemented correctly then we see them, otherwise not.
I'll have a look..
On Mon, Sep 13, 2021 at 3:35 PM Davy Landman @.***> wrote:
Maybe we should make sure error messages aren't dropped during import?
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/usethesource/rascal/issues/1530#issuecomment-918197581, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPF5F6VIEAVWQYNMANHPALUBX4ZLANCNFSM5D5ZWSAQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Jurgen Vinju http://jurgen.vinju.org CWI SWAT TU Eindhoven Swat.engineering BV
Here is another instance that happened last night:
- https://github.com/usethesource/rascal/runs/3635877470?check_suite_focus=true
- logs_133.zip
I've uploaded the logs in case someone presses Re-run all jobs because the bug is not deterministic
The other threads are throwing different errors, but of a similar kind (not fully loaded modules):
[warn] |lib://typepal/analysis/typepal/ISolver.rsc|(35,49,<3,0>,<3,49>): Could not load analysis::typepal::ConfigurableScopeGraph due to: trying to construct a type from an unsupported type symbol: sort("ANONYMOUS_OCCURRENCE"), with this representation: Symbol = sort(str name) at |lib://typepal/analysis/typepal/ISolver.rsc|(35,49,<3,0>,<3,49>)
java.lang.IllegalArgumentException: trying to construct a type from an unsupported type symbol: sort("ANONYMOUS_OCCURRENCE"), with this representation: Symbol = sort(str name)
	at io.usethesource.vallang.type.TypeFactory$TypeValues.fromSymbol(TypeFactory.java:1098)
	at io.usethesource.vallang.type.TypeFactory.fromSymbol(TypeFactory.java:729)
	at org.rascalmpl.types.TypeReifier.symbolToType(TypeReifier.java:178)
	at org.rascalmpl.values.RascalValueFactory.reifiedType(RascalValueFactory.java:389)
	at org.rascalmpl.semantics.dynamic.Expression$AsType.interpret(Expression.java:1087)
	at org.rascalmpl.semantics.dynamic.Expression$Bracket.interpret(Expression.java:330)
	at org.rascalmpl.semantics.dynamic.Expression$GetAnnotation.interpret(Expression.java:965)
	at org.rascalmpl.semantics.dynamic.Declaration$Variable.interpret(Declaration.java:136)
	at org.rascalmpl.semantics.dynamic.Toplevel$GivenVisibility.interpret(Toplevel.java:35)
	at org.rascalmpl.semantics.dynamic.Module$Default.interpret(Module.java:79)
	at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:319)
	at org.rascalmpl.semantics.dynamic.Import.extendCurrentModule(Import.java:270)
	at org.rascalmpl.semantics.dynamic.Import$Extend.interpret(Import.java:193)
	at org.rascalmpl.semantics.dynamic.Import.evalImport(Import.java:477)
	at org.rascalmpl.semantics.dynamic.Import.parseModuleAndFragments(Import.java:447)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1435)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1429)
	at org.rascalmpl.semantics.dynamic.Import.buildModule(Import.java:378)
	at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:306)
	at org.rascalmpl.semantics.dynamic.Import.extendCurrentModule(Import.java:270)
	at org.rascalmpl.semantics.dynamic.Import$Extend.interpret(Import.java:193)
	at org.rascalmpl.semantics.dynamic.Import.evalImport(Import.java:477)
	at org.rascalmpl.semantics.dynamic.Import.parseModuleAndFragments(Import.java:447)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1435)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1429)
	at org.rascalmpl.semantics.dynamic.Import.buildModule(Import.java:378)
	at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:306)
	at org.rascalmpl.semantics.dynamic.Import.extendCurrentModule(Import.java:270)
	at org.rascalmpl.semantics.dynamic.Import$Extend.interpret(Import.java:193)
	at org.rascalmpl.semantics.dynamic.Import.evalImport(Import.java:477)
	at org.rascalmpl.semantics.dynamic.Import.parseModuleAndFragments(Import.java:447)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1435)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1429)
	at org.rascalmpl.semantics.dynamic.Import.buildModule(Import.java:378)
	at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:306)
	at org.rascalmpl.semantics.dynamic.Import.extendCurrentModule(Import.java:270)
	at org.rascalmpl.semantics.dynamic.Import$Extend.interpret(Import.java:193)
	at org.rascalmpl.semantics.dynamic.Import.evalImport(Import.java:477)
	at org.rascalmpl.semantics.dynamic.Import.parseModuleAndFragments(Import.java:447)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1435)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1429)
	at org.rascalmpl.semantics.dynamic.Import.buildModule(Import.java:378)
	at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:306)
	at org.rascalmpl.semantics.dynamic.Import.extendCurrentModule(Import.java:270)
	at org.rascalmpl.semantics.dynamic.Import$Extend.interpret(Import.java:193)
	at org.rascalmpl.semantics.dynamic.Import.evalImport(Import.java:477)
	at org.rascalmpl.semantics.dynamic.Import.parseModuleAndFragments(Import.java:447)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1435)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1429)
	at org.rascalmpl.semantics.dynamic.Import.buildModule(Import.java:378)
	at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:306)
	at org.rascalmpl.semantics.dynamic.Import.extendCurrentModule(Import.java:270)
	at org.rascalmpl.semantics.dynamic.Import$Extend.interpret(Import.java:193)
	at org.rascalmpl.semantics.dynamic.Import.evalImport(Import.java:477)
	at org.rascalmpl.semantics.dynamic.Import.parseModuleAndFragments(Import.java:447)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1435)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1429)
	at org.rascalmpl.semantics.dynamic.Import.buildModule(Import.java:378)
	at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:306)
	at org.rascalmpl.semantics.dynamic.Import.extendCurrentModule(Import.java:270)
	at org.rascalmpl.semantics.dynamic.Import$Extend.interpret(Import.java:193)
	at org.rascalmpl.semantics.dynamic.Import.evalImport(Import.java:477)
	at org.rascalmpl.semantics.dynamic.Import.parseModuleAndFragments(Import.java:447)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1435)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1429)
	at org.rascalmpl.semantics.dynamic.Import.buildModule(Import.java:378)
	at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:306)
	at org.rascalmpl.semantics.dynamic.Import.extendCurrentModule(Import.java:270)
	at org.rascalmpl.semantics.dynamic.Import$Extend.interpret(Import.java:193)
	at org.rascalmpl.semantics.dynamic.Import.evalImport(Import.java:477)
	at org.rascalmpl.semantics.dynamic.Import.parseModuleAndFragments(Import.java:447)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1435)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1429)
	at org.rascalmpl.semantics.dynamic.Import.buildModule(Import.java:378)
	at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:306)
	at org.rascalmpl.semantics.dynamic.Import.extendCurrentModule(Import.java:270)
	at org.rascalmpl.semantics.dynamic.Import$Extend.interpret(Import.java:193)
	at org.rascalmpl.semantics.dynamic.Import.evalImport(Import.java:477)
	at org.rascalmpl.semantics.dynamic.Import.parseModuleAndFragments(Import.java:447)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1435)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1429)
	at org.rascalmpl.semantics.dynamic.Import.buildModule(Import.java:378)
	at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:306)
	at org.rascalmpl.semantics.dynamic.Import.extendCurrentModule(Import.java:270)
	at org.rascalmpl.semantics.dynamic.Import$Extend.interpret(Import.java:193)
	at org.rascalmpl.semantics.dynamic.Import.evalImport(Import.java:477)
	at org.rascalmpl.semantics.dynamic.Import.parseModuleAndFragments(Import.java:447)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1435)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1429)
	at org.rascalmpl.semantics.dynamic.Import.buildModule(Import.java:378)
	at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:306)
	at org.rascalmpl.semantics.dynamic.Import.extendCurrentModule(Import.java:270)
	at org.rascalmpl.semantics.dynamic.Import$Extend.interpret(Import.java:193)
	at org.rascalmpl.semantics.dynamic.Import.evalImport(Import.java:477)
	at org.rascalmpl.semantics.dynamic.Import.parseModuleAndFragments(Import.java:447)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1435)
	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1429)
	at org.rascalmpl.semantics.dynamic.Import.buildModule(Import.java:378)
	at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:306)
	at org.rascalmpl.semantics.dynamic.Import.importModule(Import.java:240)
	at org.rascalmpl.interpreter.Evaluator.doImport(Evaluator.java:1163)
	at org.rascalmpl.maven.MojoUtils.makeEvaluator(MojoUtils.java:70)
	at org.rascalmpl.maven.CompileRascalMojo.makeEvaluator(CompileRascalMojo.java:127)
	at org.rascalmpl.maven.CompileRascalMojo.lambda$createEvaluatorPool$11(CompileRascalMojo.java:367)
	at org.rascalmpl.util.ConcurrentSoftReferenceObjectPool.checkoutObject(ConcurrentSoftReferenceObjectPool.java:152)
	at org.rascalmpl.util.ConcurrentSoftReferenceObjectPool.useAndReturn(ConcurrentSoftReferenceObjectPool.java:93)
	at org.rascalmpl.maven.CompileRascalMojo.lambda$runChecker$4(CompileRascalMojo.java:290)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
This last one is interesting, because it is about one of the Symbol constructors which are constructed by the (static singleton instance) TypeFactory via reflection . If that goes wrong, basically nothing from ParseTree and Type will work, and thus almost nothing at all.
So an hypothesis is that multiple threads are running that initialization code at the same time and that code is not thread-safe?
That would explain some things indeed, maybe it's using a map in a slightly incompatible way?
On Sat, Sep 18, 2021, 10:38 Jurgen J. Vinju @.***> wrote:
So an hypothesis is that multiple threads are running that initialization code at the same time and that code is not thread-safe?
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/usethesource/rascal/issues/1530#issuecomment-922241547, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABL3E2EHFEL4BIU44C2AILUCRFWZANCNFSM5D5ZWSAQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
I think we might have to synchronize the entire initialization of the Singleton just to be safe. If that is the problem...
On Sat, 18 Sep 2021 at 12:08, Davy Landman @.***> wrote:
That would explain some things indeed, maybe it's using a map in a slightly incompatible way?
On Sat, Sep 18, 2021, 10:38 Jurgen J. Vinju @.***> wrote:
So an hypothesis is that multiple threads are running that initialization code at the same time and that code is not thread-safe?
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub < https://github.com/usethesource/rascal/issues/1530#issuecomment-922241547 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AABL3E2EHFEL4BIU44C2AILUCRFWZANCNFSM5D5ZWSAQ
. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/usethesource/rascal/issues/1530#issuecomment-922253054, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPF5F236Z5GX6GRFAQOWVTUCRQILANCNFSM5D5ZWSAQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Jurgen Vinju http://jurgen.vinju.org CWI SWAT TU Eindhoven Swat.engineering BV
Can you point to where you expect it failing?
Since adding a big fat lock around is sounds quite aggressive. And also, was never needed for rascal eclipse that was also keeping multiple evaluators in memory at the same time.
On Sat, Sep 18, 2021, 14:35 Jurgen J. Vinju @.***> wrote:
I think we might have to synchronize the entire initialization of the Singleton just to be safe. I'd that is the problem...
On Sat, 18 Sep 2021 at 12:08, Davy Landman @.***> wrote:
That would explain some things indeed, maybe it's using a map in a slightly incompatible way?
On Sat, Sep 18, 2021, 10:38 Jurgen J. Vinju @.***> wrote:
So an hypothesis is that multiple threads are running that initialization code at the same time and that code is not thread-safe?
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub <
https://github.com/usethesource/rascal/issues/1530#issuecomment-922241547
, or unsubscribe <
https://github.com/notifications/unsubscribe-auth/AABL3E2EHFEL4BIU44C2AILUCRFWZANCNFSM5D5ZWSAQ
. Triage notifications on the go with GitHub Mobile for iOS <
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android <
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub
.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub < https://github.com/usethesource/rascal/issues/1530#issuecomment-922253054 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAPF5F236Z5GX6GRFAQOWVTUCRQILANCNFSM5D5ZWSAQ
. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .
-- Jurgen Vinju http://jurgen.vinju.org CWI SWAT TU Eindhoven Swat.engineering BV
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/usethesource/rascal/issues/1530#issuecomment-922270261, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABL3EZLDX37KLEN3FCE7TTUCSBRNANCNFSM5D5ZWSAQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
I will try. I'm not sure this is the problem but at least it's something to look for.
from the commandline, mvn release:prepare and again it failed in the same way. This happens to me every other day. It's becoming annoying :-)
[INFO] INFO: resolved |lib://rascal-core| at |jar+file:///Users/jurgenv/.m2/repository/org/rascalmpl/rascal-core/0.7.8/rascal-core-0.7.8.jar!/|
[INFO] [INFO] start loading the compiler
[INFO] [INFO] start loading the compiler
[INFO] [INFO] start loading the compiler
[INFO] [INFO] 	rascal module path addition: |lib://typepal|
[INFO] [INFO] 	rascal module path addition: |lib://rascal-core|
[INFO] [INFO] 	rascal module path addition: |lib://typepal|
[INFO] [INFO] 	rascal module path addition: |lib://typepal|
[INFO] [INFO] 	rascal module path addition: |lib://rascal-core|
[INFO] [INFO] 	rascal module path addition: |std:///|
[INFO] [INFO] 	rascal module path addition: |std:///|
[INFO] [INFO] 	importing lang::rascalcore::check::Checker
[INFO] [INFO] 	rascal module path addition: |lib://rascal-core|
[INFO] [INFO] 	rascal module path addition: |std:///|
[INFO] [INFO] 	importing lang::rascalcore::check::Checker
[INFO] [INFO] 	importing lang::rascalcore::check::Checker
[INFO] [warn] |lib://typepal/analysis/typepal/ICollector.rsc|(38,49,<3,0>,<3,49>): Could not load analysis::typepal::ConfigurableScopeGraph due to: trying to construct a type from an unsupported type symbol: sort("ANONYMOUS_OCCURRENCE"), with this representation: Symbol = sort(str name) at |lib://typepal/analysis/typepal/ICollector.rsc|(38,49,<3,0>,<3,49>)
[INFO] [warn] |lib://typepal/analysis/typepal/ICollector.rsc|(38,49,<3,0>,<3,49>): Could not load analysis::typepal::ConfigurableScopeGraph due to: trying to construct a type from an unsupported type symbol: sort("ANONYMOUS_OCCURRENCE"), with this representation: Symbol = sort(str name) at |lib://typepal/analysis/typepal/ICollector.rsc|(38,49,<3,0>,<3,49>)
[INFO] [warn] |lib://typepal/analysis/typepal/ICollector.rsc|(38,49,<3,0>,<3,49>): Could not load analysis::typepal::ConfigurableScopeGraph due to: trying to construct a type from an unsupported type symbol: sort("ANONYMOUS_OCCURRENCE"), with this representation: Symbol = sort(str name) at |lib://typepal/analysis/typepal/ICollector.rsc|(38,49,<3,0>,<3,49>)
[INFO] java.lang.IllegalArgumentException: trying to construct a type from an unsupported type symbol: sort("ANONYMOUS_OCCURRENCE"), with this representation: Symbol = sort(str name)
[INFO] 	at io.usethesource.vallang.type.TypeFactory$TypeValues.fromSymbol(TypeFactory.java:1106)
[INFO] 	at io.usethesource.vallang.type.TypeFactory.fromSymbol(TypeFactory.java:730)
[INFO] 	at org.rascalmpl.types.TypeReifier.symbolToType(TypeReifier.java:178)
[INFO] 	at org.rascalmpl.values.RascalValueFactory.reifiedType(RascalValueFactory.java:389)
[INFO] 	at org.rascalmpl.semantics.dynamic.Expression$AsType.interpret(Expression.java:1087)
[INFO] 	at org.rascalmpl.semantics.dynamic.Expression$Bracket.interpret(Expression.java:330)
[INFO] 	at org.rascalmpl.semantics.dynamic.Expression$GetAnnotation.interpret(Expression.java:965)
[INFO] 	at org.rascalmpl.semantics.dynamic.Declaration$Variable.interpret(Declaration.java:136)
[INFO] 	at org.rascalmpl.semantics.dynamic.Toplevel$GivenVisibility.interpret(Toplevel.java:35)
[INFO] 	at org.rascalmpl.semantics.dynamic.Module$Default.interpret(Module.java:79)
[INFO] 	at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:319)
[INFO] 	at org.rascalmpl.semantics.dynamic.Import.extendCurrentModule(Import.java:270)
[INFO] 	at org.rascalmpl.semantics.dynamic.Import$Extend.interpret(Import.java:193)
[INFO] 	at org.rascalmpl.semantics.dynamic.Import.evalImport(Import.java:477)
[INFO] 	at org.rascalmpl.semantics.dynamic.Import.parseModuleAndFragments(Import.java:447)
[INFO] 	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1416)
[INFO] 	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1410)
[INFO] 	at org.rascalmpl.semantics.dynamic.Import.buildModule(Import.java:378)
[INFO] 	at org.rascalmpl.semantics.dynamic.Import.loadModule(Import.java:306)
[INFO] 	at org.rascalmpl.semantics.dynamic.Import.extendCurrentModule(Import.java:270)
[INFO] 	at org.rascalmpl.semantics.dynamic.Import$Extend.interpret(Import.java:193)
[INFO] 	at org.rascalmpl.semantics.dynamic.Import.evalImport(Import.java:477)
[INFO] 	at org.rascalmpl.semantics.dynamic.Import.parseModuleAndFragments(Import.java:447)
[INFO] 	at org.rascalmpl.interpreter.Evaluator.parseModuleAndFragments(Evaluator.java:1416)
this should point to some kind of multi-threading issue inside either the interpreter or vallang?
Since all what happens is that we start multiple evaluators on separate threads, and let give them some stuff to import (the same module) and run the typechecker. They don't share output directories. bit this looks a lot like it goes wrong during import.
Like typefactory kinda bug?
It's the TypeFactory indeed. Here's another run, now cause by mvn test instead of mvn release:prepare:
[INFO] Running org.rascalmpl.test.AllSuiteParallel
INFO: detected |lib://rascal| at |file:///Users/jurgenv/git/rascal/target/classes/|
Rascal JUnit uses Rascal version Rascal version not specified in META-INF/MANIFEST.MF???
Rascal JUnit Project root: |file:///Users/jurgenv/git/rascal/|
Number of workers based on CPU: 4
Number of workers based on memory: 4 (2048)
Running parallel test with 4 runners
Iterating modules: 8ms
java.lang.IllegalArgumentException: trying to construct a type from an unsupported type symbol: start(sort("Module")), with this representation: Symbol = start(Symbol symbol)
	at io.usethesource.vallang.type.TypeFactory$TypeValues.fromSymbol(TypeFactory.java:1106)
	at io.usethesource.vallang.type.TypeFactory.fromSymbol(TypeFactory.java:730)
	at org.rascalmpl.types.TypeReifier.symbolToType(TypeReifier.java:208)
	at org.rascalmpl.values.RascalValueFactory.reifiedType(RascalValueFactory.java:389)
hmm, that makes me suspicious of this commit: https://github.com/usethesource/vallang/commit/646ae5945e6ecc6a25f3fe444aa4958371fac56b
it is a lot of detailed code in that commit to study; but we should first look at the current exception and reason back to what the race must have been.
true, just saying, we changed something in the caching/hashconsing logic. so that might be a cause for it. but agreed, first figure out what is clashing.
The Symbols are supported by  dependency injection via types.config files in the classpath which contain the names of the reifier classes to instantiate and store into a hash table for later reference. This loading occurs during the constructor of TypeFactory, so I am confused as to how TypeFactory.fromSymbol can execute before this loading has finished completely. This I would like to clear up before continuing our search.
I see at least 1 race here:
https://github.com/usethesource/vallang/blob/5ffa6b8942b3b95b6b0dcbc84ee53f8cf44e5edc/src/main/java/io/usethesource/vallang/type/TypeFactory.java#L1150-L1151
between the assign of the field and the call to initialize someone could get access to the value of typeValues. fix would be to construct it in a local var, do initialze, and only then assign it into the typeValues field.
a second bug is that there can be two instances of TypeValues class. The field should be volatile to fix it.
See this pull request: https://github.com/usethesource/vallang/pull/160