StrategoMix.def not found error during build
Hello, I’m getting a failure during build procedure. It is a random error that identical code produces failure only sometimes.
This is the relevant part from the error log:
[INFO] --- spoofax-maven-plugin:2.4.1:compile (default-compile) @ lang --- [INFO] Exodus environment created: /home/yechan/.pluto/file____home_yechan_Desktop_common-ir_lang [INFO] > Prepare native executables [INFO] > Pack SDF modules [INFO] Execute pack-sdf -i /home/yechan/Desktop/common-ir/lang/syntax/Stratego-PgxCommonIR.sdf -o /home/yechan/Desktop/common-ir/lang/src-gen/syntax/Stratego-PgxCommonIR.def -Idef /tmp/vfs_cache8997168277837051413/tmp_48952_StrategoMix.def -I /home/yechan/Desktop/common-ir/lang/src-gen -I /home/yechan/Desktop/common-ir/lang/syntax -I /home/yechan/Desktop/common-ir/lang -I /home/yechan/Desktop/common-ir/lang/src-gen/syntax -I /home/yechan/Desktop/common-ir/lang/target/replicate/pack-sdf-includes -I /home/yechan/Desktop/common-ir/lang/target/replicate/pack-sdf-includes -I /home/yechan/Desktop/common-ir/lang/target/replicate/pack-sdf-includes -I /home/yechan/Desktop/common-ir/lang/target/replicate/pack-sdf-includes [ERROR] Builder failed unexpectedly org.strategoxt.lang.StrategoException: Exception in execution of primitive 'SSL_EXT_read_text_from_stream' at org.strategoxt.lang.StackSaver.invokeStackFriendly(StackSaver.java:77) at org.strategoxt.lang.Context.invokeStrategyCLI(Context.java:160) at org.metaborg.spoofax.meta.core.pluto.util.StrategoExecutor.executeCLI(StrategoExecutor.java:126) at org.metaborg.spoofax.meta.core.pluto.build.PackSdf.build(PackSdf.java:124) at org.metaborg.spoofax.meta.core.pluto.build.PackSdf.build(PackSdf.java:1) at build.pluto.builder.Builder.triggerBuild(Builder.java:134) at build.pluto.builder.BuildManager.executeBuilder(BuildManager.java:98) at build.pluto.builder.BuildManager.require(BuildManager.java:348) at build.pluto.dependency.BuildRequirement.tryMakeConsistent(BuildRequirement.java:91) at build.pluto.builder.BuildManager.require(BuildManager.java:339) at build.pluto.dependency.BuildRequirement.tryMakeConsistent(BuildRequirement.java:91) at build.pluto.builder.BuildManager.require(BuildManager.java:339) at build.pluto.dependency.BuildRequirement.tryMakeConsistent(BuildRequirement.java:91) at build.pluto.builder.BuildManager.require(BuildManager.java:339) at build.pluto.builder.BuildManager.requireInitially(BuildManager.java:262) at org.metaborg.spoofax.meta.core.build.LanguageSpecBuilder.plutoBuild(LanguageSpecBuilder.java:317) at org.metaborg.spoofax.meta.core.build.LanguageSpecBuilder.compile(LanguageSpecBuilder.java:140) at org.metaborg.spoofax.maven.plugin.mojo.language.CompileMojo.execute(CompileMojo.java:34) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.strategoxt.lang.StrategoException: Exception in execution of primitive 'SSL_EXT_read_text_from_stream' at org.strategoxt.lang.Context.invokePrimitive(Context.java:222) at org.strategoxt.lang.Context.invokePrimitive(Context.java:198) at org.strategoxt.lang.compat.override.performance_tweaks.read_text_from_stream_0_0_override.invoke(read_text_from_stream_0_0_override.java:24) at org.strategoxt.lang.compat.override.jsglr_parser_compat.parse_stream_pt_1_3_override.invoke(parse_stream_pt_1_3_override.java:24) at org.strategoxt.stratego_sglr.lifted503.invoke(lifted503.java:28) at org.strategoxt.stratego_lib.finally_2_0.invoke(finally_2_0.java:28) at org.strategoxt.stratego_sglr.parse_xtc_file_pt_2_3.invoke(parse_xtc_file_pt_2_3.java:93) at org.strategoxt.stratego_sglr.parse_xtc_file_pt_report_errors_0_2.invoke(parse_xtc_file_pt_report_errors_0_2.java:79) at org.strategoxt.tools.process_$Idef_0_0.invoke(process_$Idef_0_0.java:52) at org.strategoxt.tools.lifted6377.invoke(lifted6377.java:36) at org.strategoxt.lang.SRTS_all.mapIgnoreAnnos(SRTS_all.java:90) at org.strategoxt.lang.SRTS_all.mapMaintainAnnos(SRTS_all.java:131) at org.strategoxt.lang.SRTS_all.map(SRTS_all.java:68) at org.strategoxt.lang.SRTS_all.invoke(SRTS_all.java:21) at org.strategoxt.lang.compat.override.performance_tweaks.map_1_0_override.invoke(map_1_0_override.java:29) at org.strategoxt.tools.process_options_0_0.invoke(process_options_0_0.java:45) at org.strategoxt.tools.lifted6399.invoke(lifted6399.java:40) at org.strategoxt.stratego_xtc.lifted2519.invoke(lifted2519.java:40) at org.strategoxt.stratego_lib.restore_always_2_0.invoke(restore_always_2_0.java:28) at org.strategoxt.stratego_xtc.xtc_temp_files_1_0.invoke(xtc_temp_files_1_0.java:30) at org.strategoxt.stratego_xtc.xtc_io_1_0.invoke(xtc_io_1_0.java:24) at org.strategoxt.stratego_xtc.lifted2526.invoke(lifted2526.java:21) at org.strategoxt.stratego_lib.option_wrap_5_0.invoke(option_wrap_5_0.java:34) at org.strategoxt.stratego_lib.option_wrap_4_0.invoke(option_wrap_4_0.java:23) at org.strategoxt.stratego_lib.option_wrap_2_0.invoke(option_wrap_2_0.java:23) at org.strategoxt.stratego_xtc.xtc_io_wrap_2_0.invoke(xtc_io_wrap_2_0.java:26) at org.strategoxt.tools.main_pack_sdf_0_0.invoke(main_pack_sdf_0_0.java:38) at org.strategoxt.lang.Strategy.invokeDynamic(Strategy.java:33) at org.strategoxt.lang.StackSaver$1.call(StackSaver.java:63) at org.strategoxt.lang.StackSaver$1.call(StackSaver.java:1) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.RuntimeException: Could not get input stream for resource at org.metaborg.spoofax.core.stratego.ResourceAgent.internalGetInputStream(ResourceAgent.java:269) at org.metaborg.spoofax.core.stratego.ResourceAgent.getReader(ResourceAgent.java:282) at org.metaborg.spoofax.core.stratego.ResourceAgent.readString(ResourceAgent.java:292) at org.strategoxt.lang.compat.SSL_EXT_read_text_from_stream.call(SSL_EXT_read_text_from_stream.java:45) at org.strategoxt.lang.compat.SSL_EXT_read_text_from_stream.call(SSL_EXT_read_text_from_stream.java:31) at org.strategoxt.lang.Context.invokePrimitive(Context.java:209) ... 31 more Caused by: org.apache.commons.vfs2.FileNotFoundException: Could not read from "file:///tmp/vfs_cache8997168277837051413/tmp_48952_StrategoMix.def" because it is not a file. at org.apache.commons.vfs2.provider.AbstractFileObject.getInputStream(AbstractFileObject.java:1309) at org.apache.commons.vfs2.provider.DefaultFileContent.getInputStream(DefaultFileContent.java:411) at org.metaborg.spoofax.core.stratego.ResourceAgent.internalGetInputStream(ResourceAgent.java:267) ... 36 more Caused by: java.io.FileNotFoundException: /tmp/vfs_cache8997168277837051413/tmp_48952_StrategoMix.def (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at org.apache.commons.vfs2.provider.local.LocalFile.doGetInputStream(LocalFile.java:241) at org.apache.commons.vfs2.provider.AbstractFileObject.getInputStream(AbstractFileObject.java:1301) ... 38 more [INFO] Failing builder was required by "Make grammar permissive for error-recovery parsing.". [INFO] Failing builder was required by "Compile grammar to parse table". [INFO] Failing builder was required by "Generate sources". [INFO] Store get cache hit rate: 0.0% [INFO] Tree nodes cache hit rate: 0.0% [INFO] Exodus log cache hit rate: 0.0% [ERROR] BUILD FAILED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 23.865 s [INFO] Finished at: 2018-04-20T16:10:40-07:00 [INFO] Final Memory: 222M/1685M [INFO] ------------------------------------------------------------------------
I’m using Spoofax 2.4.1 version and has source dependency on
Submitted by Yechan Bae on 23 April 2018 at 18:02org.metaborg:lang.java:1.0.0
. The build was done by Maven CLI, and no other Spoofax instance(e.g. Eclipse) was running other than that.
Issue Log
That is odd, the
StrategoMix.def
file should not be copied to a temp directory, but totarget/pack-sdf-includes
instead. Is there any way I can try to build this locally to debug the issue?
I don’t have any for now. One thing I can confirm is that it happens when I build a project and build it again. Cleaning the project between two builds prevent this error to happen.
A bit late, but I was finally able to reproduce this issue and it should be fixed in the latest development build. Sorry it took so long.
Log in to post comments