Skip to content
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

4.x Intermittent ToolsException IOException stream closed failure in pipeline build from Helidon annotation processor #9540

Open
tjquinno opened this issue Nov 27, 2024 · 1 comment

Comments

@tjquinno
Copy link
Member

Environment Details

  • Helidon Version: 4.x
  • Helidon SE or Helidon MP
  • JDK version:
  • OS:
  • Docker version (if applicable):

Problem Description

I saw this Intermittent failure once in a pipeline build. A single rerun worked (at least in this case).

Job: https://github.com/helidon-io/helidon/actions/runs/12050146468/job/33598406503?pr=9534

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project helidon-integrations-oci-sdk-tests-test-module1: Compilation failure
io.helidon.inject.tools.ToolsException: Error while processing: io.helidon.inject.tools.ToolsException: Error during codegen @ java.base/java.util.zip.InflaterInputStream.ensureOpen(InflaterInputStream.java:68) in InjectionAnnotationProcessor
	at io.helidon.inject.processor.InjectionAnnotationProcessor.doProcess(InjectionAnnotationProcessor.java:217)
	at io.helidon.inject.processor.InjectionAnnotationProcessor.process(InjectionAnnotationProcessor.java:173)
	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:1021)
	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.runContributingProcs(JavacProcessingEnvironment.java:857)
	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1263)
	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1402)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1272)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:946)
	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:319)
	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:178)
	at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:82)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess0(JavacCompiler.java:700)
	at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcessWithProperClassloader(JavacCompiler.java:681)
	at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:670)
	at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:187)
	at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1140)
	at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:193)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
	at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:370)
	at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:351)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:215)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:171)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:163)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
	at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:210)
	at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:195)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: io.helidon.inject.tools.ToolsException: Error during codegen
	at io.helidon.inject.processor.InjectionAnnotationProcessor.doFiler(InjectionAnnotationProcessor.java:308)
	at io.helidon.inject.processor.InjectionAnnotationProcessor.doProcess(InjectionAnnotationProcessor.java:205)
	... 33 more
Caused by: io.helidon.inject.tools.ToolsException: Failed to load: templates/inject/default/service-provider-application-stub.hbs
	at io.helidon.inject.tools.CommonUtils.loadStringFromResource(CommonUtils.java:54)
	at io.helidon.inject.tools.TemplateHelper.loadTemplate(TemplateHelper.java:151)
	at io.helidon.inject.tools.TemplateHelper.safeLoadTemplate(TemplateHelper.java:139)
	at io.helidon.inject.tools.ActivatorCreatorDefault.toApplicationStubBody(ActivatorCreatorDefault.java:522)
	at io.helidon.inject.tools.ActivatorCreatorDefault.codegen(ActivatorCreatorDefault.java:389)
	at io.helidon.inject.tools.ActivatorCreatorDefault.createModuleActivators(ActivatorCreatorDefault.java:332)
	at io.helidon.inject.processor.CreatorHandler.createModuleActivators(CreatorHandler.java:54)
	at io.helidon.inject.processor.InjectionAnnotationProcessor.doFiler(InjectionAnnotationProcessor.java:296)
	... 34 more
Caused by: java.io.IOException: Stream closed
	at java.base/java.util.zip.InflaterInputStream.ensureOpen(InflaterInputStream.java:68)
	at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:154)
	at java.base/java.io.FilterInputStream.read(FilterInputStream.java:119)
	at java.base/java.io.InputStream.readNBytes(InputStream.java:412)
	at java.base/java.io.InputStream.readAllBytes(InputStream.java:349)
	at io.helidon.inject.tools.CommonUtils.loadStringFromResource(CommonUtils.java:51)
	... 41 more


    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:375)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:210)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:195)
    at java.util.concurrent.FutureTask.run (FutureTask.java:317)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:572)
    at java.util.concurrent.FutureTask.run (FutureTask.java:317)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1144)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:642)
    at java.lang.Thread.run (Thread.java:1583)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
