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

BFA runs too early to see the cause

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Duplicate
    • Labels:
      None
    • Environment:
      Jenkins 2.73.2 running on Windows Server 2012 R2, Build Failure Analyzer plugin 1.19.0, Git plugin 3.6.0, Git client plugin 2.5.0
    • Similar Issues:

      Description

      Looks like BFA is running not at the very end of the build, since it proclaims that "No failure causes found" but the line indicating the failure comes later.

      Example output:

      > C:\Program Files\Git\bin\git.exe config core.sparsecheckout # timeout=10
       > C:\Program Files\Git\bin\git.exe checkout -f f09f3eae6bbce03717cb160cef87cc4b7c10ec4a
      [BFA] Scanning build for known causes...
      [BFA] No failure causes found
      [BFA] Done. 0s
      [Bitbucket] Notifying pull request build result
      [Bitbucket] Build result notified
      hudson.plugins.git.GitException: Command "C:\Program Files\Git\bin\git.exe checkout -f f09f3eae6bbce03717cb160cef87cc4b7c10ec4a" returned status code 128:
      stdout: 
      stderr: fatal: reference is not a tree: f09f3eae6bbce03717cb160cef87cc4b7c10ec4a
      
      at
      org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1924)
       at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$800(CliGitAPIImpl.java:71)
       at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:2214)
      Caused: hudson.plugins.git.GitException: Could not checkout f09f3eae6bbce03717cb160cef87cc4b7c10ec4a
       at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:2237)
       at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1165)
       at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:113)
       at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:130)
       at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:120)
       at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:263)
       at hudson.model.ResourceController.execute(ResourceController.java:97)
       at hudson.model.Executor.run(Executor.java:421)
      Finished: FAILURE
      

      There is a failure cause configured that would listen for lines with "stderr: fatal: reference is not a tree:" in them, but BFA analyses the build before this line is logged. If the failure cause analysis is run later on all builds this failure is found as well.

        Attachments

          Issue Links

            Activity

            Hide
            zovitsadam Adam Zovits added a comment -

            The same has been reproduced when a sub-build fails:

            19:01:04 Scheduling project: [OTHERPROJECT]
            19:01:11 Starting building: [OTHERPROJECT] #381
            [Pipeline] }
            [Pipeline] // stage
            [Pipeline] }
            [Pipeline] // timestamps
            [Pipeline] End of Pipeline
            [BFA] Scanning build for known causes...
            [BFA] No failure causes found
            [BFA] Done. 0s
            ERROR: [OTHERPROJECT] #381 completed with status FAILURE (propagate: false to ignore)
            Finished: FAILURE
            

            The sub-build here was called via a pipeline script, nothing fancy: 

            build job: '[OTHERPROJECT]', parameters: [string(...), string(...), string(...)]
            Show
            zovitsadam Adam Zovits added a comment - The same has been reproduced when a sub-build fails: 19:01:04 Scheduling project: [OTHERPROJECT] 19:01:11 Starting building: [OTHERPROJECT] #381 [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // timestamps [Pipeline] End of Pipeline [BFA] Scanning build for known causes... [BFA] No failure causes found [BFA] Done. 0s ERROR: [OTHERPROJECT] #381 completed with status FAILURE (propagate: false to ignore) Finished: FAILURE The sub-build here was called via a pipeline script, nothing fancy:  build job: '[OTHERPROJECT]' , parameters: [string(...), string(...), string(...)]
            Hide
            rg Russell Gallop added a comment -

            Is this a duplicate of JENKINS-42755?

            Show
            rg Russell Gallop added a comment - Is this a duplicate of JENKINS-42755 ?
            Hide
            zovitsadam Adam Zovits added a comment -

            Yes, it seems. Thanks for noticing, I have linked it as a duplicate.

            Show
            zovitsadam Adam Zovits added a comment - Yes, it seems. Thanks for noticing, I have linked it as a duplicate.

              People

              • Assignee:
                t_westling Tomas Westling
                Reporter:
                zovitsadam Adam Zovits
              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: