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

P4 error - No open file stream in ClientSystemFileCommands.writeFile()

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: p4-plugin
    • Labels:
    • Environment:
      We are on a Windows 2008 server with an up-to-date jenkins. Workspaces are 15-20 GB big C++ make style.
    • Similar Issues:

      Description

      P4 Task: attempt: 1 ERROR: P4: Task Exception: com.perforce.p4java.exception.ConnectionException: No open file stream in ClientSystemFileCommands.writeFile() [MSBuild] Skipping execution of recorder since overall result is 'FAILURE'
      

      We had to downgrade from 1.10.0 back to 1.9.7. Most syncs of workspaces started to fail with version 1.10.0. As soon as we downgraded everything went back to normal and our workspace sync work perfectly again.

      I can't really tell what the problem is, but either I see the above error, or files are simply missing, and subsequent builds are failing.

        Attachments

          Activity

          saleuthjenkins Sascha Leuthold created issue -
          Hide
          p4karl Karl Wirth added a comment -

          Hi Sascha Leuthold,

          Thanks for reporting this problem. Can you please send an email to 'support@perforce.com' for my attention so I can request in depth information about your build jobs.

          Show
          p4karl Karl Wirth added a comment - Hi Sascha Leuthold , Thanks for reporting this problem. Can you please send an email to 'support@perforce.com' for my attention so I can request in depth information about your build jobs.
          p4karl Karl Wirth made changes -
          Field Original Value New Value
          Assignee Karl Wirth [ p4karl ]
          p4karl Karl Wirth made changes -
          Labels P4_SUPPORT
          Hide
          p4karl Karl Wirth added a comment -

          Investigation still progressing. Reports of this so far involve Virus checkers.

          CANNOT reproduce it artificially by locking the file using Powershell:

          (1) Run new job on a Windows slave.

          (2) Open a Powershell Window and exclusively lock the file:

          $myFile="C:\filestore\Jenkins\JOBS\workspace\MYJOB\MYFILE.txt"
          Set-ItemProperty $myFile -name IsReadOnly -value $false
          $file = [System.IO.File]::Open($myFile, "Open", "Read", "None")
          

          (3) Run the job again and see a different the error:

          ERROR: P4: Task Exception: com.perforce.p4java.exception.P4JavaException: com.perforce.p4java.exception.P4JavaException: hudson.AbortException: P4JAVA: Error(s):
          file 9.c operating system write error: C:\filestore\Jenkins\JOBS\workspace\MYJOB\MYFILE.txt (The process cannot access the file because it is being used by another process).
          

          (4) Unlock the file

           $file.Close()
          

           

           

          Show
          p4karl Karl Wirth added a comment - Investigation still progressing. Reports of this so far involve Virus checkers. CANNOT reproduce it artificially by locking the file using Powershell: (1) Run new job on a Windows slave. (2) Open a Powershell Window and exclusively lock the file: $myFile= "C:\filestore\Jenkins\JOBS\workspace\MYJOB\MYFILE.txt" Set-ItemProperty $myFile -name IsReadOnly -value $ false $file = [ System .IO.File]::Open($myFile, "Open" , "Read" , "None" ) (3) Run the job again and see a different the error: ERROR: P4: Task Exception: com.perforce.p4java.exception.P4JavaException: com.perforce.p4java.exception.P4JavaException: hudson.AbortException: P4JAVA: Error(s): file 9.c operating system write error: C:\filestore\Jenkins\JOBS\workspace\MYJOB\MYFILE.txt (The process cannot access the file because it is being used by another process). (4) Unlock the file $file.Close()    
          Hide
          p4karl Karl Wirth added a comment -

          Looks to be related to a symlink bug in the latest version of P4Java used by P4-Plugin 1.10.0. Workaround until this can be patched is to revert to your previous version of the p4-plugin.

          Show
          p4karl Karl Wirth added a comment - Looks to be related to a symlink bug in the latest version of P4Java used by P4-Plugin 1.10.0. Workaround until this can be patched is to revert to your previous version of the p4-plugin.
          p4karl Karl Wirth made changes -
          Labels P4_SUPPORT P4_VERIFY
          p4karl Karl Wirth made changes -
          Assignee Karl Wirth [ p4karl ]
          Hide
          bobwills Eric Blom added a comment -

          I also encountered this problem today. We are running P4 Plugin 1.10.0 on Jenkins 2.164.3. Downgrading to 1.9.7 fixed the issue.

          Show
          bobwills Eric Blom added a comment - I also encountered this problem today. We are running P4 Plugin 1.10.0 on Jenkins 2.164.3. Downgrading to 1.9.7 fixed the issue.
          Hide
          p4karl Karl Wirth added a comment -

          Update - This was a problem with writing symlink files on Windows. We are still working on a fix.

          Show
          p4karl Karl Wirth added a comment - Update - This was a problem with writing symlink files on Windows. We are still working on a fix.
          Hide
          barnish Andrew Barnish added a comment - - edited

          I'm seeing the following error in linux since plugin version 1.10.0 . Is it the same issue?
           
          ERROR: P4: Task Exception: com.perforce.p4java.exception.ConnectionException: No open file stream in ClientSystemFileCommands.writeFile()

          Show
          barnish Andrew Barnish added a comment - - edited I'm seeing the following error in linux since plugin version 1.10.0 . Is it the same issue?   ERROR: P4: Task Exception: com.perforce.p4java.exception.ConnectionException: No open file stream in ClientSystemFileCommands.writeFile()
          Hide
          p4karl Karl Wirth added a comment -

          Hi Andrew Barnish - I'll email you directly.

          Show
          p4karl Karl Wirth added a comment - Hi Andrew Barnish - I'll email you directly.
          Hide
          p4karl Karl Wirth added a comment -

          Confirm that the bug will also impact Linux users. We continue to work on the problem.

          Show
          p4karl Karl Wirth added a comment - Confirm that the bug will also impact Linux users. We continue to work on the problem.
          Hide
          barnish Andrew Barnish added a comment -

          The issue we were seeing on Linux is resolved in p4-plugin 1.10.2

          Show
          barnish Andrew Barnish added a comment - The issue we were seeing on Linux is resolved in p4-plugin 1.10.2
          p4karl Karl Wirth made changes -
          Labels P4_VERIFY P4_A
          Hide
          p4karl Karl Wirth added a comment -

          Believed to be fixed by 1.10.2. Waiting for additional confirmation.

          Show
          p4karl Karl Wirth added a comment - Believed to be fixed by 1.10.2. Waiting for additional confirmation.
          p4karl Karl Wirth made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          p4paul Paul Allen added a comment -

          Released in 1.10.2

          Show
          p4paul Paul Allen added a comment - Released in 1.10.2
          p4paul Paul Allen made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Paul Allen [ p4paul ]

            People

            • Assignee:
              p4paul Paul Allen
              Reporter:
              saleuthjenkins Sascha Leuthold
            • Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: