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

p4sync exceeds pipeline DSL timeout

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Critical Critical
    • p4-plugin
    • None
    • p4-plugin 1.4.9
      jenkins 2.19.4

      We have a pipeline DSL job which has been working fine for a while but (possibly due to a network outage) started timing out. After timing out for a number of builds however a build hung exceeding its 1 minute timeout. The build was visible on the job page preventing others from running but not in build executor status. We are not able to abort the job despite multiple attempts. There were no obvious p4 threads remaining on the slave. Restarting the slave (which it had run on) did not help so we had to restart the Jenkins master.

      The last pipeline step from the hanging job was p4sync which reported:

      P4: Unable to login: com.perforce.p4java.exception.ConnectionException: Unable to resolve Perforce server host name '...' for RPC connection
      P4: Connection retry: 1
      P4: Connection retry giving up...
      P4: Unable to use Workspace: com.perforce.p4java.exception.ConnectionException: Unable to resolve Perforce server host name '...' for RPC connection
      P4: Unable to setup workspace: com.perforce.p4java.exception.ConnectionException: Unable to resolve Perforce server host name '...' for RPC connection
      

      I don't have a way of reproducing this but have seen it before (also a p4sync).

      Pipeline DSL code like

      node('linux') {
          try {
              stage('Checkout') {
                  dir('src') {
                      timeout(1) {
                          p4sync(poll: false,
                              changelog: false,
                              charset: 'none',
                              credential: 'cred',
                              depotPath: '//depot/path',
                              populate: [$class: 'AutoCleanImpl',
                                  delete: true,
                                  modtime: false,
                                  pin: '',
                                  quiet: true,
                                  replace: true])
                      }
                  }
              }
          } catch(err) {
              mail ...
              throw err // rethrow the exception
          }
      }
      

            Unassigned Unassigned
            rg Russell Gallop
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: