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

P4_CLIENT environment variable non-reentrant

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Version 1.10.6 of the p4-plugin causes issues when multiple jobs are ran in parallel.

      The result is that the p4 created environment variables of one job can corrupt those in another job that is running at the same time.

      This bug wasn't in 1.10.5

      Steps to reproduce issue:

      • Create a new Jenkins test job with the following settings
        • General:
          • Execute concurrent builds if necessary
          • Use custom workspace
            • Directory
              /tmp/${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}
        • Source Code Management
          • Perforce Software:
            • Workspace behaviour: Template (view generated for each node)
              • Template workspace: Your test template
              • Workspace Name Format being
                 jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}
      • Add a build step

      To see the issue:

      • Kick off two runs of the newly creates client

      Result:

      • Pre 1.10.5 both would have worked and both will set the expected P4 environment variables.
      • 1.10.6 gets confused. So in my case:

        Job1 Environment variables

        P4_CLIENT	_jenkins-master-ClientClashTest-0
        WORKSPACE	/tmp/master-ClientClashTest-0
        

        Job2 Environment variables (THIS IS THE ISSUE – Wrong P4_CLIENT value)

        P4_CLIENT	_jenkins-master-ClientClashTest-0
        WORKSPACE	/tmp/master-ClientClashTest-1
        

        If I reinstall the 1.10.5 (or earlier) plugin then for job 2 I would see:

        P4_CLIENT	_jenkins-master-ClientClashTest-1
        WORKSPACE	/tmp/master-ClientClashTest-1
        

        Attachments

          Issue Links

            Activity

            jbateman James Bateman created issue -
            jbateman James Bateman made changes -
            Field Original Value New Value
            Priority Minor [ 4 ] Major [ 3 ]
            jbateman James Bateman made changes -
            Attachment Build History.png [ 49551 ]
            jbateman James Bateman made changes -
            Attachment screenshot-1.png [ 49552 ]
            jbateman James Bateman made changes -
            Attachment JENKINS-60213__JobConfig.png [ 49553 ]
            p4karl Karl Wirth made changes -
            Labels P4_VERIFY
            p4karl Karl Wirth made changes -
            Comment [ [~jbateman]

            Thanks but no it didn't. That was 3 separate overlapping runs. Note that there is no '@' in the workspace name. Investigating if this is a problem with my test or the nightly build. ]
            p4karl Karl Wirth made changes -
            Labels P4_VERIFY P4_A P4_VERIFY
            p4karl Karl Wirth made changes -
            Link This issue is related to JENKINS-48882 [ JENKINS-48882 ]
            p4karl Karl Wirth made changes -
            Summary P4 environment variables non-reentrant P4CLIENT environment variable non-reentrant
            msmeeth Matthew Smeeth made changes -
            Assignee Matthew Smeeth [ msmeeth ]
            ralphndl Ralph Ndl made changes -
            Labels P4_A P4_VERIFY P4_A P4_CLIENT P4_VERIFY
            msmeeth Matthew Smeeth made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            p4karl Karl Wirth made changes -
            Summary P4CLIENT environment variable non-reentrant P4_CLIENT environment variable non-reentrant

              People

              Assignee:
              msmeeth Matthew Smeeth
              Reporter:
              jbateman James Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: