Hello,

       

      When cancelling a p4 sync, the files are locked and it is not possible to run another build until restarting Jenkins service.

      Tested with latest P4 plugin (1.11.4) and the issue is reproducible 100% in our environment.

      This issue seems very similar to https://issues.jenkins.io/browse/JENKINS-37487 which has been marked as resolved.

       

      Could you please help fixing the issue?

       

      [Pipeline] End of Pipeline
      ERROR: P4: Task Exception: java.io.IOException: Unable to delete file: C:\Jenkins\workspace\Vulcan\1.7\Unity_2
      Finished: FAILURE
      

      thanks a lot,

      Marius

          [JENKINS-65418] Cancelling p4 sync results in locked files

          Marius added a comment -

          Hi Karl,

           

          Thanks for the detailed explanation!

          Yes, this problem is still happening and it's very annoying, because we need to restart Jenkins slave service to get rid of it

          If there's any way to prioritize the fix for it, we'd really appreciate it..

           

          thanks a lot,

          Marius

          Marius added a comment - Hi Karl,   Thanks for the detailed explanation! Yes, this problem is still happening and it's very annoying, because we need to restart Jenkins slave service to get rid of it If there's any way to prioritize the fix for it, we'd really appreciate it..   thanks a lot, Marius

          Karl Wirth added a comment -

          Hi maneamarius - Thanks. I dont have any say on the scheduling but I will raise this to the product managers again.

          Karl Wirth added a comment - Hi maneamarius - Thanks. I dont have any say on the scheduling but I will raise this to the product managers again.

          Karl Wirth added a comment -

          Note - have seen a new case of this. In that case the sync was still running in the background so overlapped the new sync when the job was rerun.

          Karl Wirth added a comment - Note - have seen a new case of this. In that case the sync was still running in the background so overlapped the new sync when the job was rerun.

          Karl Wirth added a comment -

          Please consider this as a top priority when planning next sprint.

          Karl Wirth added a comment - Please consider this as a top priority when planning next sprint.

          Marius added a comment -

          hey guys, I appreciate your help and I look forward for the fix!

          Please keep us posted

          Marius added a comment - hey guys, I appreciate your help and I look forward for the fix! Please keep us posted

          Marius added a comment -

          hello,

          Just checking to see if you have any updates regarding this issue?

          thanks a lot,

          Marius added a comment - hello, Just checking to see if you have any updates regarding this issue? thanks a lot,

          Karl Wirth added a comment -

          Requested that this is investigated in upcoming sprint.

          Karl Wirth added a comment - Requested that this is investigated in upcoming sprint.

          Elliot added a comment - - edited

          p4karl  I investigated this issue when I experienced it and found it to be P4Java not properly disposing of streams... 

          I wrote an issue about it here: https://github.com/perforce/p4java/issues/2

           

          I also sent in a support ticket, they responded with "that's definitely interesting we will investigate" and they haven't gotten back to me. Here's my case info: 

          Resource leak in p4java causing issues with Jenkins p4-plugin - Case# 00947568

          edit: they just replied and said they have been unable to reproduce... this is definitely a tough one to reproduce, it took me a while to get it to happen and get to the agent before a GC ran, helps to give the jvm a lot of memory so it is running GC less often

          Elliot added a comment - - edited p4karl   I investigated this issue when I experienced it and found it to be P4Java not properly disposing of streams...  I wrote an issue about it here: https://github.com/perforce/p4java/issues/2   I also sent in a support ticket, they responded with "that's definitely interesting we will investigate" and they haven't gotten back to me. Here's my case info:  Resource leak in p4java causing issues with Jenkins p4-plugin - Case# 00947568 edit: they just replied and said they have been unable to reproduce... this is definitely a tough one to reproduce, it took me a while to get it to happen and get to the agent before a GC ran, helps to give the jvm a lot of memory so it is running GC less often

          Sandeep Kumar added a comment - - edited

          maneamarius, elliotdematteis could you please try this with the P4 version 1.14.4 or later? ?

          Sandeep Kumar added a comment - - edited maneamarius , elliotdematteis could you please try this with the P4 version 1.14.4 or later? ?

          Sandeep Kumar added a comment -

          Please feel free to open it if this issue occurs in p4 plugin version >= 1.15.1

          Sandeep Kumar added a comment - Please feel free to open it if this issue occurs in p4 plugin version >= 1.15.1

            Unassigned Unassigned
            maneamarius Marius
            Votes:
            6 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: