Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-56296

EOFException while reading exec file (running on agent docker)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • jacoco-plugin
    • None
    • Jenkins and JaCoCo plug-in latest version, running on latest Docker (official image, no customisation). Pipeline runs on Docker agent.

      When running the jacoco plug-in inside a pipeline using a Docker container as the build agent, the call randomly crashes with an EOFException (see stack trace below).

      Minimum example in this repo: https://github.com/deors/deors-demos-java-pipeline

      Re-launching the pipeline, no changes in sources, sometimes it work, but some other not. No pattern observed on failure.

       

      [Pipeline] junitRecording test results

      [Pipeline] step

      [JaCoCo plugin] Collecting JaCoCo coverage data...

      [JaCoCo plugin] target/jacoco.exec;/classes;/src/main/java; locations are configured

      [JaCoCo plugin] Number of found exec files for pattern target/jacoco.exec: 1

      [JaCoCo plugin] Saving matched execfiles: /var/jenkins_home/jobs/****/workspace/target/jacoco.exec

      [JaCoCo plugin] Saving matched class directories for class-pattern: **/classes:

      [JaCoCo plugin] - /var/jenkins_home/jobs/****/workspace/target/classes 1 files

      [JaCoCo plugin] Saving matched source directories for source-pattern: **/src/main/java:

      [JaCoCo plugin] Source Inclusions: */.java

      [JaCoCo plugin] Source Exclusions:

      [JaCoCo plugin] - /var/jenkins_home/jobs/****/workspace/src/main/java 1 files

      [JaCoCo plugin] Loading inclusions files..

      [JaCoCo plugin] inclusions: []

      [JaCoCo plugin] exclusions: []

      [Pipeline]

      ...

      ...

      [Pipeline] // node

      [Pipeline] End of Pipeline

      java.io.EOFException

      at java.io.DataInputStream.readByte(DataInputStream.java:267)

      at org.jacoco.core.internal.data.CompactDataInput.readVarInt(CompactDataInput.java:44)

      at org.jacoco.core.internal.data.CompactDataInput.readBooleanArray(CompactDataInput.java:59)

      at org.jacoco.core.data.ExecutionDataReader.readExecutionData(ExecutionDataReader.java:149)

      at org.jacoco.core.data.ExecutionDataReader.readBlock(ExecutionDataReader.java:115)

      at org.jacoco.core.data.ExecutionDataReader.read(ExecutionDataReader.java:92)

      at hudson.plugins.jacoco.ExecutionFileLoader.loadExecutionData(ExecutionFileLoader.java:95)

      Caused: java.io.IOException: While reading execution data-file: /var/jenkins_home/jobs/deors-demos-microservices-eurekaservice-local/builds/34/jacoco/execFiles/exec0/jacoco.exec

      at hudson.plugins.jacoco.ExecutionFileLoader.loadExecutionData(ExecutionFileLoader.java:98)

      at hudson.plugins.jacoco.ExecutionFileLoader.loadBundleCoverage(ExecutionFileLoader.java:139)

      at hudson.plugins.jacoco.JacocoReportDir.parse(JacocoReportDir.java:110)

      at hudson.plugins.jacoco.JacocoBuildAction.loadRatios(JacocoBuildAction.java:339)

      at hudson.plugins.jacoco.JacocoBuildAction.load(JacocoBuildAction.java:326)

      at hudson.plugins.jacoco.JacocoPublisher.perform(JacocoPublisher.java:657)

      at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)

      at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)

      at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)

      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

      at java.util.concurrent.FutureTask.run(FutureTask.java:266)

      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)

      Finished: FAILURE

            ognjenb Ognjen Bubalo
            deors Jorge Hidalgo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: