Community
Participate
Working Groups
Build Identifier: #43 Eclipse build Windows only. Reproducible: Always Steps to Reproduce: 1. Create a simple job that clones a git url 2. Build it 3. From windows explorer or the command line try to delete the workspace The .git directory is held open by a java process.
*** Bug 368549 has been marked as a duplicate of this bug. ***
Facing the same problem and getting the following Exception:- Cleaning the workspace because project is configured to clean the workspace before each build. FATAL: Unable to delete C:\Users\admin\.hudson\jobs\myproject \workspace\.git\objects\pack\pack- b38c095fff6a391435a492ccf49985ed82dfd245.pack java.io.IOException: Unable to delete C:\Users\admin\.hudson\jobs \myproject\workspace\.git\objects\pack\pack- b38c095fff6a391435a492ccf49985ed82dfd245.pack at hudson.Util.deleteFile(Util.java:263) at hudson.Util.deleteRecursive(Util.java:305) at hudson.Util.deleteContentsRecursive(Util.java:224) at hudson.Util.deleteRecursive(Util.java:304) at hudson.Util.deleteContentsRecursive(Util.java:224) at hudson.Util.deleteRecursive(Util.java:304) at hudson.Util.deleteContentsRecursive(Util.java:224) at hudson.Util.deleteRecursive(Util.java:304) at hudson.Util.deleteContentsRecursive(Util.java:224) at hudson.Util.deleteRecursive(Util.java:304) at hudson.FilePath$9.invoke(FilePath.java:826) at hudson.FilePath$9.invoke(FilePath.java:824) at hudson.FilePath.act(FilePath.java:758) at hudson.FilePath.act(FilePath.java:740) at hudson.FilePath.deleteRecursive(FilePath.java:824) at hudson.model.AbstractProject.cleanWorkspace (AbstractProject.java:2053) at hudson.model.AbstractBuild$AbstractRunner.run (AbstractBuild.java:419) at hudson.model.Run.run(Run.java:1366) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute (ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145) pack-b38c095fff6a391435a492ccf49985ed82dfd245.pack file is held open by java .
The problem is not restricted to Windows, just easier to reproduce there. For example, if Hudson home is on an NFS share, the open files will create .nfsNNNN files in the local workspace that can't be deleted. In simple terms, once user has done a remote build using git, the job can't be deleted. NB: There is a separate bug 432569 for the issue that non-deletable job directory causes partial, invalid delete.
After 1 build: hudson$ lsof -p 29109 | grep "\.git" java 29109 bobfoster 246r REG 1,2 2067 121028078 /Users/bobfoster/hudson/org.eclipse.hudson.core/work/teams/Team1/jobs/Team1.JobA/workspace/.git/objects/pack/pack-f35b66ac8a7d977047c992b0b2eeded35066b469.pack After 2 builds: hudson$ lsof -p 29109 | grep "\.git" java 29109 bobfoster 246r REG 1,2 2067 121028078 /Users/bobfoster/hudson/org.eclipse.hudson.core/work/teams/Team1/jobs/Team1.JobA/workspace/.git/objects/pack/pack-f35b66ac8a7d977047c992b0b2eeded35066b469.pack java 29109 bobfoster 247r REG 1,2 2067 121028078 /Users/bobfoster/hudson/org.eclipse.hudson.core/work/teams/Team1/jobs/Team1.JobA/workspace/.git/objects/pack/pack-f35b66ac8a7d977047c992b0b2eeded35066b469.pack Jenkins had a similar bug: https://issues.jenkins-ci.org/browse/JENKINS-19994
Fixed by commit 24ca398eff06919394bebd2a31b0f465d3b5c405 - will be released as part of 3.2.0 plugins
See previous comment.