io.helidon.inject.tools.ToolsException: Error while processing: io.helidon.inject.tools.ToolsException: Error during codegen @ java.base/java.util.zip.InflaterInputStream.ensureOpen(InflaterInputStream.java:68) in InjectionAnnotationProcessor
	at io.helidon.inject.processor.InjectionAnnotationProcessor.doProcess(InjectionAnnotationProcessor.java:217)
	at io.helidon.inject.processor.InjectionAnnotationProcessor.process(InjectionAnnotationProcessor.java:173)
	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:1021)
	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.runContributingProcs(JavacProcessingEnvironment.java:857)
	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1263)
	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1402)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1272)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:946)
	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:319)
	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:178)
	at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:82)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess0(JavacCompiler.java:700)
	at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcessWithProperClassloader(JavacCompiler.java:681)
	at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:670)
	at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:187)
	at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1140)
	at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:193)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
	at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:370)
	at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:351)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:215)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:171)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:163)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
	at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:210)
	at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:195)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: io.helidon.inject.tools.ToolsException: Error during codegen
	at io.helidon.inject.processor.InjectionAnnotationProcessor.doFiler(InjectionAnnotationProcessor.java:308)
	at io.helidon.inject.processor.InjectionAnnotationProcessor.doProcess(InjectionAnnotationProcessor.java:205)
	... 33 more
Caused by: io.helidon.inject.tools.ToolsException: Failed to load: templates/inject/default/service-provider-application-stub.hbs
	at io.helidon.inject.tools.CommonUtils.loadStringFromResource(CommonUtils.java:54)
	at io.helidon.inject.tools.TemplateHelper.loadTemplate(TemplateHelper.java:151)
	at io.helidon.inject.tools.TemplateHelper.safeLoadTemplate(TemplateHelper.java:139)
	at io.helidon.inject.tools.ActivatorCreatorDefault.toApplicationStubBody(ActivatorCreatorDefault.java:522)
	at io.helidon.inject.tools.ActivatorCreatorDefault.codegen(ActivatorCreatorDefault.java:389)
	at io.helidon.inject.tools.ActivatorCreatorDefault.createModuleActivators(ActivatorCreatorDefault.java:332)
	at io.helidon.inject.processor.CreatorHandler.createModuleActivators(CreatorHandler.java:54)
	at io.helidon.inject.processor.InjectionAnnotationProcessor.doFiler(InjectionAnnotationProcessor.java:296)
	... 34 more
Caused by: java.io.IOException: Stream closed
	at java.base/java.util.zip.InflaterInputStream.ensureOpen(InflaterInputStream.java:68)
	at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:154)
	at java.base/java.io.FilterInputStream.read(FilterInputStream.java:119)
	at java.base/java.io.InputStream.readNBytes(InputStream.java:412)
	at java.base/java.io.InputStream.readAllBytes(InputStream.java:349)
	at io.helidon.inject.tools.CommonUtils.loadStringFromResource(CommonUtils.java:51)
	... 41 more


    at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:1212)
    at org.apache.maven.plugin.compiler.CompilerMojo.execute (CompilerMojo.java:193)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:210)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:195)
    at java.util.concurrent.FutureTask.run (FutureTask.java:317)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:572)
    at java.util.concurrent.FutureTask.run (FutureTask.java:317)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1144)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:642)
    at java.lang.Thread.run (Thread.java:1583)
Error: [ERROR] 
Error: [ERROR] Re-run Maven using the -X switch to enable full debug logging.
Error: [ERROR] 
Error: [ERROR] For more information about the errors and possible solutions, please read the following articles:
Error: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Error: [ERROR] 
Error: [ERROR] After correcting the problems, you can resume the build with the command
Error: [ERROR]   mvn <args> -rf :helidon-integrations-oci-sdk-tests-test-module1
Error: Process completed with exit code 1.

Steps to reproduce

??

@romain-grecourt
Copy link
Contributor

I've seen that too, although I was never brave enough to investigate.
Also this seems to be caused by the old inject tooling that will be removed in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Triage
Development

No branches or pull requests

2 participants