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

deleteDir() gets stuck on windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • Jenkins 2.289.3
      Node is Windows Server 2019 Standart

      We are using the following pipeline (https://www.jenkins.io/doc/pipeline/steps/workflow-basic-steps/#deletedir-recursively-delete-the-current-directory-from-the-workspace):

       if (currentResult == 'SUCCESS') {
                                  if (wipeOutWorkspaceOnSuccess) {
                                      dir("${workspaceDirectory}") {
                                          deleteDir()
                                      }
                                      echo "Wiping out ${workspaceDirectory} on ${NODE_NAME}"
                                      dir("${workspaceDirectory}/@tmp") {
                                          deleteDir()
                                      }
                                      echo "Wiping out ${workspaceDirectory}/@tmp on ${NODE_NAME}"
                                  }
                              } else { }
      

      And this seems to get stuck on windows often. The server - node communication is done via java 8 (Zulu).
      I took a few thread dumps (log1.txt - log5.txt), which I am attaching here

      Looking for suggestions on how to resolve this - maybe a problem on our end but I cannot determine this by looking at the threads.

      I see that no files are being deleted despite all the waiting.

        1. image-2023-06-22-14-07-43-186.png
          image-2023-06-22-14-07-43-186.png
          308 kB
        2. log1.txt
          25 kB
        3. log2.txt
          24 kB
        4. log3.txt
          24 kB
        5. log4.txt
          24 kB
        6. log5.txt
          24 kB
        7. screenshot-1.png
          screenshot-1.png
          190 kB
        8. screenshot-2.png
          screenshot-2.png
          341 kB

            Unassigned Unassigned
            vassilena Vassilena Treneva
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: