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

race condition, password ignored, sync isn't happening


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • p4-plugin
    • None

      Now our problem: we have a pipeline with a "checkout" step inside. There is an error during "checkout" but the whole "checkout" step still continues - just without synching files. Therefore the pipeline dies a little bit later - missing files.

      I've attached the console log. The interesting line is 1079:

      [2024-02-06T19:15:15.562Z] Perforce password (P4PASSWD) invalid or unset.

      Be aware that the sync is defined to happen in parallel (4 threads): I know that this sometimes has been problematic in the past. Maybe there is still some corner case not catching an error ... ? So that we might have the first problem why that error occurs but also a second one why it isn't caught correctly.

      The plugin version is latest 1.14.4:


      The Jenkins server itself is currently 2.375.4. I've a maintenance window next Sunday intending to raise this to 2.426.3 (due to reported critical CVEs).

      Therefore last week I've disabled CLI based on https://github.com/jenkinsci-cert/SECURITY-3314-3315/blob/main/disable-cli.groovy. I doubt that this is the reason but definitely worth mentioning ...

      Here is an excerpt of the code showing the checkout:

      echo "Full build is based on pinned CL #${changelistToBuildWith}."
      ws = [$class: 'ManualWorkspaceImpl',
      charset: 'none',
      cleanup: false,
      name: clientSpecName,
      pinHost: false,
      spec: clientSpec(
      allwrite: false,
      backup: false,
      changeView: changeView,
      clobber: true,
      compress: false,
      line: 'LOCAL',
      locked: false,
      modtime: false,
      rmdir: true,
      serverID: '',
      streamName: streamNameAttribute,
      type: workspaceType,
      view: manualView)]
      def scm = perforce(
      browser: swarm('http://frinavci01.strykercorp.com:81/'),
      credential: p4CredentialId,
      filter: [pathFilter('//navigation/jenkins'), latestWithPin(true)],
      populate: forceClean(
      have: true,
      parallel: [enable: true, threads: '4'],
      pin: changelistToBuildWith,
      quiet: true
      workspace: ws
      scmVars = checkout changelog: true,
      scm: scm
      echo "Result was ${scmVars}"

      The credential "p4CredentialId" points to the proxy "p4proxy.strykercorp.com:1999". No cascaded proxies.

      Another problem: as this has been reported to me the first time by today it seems that this does not happen often. And definitely not always. Which again points to threads and race conditions as the cause ... 

            Unassigned Unassigned
            almal al
            1 Vote for this issue
            3 Start watching this issue