[JIRA] (JENKINS-55836) Unable to delete workspace due to locked git .pack file

0 views
Skip to first unread message

chilber@agile-im.de (JIRA)

unread,
Jan 29, 2019, 7:41:02 AM1/29/19
to jenkinsc...@googlegroups.com
Carsten Hilber moved an issue
 
Jenkins / Bug JENKINS-55836
Unable to delete workspace due to locked git .pack file
Change By: Carsten Hilber
Project: Infrastructure Jenkins
Key: INFRA JENKINS - 1988 55836
Workflow: classic default workflow JNJira + In-Review
Component/s: git-plugin
Component/s: github
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

dbeck@cloudbees.com (JIRA)

unread,
Jan 29, 2019, 9:50:02 AM1/29/19
to jenkinsc...@googlegroups.com
Daniel Beck assigned an issue to Unassigned
Change By: Daniel Beck
Assignee: Daniel Beck

chilber@agile-im.de (JIRA)

unread,
Jan 29, 2019, 10:03:20 AM1/29/19
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 29, 2019, 6:54:02 PM1/29/19
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-55836
 
Re: Unable to delete workspace due to locked git .pack file

Please provide more details to duplicate the problem.

  • What is WS-CLEANUP and how is it used in that job?
  • Is the Jenkins job a Pipeline job or a Freestyle job?
  • If a Freestyle job, does the same problem exist if you modify the job definition to add the "Wipe out repository and force clone" additional behavior to the git configuration of the job?
  • Is the Jenkins job configured to use command line git or JGit to clone and checkout the workspace?
  • What git related options are included in the job definition?
  • Is there an anti-virus program running on the Windows computer? If so, is the problem still visible if virus scanning is disabled for the workspace directory?

I can't duplicate the problem in my experiment. I don't recognize WS-CLEANUP, so I approximated it with "Wipe out repository and force clone".

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 29, 2019, 7:50:02 PM1/29/19
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-55836
Please provide more details to duplicate the problem.

* What is {{WS-CLEANUP}} and how is it used in that job?
* Is the Jenkins job a Pipeline job or a Freestyle job?
* If a Freestyle job, does the same problem exist if you modify the job definition to add the "Wipe out repository and force clone" additional behavior to the git configuration of the job?
\
* If a Pipeline job, does the same problem exist if you use the {{deleteDir}} step?
* Is the Jenkins job configured to use command line git or JGit to clone and checkout the workspace?
* What git related options are included in the job definition?
* Is there an anti-virus program running on the Windows computer?  If so, is the problem still visible if virus scanning is disabled for the workspace directory?

I can't duplicate the problem in [my experiment|https://github.com/MarkEWaite/docker-lfs/blob/lts-with-plugins/ref/jobs/Bugs-Individual/jobs/JENKINS-55836-windows-wipe-workspace/config.xml].  I don't recognize WS-CLEANUP, so I approximated it with "Wipe out repository and force clone".

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 29, 2019, 7:50:02 PM1/29/19
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 30, 2019, 3:10:02 PM1/30/19
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-55836
Please [~carsten_hilber], please provide more details to duplicate the problem.   A detailed set of steps which others can use to see the problem is preferred.  If that is not possible, then please answer the following questions:

* What is {{WS-CLEANUP}} and how is it used in that job?
* Is the Jenkins job a Pipeline job or a Freestyle job?
* If a Freestyle job, does the same problem exist if you modify the job definition to add the "Wipe out repository and force clone" additional behavior to the git configuration of the job?
* If a Pipeline job, does the same problem exist if you use the {{deleteDir}} step?
* Is the Jenkins job configured to use command line git or JGit to clone and checkout the workspace?
* What git related options are included in the job definition?
* Is there an anti-virus program running on the Windows computer?  If so, is the problem still visible if virus scanning is disabled for the workspace directory?

I can't duplicate the problem in [my experiment|https://github.com/MarkEWaite/docker-lfs/blob/lts-with-plugins/ref/jobs/Bugs-Individual/jobs/JENKINS-55836-windows-wipe-workspace/config.xml].  I don't recognize WS-CLEANUP, so I approximated it with "Wipe out repository and force clone".

chilber@agile-im.de (JIRA)

unread,
Feb 4, 2019, 5:11:18 AM2/4/19
to jenkinsc...@googlegroups.com

The Job is a freestyle job.
The option I set is called 'Delete workspace before build starts', within Build Environment.
It is configured to use the command line git. There are no more options given to the git task, only auth and branch is set.

I additionally set the "Wipe out repository and force clone" option in git and i saw the same behavior as before.
Then I set the wipe out exclusive, without the cleanup task and I got a different error message from git:

Started by user Carsten Hilber
Building remotely on webserv_runner_01 (webserv_runner) in workspace C:\vhvEntw\Jenkins\workspace\Testautomatisierung\06_Testfälle_ReadyAPI\Guidewire\CC\RA_A_Smoketest_Master
Wiping out workspace first.
java.nio.file.FileSystemException: C:\Jenkins\workspace\Testautomatisierung\06_Testfälle_ReadyAPI\Guidewire\CC\RA_A_Smoketest_Master\.git\objects\pack\pack-5d0b10aae545c18f1c4b0ec7d499f31aa93e7b5a.pack: Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird.

	at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
	at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
	at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
	at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
	at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source)
	at java.nio.file.Files.deleteIfExists(Unknown Source)
	at hudson.Util.tryOnceDeleteFile(Util.java:316)
	at hudson.Util.deleteFile(Util.java:272)
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from wxp-turm-p13.ads.de/10.xx.xx.161:1697
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)
		at hudson.remoting.UserResponse.retrieve(UserRequest.java:389)
		at hudson.remoting.Channel.call(Channel.java:955)
		at hudson.FilePath.act(FilePath.java:1072)
		at hudson.FilePath.act(FilePath.java:1061)
		at hudson.FilePath.deleteContents(FilePath.java:1283)
		at hudson.plugins.git.extensions.impl.WipeWorkspace.beforeCheckout(WipeWorkspace.java:30)
		at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1183)
		at hudson.scm.SCM.checkout(SCM.java:504)
		at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
		at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
		at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
		at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
		at hudson.model.Run.execute(Run.java:1810)
		at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
		at hudson.model.ResourceController.execute(ResourceController.java:97)
		at hudson.model.Executor.run(Executor.java:429)
Caused: java.io.IOException: Unable to delete 'C:\Jenkins\workspace\Testautomatisierung\06_Testfälle_ReadyAPI\Guidewire\CC\RA_A_Smoketest_Master\.git\objects\pack\pack-5d0b10aae545c18f1c4b0ec7d499f31aa93e7b5a.pack'. Tried 3 times (of a maximum of 3) waiting 0,1 Sekunden between attempts.
	at hudson.Util.deleteFile(Util.java:277)
	at hudson.FilePath.deleteRecursive(FilePath.java:1305)
	at hudson.FilePath.deleteContentsRecursive(FilePath.java:1314)
	at hudson.FilePath.deleteRecursive(FilePath.java:1296)
	at hudson.FilePath.deleteContentsRecursive(FilePath.java:1314)
	at hudson.FilePath.deleteRecursive(FilePath.java:1296)
	at hudson.FilePath.deleteContentsRecursive(FilePath.java:1314)
	at hudson.FilePath.deleteRecursive(FilePath.java:1296)
	at hudson.FilePath.deleteContentsRecursive(FilePath.java:1314)
	at hudson.FilePath.access$1800(FilePath.java:213)
	at hudson.FilePath$DeleteContents.invoke(FilePath.java:1289)
	at hudson.FilePath$DeleteContents.invoke(FilePath.java:1285)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3086)
	at hudson.remoting.UserRequest.perform(UserRequest.java:153)
	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
	at hudson.remoting.Request$2.run(Request.java:336)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at hudson.remoting.Engine$1$1.run(Engine.java:94)
	at java.lang.Thread.run(Unknown Source)
Recording test results
ERROR: Step ‘Publish JUnit test result report’ failed: Test reports were found but none of them are new. Did leafNodes run? 
For example, C:\Jenkins\workspace\Testautomatisierung\06_Testfälle_ReadyAPI\Guidewire\CC\RA_A_Smoketest_Master\report.xml is 3 Minuten 13 Sekunden old

Starting import task...
Import Cucumber features Task started...

chilber@agile-im.de (JIRA)

unread,
Feb 4, 2019, 5:11:18 AM2/4/19
to jenkinsc...@googlegroups.com
Carsten Hilber edited a comment on Bug JENKINS-55836
The Job is a freestyle job.
The option I set is called 'Delete workspace before build starts', within Build Environment.
It is configured to use the command line git. There are no more options given to the git  task, only auth and branch is set.

I additionally set the "Wipe out repository and force clone" option in git and i saw the same behavior as before.
Then I set the wipe out exclusive, without the cleanup task and I got a different error message from git:

{code:java}
vhvEntw\ Jenkins\workspace\Testautomatisierung\06_Testfälle_ReadyAPI\Guidewire\CC\RA_A_Smoketest_Master
{code}

nelsonaaronm@gmail.com (JIRA)

unread,
Feb 5, 2019, 5:27:01 PM2/5/19
to jenkinsc...@googlegroups.com

Same issue here. We run our Jenkins master on a Windows Server 2008 R2 server and anytime a freestyle job has the "Build Environment" check box checked for "Delete workspace before build starts", there is a lock that Jenkins has on a .pack file in the git directory.

 

Our work-around is to add an advanced configuration to the "Delete workspace before build starts" which specifically excludes "/.git/*"

nelsonaaronm@gmail.com (JIRA)

unread,
Feb 5, 2019, 5:27:02 PM2/5/19
to jenkinsc...@googlegroups.com
Aaron Nelson edited a comment on Bug JENKINS-55836
Same issue here. We run our Jenkins master on a Windows Server 2008 R2 server and anytime a freestyle job has the "Build Environment" check box checked for "Delete workspace before build starts", there is a lock that Jenkins has on a .pack file in the git directory.

 

Our work-around is to add an advanced configuration to the "Delete workspace before build starts" which specifically excludes " * * /.git/* *"

nelsonaaronm@gmail.com (JIRA)

unread,
Feb 5, 2019, 5:28:01 PM2/5/19
to jenkinsc...@googlegroups.com
Aaron Nelson edited a comment on Bug JENKINS-55836
Same issue here. We run our Jenkins master on a Windows Server 2008 R2 server and anytime a freestyle job has the "Build Environment" check box checked for "Delete workspace before build starts", there is a lock that Jenkins has on a .pack file in the git directory.

 

Our work-around is to add an advanced configuration to the "Delete workspace before build starts" which specifically excludes
 
{code:java}
* * /.git/* *{code}

bart.devriendt@kbc.be (JIRA)

unread,
Feb 6, 2019, 2:47:02 AM2/6/19
to jenkinsc...@googlegroups.com

We are having this issue as well since we upgraded from 3.8.0 to 3.9.1.  At random times we have workspaces that cannot be cleaned anymore and the only solution seems to be to restart the Jenkins agent service.  This only occurs on our windows slaves, Linux slaves are not impacted.

bart.devriendt@kbc.be (JIRA)

unread,
Feb 6, 2019, 8:58:03 AM2/6/19
to jenkinsc...@googlegroups.com

The fact that cleanup workspace before build is mentioned here is not really a cause.  It's a symptom of a problem that occurs earlier.  If we do a build and then manually try to wipe the workspace we also get the same error.

Also it seems like if you wait a while (somewhere between half an hour and 2 hours the lock is removed and the cleanup works again.

nelsonaaronm@gmail.com (JIRA)

unread,
Feb 8, 2019, 12:05:02 PM2/8/19
to jenkinsc...@googlegroups.com

I can confirm with Bart, after a couple of hours the lock is gone and the workspace cleanup/deleting is acting as expected.

kamalcastro@gmail.com (JIRA)

unread,
Mar 13, 2019, 3:18:02 AM3/13/19
to jenkinsc...@googlegroups.com

We too noticed the same issue with Windows slaves under Jenkins version 2.150.3. Workaround mentioned by Aaron Nelson wasn't working because the next git clone identifies ".git" directory as suspicious.

I am able to replicate this issue with "Freestyle" job with below configurations.

  1. SCM - Git checkout
  2. Build Environment - Delete workspace before build starts
  3. Build Trigger - For every 15 mins ( H/15 * * * * (
  4. Build - This is not important for this testing.

As Bart explained, we are not able to delete the workspace/directory manually as well. Only way is to restart the Jenkins slave process.

Workaround:

Use "Delete workspace when build is done" in post build section apart of Build Environment. But this doesn't suit some use cases though.

 

Why do Jenkins process use the workspace  even after the build completes ? I see especially all these cases are throwing error with .git/objects/pack/<sha file> is in use

kamalcastro@gmail.com (JIRA)

unread,
Mar 13, 2019, 3:31:03 AM3/13/19
to jenkinsc...@googlegroups.com
We too noticed the same issue with Windows slaves under Jenkins version 2.150.3. Workaround mentioned by Aaron Nelson wasn't working because the next git clone identifies ".git" directory as suspicious.

I am able to replicate this issue with "Freestyle" job with below configurations.
# SCM - Git checkout
# Build Environment - Delete workspace before build starts
# Build Trigger - For every 15 mins ( H/15 * * * * (
# Build - This is not important for this testing.


As Bart explained, we are not able to delete the workspace/directory manually as well. Only way is to restart the Jenkins slave process.

Workaround:

Use "Delete workspace when build is done" in post build section apart of Build Environment. But this doesn't suit some use cases though.

 

Why do Jenkins process use the workspace  even after the build completes ? I see especially all these cases are throwing error with .git/objects/pack/<sha file> is in use

iplaman@gmail.com (JIRA)

unread,
Mar 15, 2019, 6:33:03 PM3/15/19
to jenkinsc...@googlegroups.com

I can actually reproduce the bug on Git 3.8.0 and couldn't reproduce it on 3.0.5. I hope to bisect it to later versions to narrow the changes caused it

iplaman@gmail.com (JIRA)

unread,
Mar 15, 2019, 6:42:04 PM3/15/19
to jenkinsc...@googlegroups.com
Idan Bidani edited a comment on Bug JENKINS-55836
I can actually reproduce the bug on Git 3.8.0 and couldn't reproduce it on 3.0.5. I hope to bisect it to later versions to narrow the changes caused it .

reproduced on git plugin 3.6.4

iplaman@gmail.com (JIRA)

unread,
Mar 15, 2019, 7:17:02 PM3/15/19
to jenkinsc...@googlegroups.com
Idan Bidani edited a comment on Bug JENKINS-55836
I can actually reproduce the bug on Git 3.8.0 and couldn't reproduce it on 3.0.5. I hope to bisect it to later versions to narrow the changes caused it.

reproduced on git I've isolated the bug to a change that happened between the 3.0.5(no bug) and 3.1.0 release

It may be a case of a conflicting change with another
plugin change. If anyone else can try testing 3. 6 0 . 4 5 fixes the issue it will be helpful

iplaman@gmail.com (JIRA)

unread,
Mar 15, 2019, 7:53:04 PM3/15/19
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Mar 15, 2019, 8:17:04 PM3/15/19
to jenkinsc...@googlegroups.com

Idan Bidani I don't see anything in the differences you listed that would leave a file open. The git client sequence of changes added support for git large files, but I assume you're not using git large files and thus are not executing the new code paths.

iplaman@gmail.com (JIRA)

unread,
Mar 16, 2019, 10:19:05 PM3/16/19
to jenkinsc...@googlegroups.com

Per Mark Waite guidance and suggestions - big thanks! I've used Kosuke's tool https://file-leak-detector.kohsuke.org/ which helped me identify the open file handlers of the Jenkins node.

This the stack trace the tool provided, notice com.microfocus.application.automation.tools.octane.model.processors.scm.GitSCMProcessor 

I disabled this plugin and the issue is resolved now.

 
#17 PATH_TOWORKSPACE\GitWinBug\.git\objects\pack\pack-1db6aa468a129acaa6b8055b79680fec66793541.pack by thread:pool-1-thread-7 for JNLP4-connect connection to JENKINS_URL/IP_ADDR:60048 id=1013 on Sat Mar 16 21:44:38 EDT 2019#17 PATH_TOWORKSPACE\GitWinBug\.git\objects\pack\pack-1db6aa468a129acaa6b8055b79680fec66793541.pack by thread:pool-1-thread-7 for JNLP4-connect connection to JENKINS_URL/IP_ADDR:60048 id=1013 on Sat Mar 16 21:44:38 EDT 2019 at java.io.RandomAccessFile.<init>(Unknown Source) at org.eclipse.jgit.internal.storage.file.PackFile.doOpen(PackFile.java:643) at org.eclipse.jgit.internal.storage.file.PackFile.beginWindowCache(PackFile.java:625) at org.eclipse.jgit.internal.storage.file.WindowCache.load(WindowCache.java:295) at org.eclipse.jgit.internal.storage.file.WindowCache.getOrLoad(WindowCache.java:379) at org.eclipse.jgit.internal.storage.file.WindowCache.get(WindowCache.java:184) at org.eclipse.jgit.internal.storage.file.WindowCursor.pin(WindowCursor.java:360) at org.eclipse.jgit.internal.storage.file.WindowCursor.copy(WindowCursor.java:259) at org.eclipse.jgit.internal.storage.file.PackFile.readFully(PackFile.java:601) at org.eclipse.jgit.internal.storage.file.PackFile.load(PackFile.java:773) at org.eclipse.jgit.internal.storage.file.PackFile.get(PackFile.java:285) at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openPackedObject(ObjectDirectory.java:486) at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openPackedFromSelfOrAlternate(ObjectDirectory.java:444) at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openObject(ObjectDirectory.java:435) at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:165) at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:236) at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:890) at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:800) at com.microfocus.application.automation.tools.octane.model.processors.scm.GitSCMProcessor$FileContentCallable.invoke(GitSCMProcessor.java:128) at com.microfocus.application.automation.tools.octane.model.processors.scm.GitSCMProcessor$FileContentCallable.invoke(GitSCMProcessor.java:105) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3087) at hudson.remoting.UserRequest.perform(UserRequest.java:207) at hudson.remoting.UserRequest.perform(UserRequest.java:53) at hudson.remoting.Request$2.run(Request.java:358) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:98) at java.lang.Thread.run(Unknown Source)

iplaman@gmail.com (JIRA)

unread,
Mar 17, 2019, 1:24:02 PM3/17/19
to jenkinsc...@googlegroups.com
Idan Bidani updated an issue
 
Change By: Idan Bidani
Component/s: hp-application-automation-tools-plugin
Component/s: git-plugin

iplaman@gmail.com (JIRA)

unread,
Mar 17, 2019, 1:32:03 PM3/17/19
to jenkinsc...@googlegroups.com
 
Re: Unable to delete workspace due to locked git .pack file

Assigned to hp-application-automation-tools-plugin.
Workaround: Since I didn't need the HP plugin anymore I simply uninstalled it but for those which may still use it It could be worth trying to revert to 5.0 version(last known working version I used)
For hp-application-automation-tools-plugin maintainers, it's recommended you either to place the repository manipulating calls inside try with resources, or switch (where feasible) to use calls to the git client plugin rather than calling directly to JGit.

ben.ptacek@gmail.com (JIRA)

unread,
Mar 19, 2019, 11:47:03 AM3/19/19
to jenkinsc...@googlegroups.com

We also have a Windows node and we ran the fileleak and it is pointing to the same issue/plugin -

com.microfocus.application.automation.tools.octane.model.processors.scm.GitSCMProcessor$FileContentCallable.invoke(GitSCMProcessor.java:128)

We will report back if reverting helps.

ben.ptacek@gmail.com (JIRA)

unread,
Mar 21, 2019, 4:41:01 PM3/21/19
to jenkinsc...@googlegroups.com
Ben Ptacek updated an issue
 
Change By: Ben Ptacek
Attachment: image-2019-03-21-15-40-39-729.png

ben.ptacek@gmail.com (JIRA)

unread,
Mar 21, 2019, 4:42:03 PM3/21/19
to jenkinsc...@googlegroups.com
 
Re: Unable to delete workspace due to locked git .pack file

Okay, the revert could only go to 5.6.2 of  the Microfocus plugin.  The issue is when you have the Delete Workspace selected (see pic below for where this option is set).  If I unselect it, stop the slave service, manually clean the workspace, start the service and run the job, then I am able to run the job successfully thereafter.

ben.ptacek@gmail.com (JIRA)

unread,
Mar 22, 2019, 9:57:02 AM3/22/19
to jenkinsc...@googlegroups.com
Ben Ptacek edited a comment on Bug JENKINS-55836
Okay, the revert could only go to 5.6.2 of  the Microfocus plugin and this did not help .  The issue is when you have the Delete Workspace selected (see pic below for where this option is set).  If I unselect it, stop the slave service, manually clean the workspace, start the service and run the job, then I am able to run the job successfully thereafter.

!image-2019-03-21-15-40-39-729.png!

christopher.smith@sungardas.com (JIRA)

unread,
Mar 25, 2019, 1:46:04 PM3/25/19
to jenkinsc...@googlegroups.com

Recently ran into issues with plugins and we did a update of all plugins. As soon as that was done this problem started occurring for us. Tried a bunch of workarounds so far and none of it seems to work. Adding the workaround Aaron suggested. Even manually deleting the contents of workspace myself doesn't seem to fix the issue either as the next time a job runs and goes to pull down a branch it fails due to permissions. My C:\Jenkins\workspace folder on the Slave node where these files should be being cleaned up is basically wide open right now with Everyone having full permission. I assume this is still related to some kind of lock....?

/.git/* exclude and Apply pattern also on directories set in the Workspace Cleanup config in the job

[WS-CLEANUP] Deleting project workspace...
ERROR: [WS-CLEANUP] Cannot delete workspace: Unable to delete 'C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\.git\FETCH_HEAD'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
ERROR: Cannot delete workspace: Unable to delete 'C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\.git\FETCH_HEAD'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
sent [C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\hpc_install20190320.log] to splunk in 1 events
Finished: FAILURE

/.git/* exclude, Apply pattern also on directories, and Disable deferred wipeout set in the Workspace Cleanup config in the job

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is disabled by the job configuration...
ERROR: [WS-CLEANUP] Cannot delete workspace: Unable to delete 'C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\.git\FETCH_HEAD'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
ERROR: Cannot delete workspace: Unable to delete 'C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\.git\FETCH_HEAD'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
sent [C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\hpc_install20190320.log] to splunk in 1 events
Finished: FAILURE

christopher.smith@sungardas.com (JIRA)

unread,
Mar 25, 2019, 3:11:04 PM3/25/19
to jenkinsc...@googlegroups.com
Christopher Smith edited a comment on Bug JENKINS-55836
Recently ran into issues with plugins and we did a update of all plugins. As soon as that was done this problem started occurring for us. Tried a bunch of workarounds so far and none of it seems to work. Adding the workaround Aaron suggested. Even manually deleting the contents of workspace myself doesn't seem to fix the issue either as the next time a job runs and goes to pull down a branch it fails due to permissions. My C:\Jenkins\workspace folder on the Slave node where these files should be being cleaned up is basically wide open right now with Everyone having full permission. I assume this is still related to some kind of lock....?


{panel :title= }
* * /.git/** exclude and Apply pattern also on directories set in the Workspace Cleanup config in the job } *
[WS-CLEANUP] Deleting project workspace...
ERROR: [WS-CLEANUP] Cannot delete workspace: Unable to delete 'C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\.git\FETCH_HEAD'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
ERROR: Cannot delete workspace: Unable to delete 'C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\.git\FETCH_HEAD'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
sent [C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\hpc_install20190320.log] to splunk in 1 events
Finished: FAILURE
{panel}



{panel :title= }
* * /.git/** exclude, Apply pattern also on directories, and Disable deferred wipeout set in the Workspace Cleanup config in the job } *
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is disabled by the job configuration...
ERROR: [WS-CLEANUP] Cannot delete workspace: Unable to delete 'C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\.git\FETCH_HEAD'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
ERROR: Cannot delete workspace: Unable to delete 'C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\.git\FETCH_HEAD'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
sent [C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\hpc_install20190320.log] to splunk in 1 events
Finished: FAILURE
{panel}

christopher.smith@sungardas.com (JIRA)

unread,
Mar 25, 2019, 3:12:02 PM3/25/19
to jenkinsc...@googlegroups.com
Christopher Smith edited a comment on Bug JENKINS-55836
Recently ran into issues with plugins and we did a update of all plugins. As soon as that was done this problem started occurring for us. Tried a bunch of workarounds so far and none of it seems to work. Adding the workaround Aaron suggested. Even manually deleting the contents of workspace myself doesn't seem to fix the issue either as the next time a job runs and goes to pull down a branch it fails due to permissions. My C:\Jenkins\workspace folder on the Slave node where these files should be being cleaned up is basically wide open right now with Everyone having full permission. I assume this is still related to some kind of lock....?

Note: The below should says */.git/** but the second asterisk isn't coming through.
{panel}
**/.git/** exclude and Apply pattern also on directories set in the Workspace Cleanup config in the job*

[WS-CLEANUP] Deleting project workspace...
ERROR: [WS-CLEANUP] Cannot delete workspace: Unable to delete 'C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\.git\FETCH_HEAD'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
ERROR: Cannot delete workspace: Unable to delete 'C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\.git\FETCH_HEAD'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
sent [C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\hpc_install20190320.log] to splunk in 1 events
Finished: FAILURE
{panel}
{panel}
**/.git/** exclude, Apply pattern also on directories, and Disable deferred wipeout set in the Workspace Cleanup config in the job*

[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is disabled by the job configuration...
ERROR: [WS-CLEANUP] Cannot delete workspace: Unable to delete 'C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\.git\FETCH_HEAD'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
ERROR: Cannot delete workspace: Unable to delete 'C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\.git\FETCH_HEAD'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
sent [C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\hpc_install20190320.log] to splunk in 1 events
Finished: FAILURE
{panel}

christopher.smith@sungardas.com (JIRA)

unread,
Mar 25, 2019, 3:13:01 PM3/25/19
to jenkinsc...@googlegroups.com
Christopher Smith edited a comment on Bug JENKINS-55836
Recently ran into issues with plugins and we did a update of all plugins. As soon as that was done this problem started occurring for us. Tried a bunch of workarounds so far and none of it seems to work. Adding the workaround Aaron suggested. Even manually deleting the contents of workspace myself doesn't seem to fix the issue either as the next time a job runs and goes to pull down a branch it fails due to permissions. My C:\Jenkins\workspace folder on the Slave node where these files should be being cleaned up is basically wide open right now with Everyone having full permission. I assume this is still related to some kind of lock....?

Note: The below should says 

{code:java}
*/.git/**  
{code}
 
but the second asterisk isn't coming through.

{panel}
**/.git/** exclude and Apply pattern also on directories set in the Workspace Cleanup config in the job*
[WS-CLEANUP] Deleting project workspace...
ERROR: [WS-CLEANUP] Cannot delete workspace: Unable to delete 'C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\.git\FETCH_HEAD'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
ERROR: Cannot delete workspace: Unable to delete 'C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\.git\FETCH_HEAD'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
sent [C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\hpc_install20190320.log] to splunk in 1 events
Finished: FAILURE
{panel}
{panel}
**/.git/** exclude, Apply pattern also on directories, and Disable deferred wipeout set in the Workspace Cleanup config in the job*
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is disabled by the job configuration...
ERROR: [WS-CLEANUP] Cannot delete workspace: Unable to delete 'C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\.git\FETCH_HEAD'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
ERROR: Cannot delete workspace: Unable to delete 'C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\.git\FETCH_HEAD'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
sent [C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\hpc_install20190320.log] to splunk in 1 events
Finished: FAILURE
{panel}

mark.earl.waite@gmail.com (JIRA)

unread,
Apr 8, 2019, 9:18:03 PM4/8/19
to jenkinsc...@googlegroups.com

Christopher Smith you don't mention in your description if you are using the hp-automation-tools-plugin. If you are not using the hp-automation-tools-plugin, then you've found a different problem and it most likely has a different root cause. If you are not using the hp-automation-tools-plugin, please submit a separate bug report with the details of your environment and your best guess at the steps that will allow others to recreate the problem.

christopher.smith@sungardas.com (JIRA)

unread,
Apr 9, 2019, 9:29:02 AM4/9/19
to jenkinsc...@googlegroups.com
Christopher Smith edited a comment on Bug JENKINS-55836
***It turned out that we had used a different user than the user account the Jenkins slave service was using when troubleshooting/working with the Jenkins workspace directory. Despite both accounts being members of the Administrators group it seems everything needed to be owned/created/modified using the same account***

daniel.gront@microfocus.com (JIRA)

unread,
May 28, 2019, 4:59:03 AM5/28/19
to jenkinsc...@googlegroups.com

daniel.gront@microfocus.com (JIRA)

unread,
May 28, 2019, 4:59:05 AM5/28/19
to jenkinsc...@googlegroups.com
Daniel Gront updated an issue
Change By: Daniel Gront
Labels: git git-plugin octane

bowzoo@gmail.com (JIRA)

unread,
Jul 2, 2019, 1:36:03 AM7/2/19
to jenkinsc...@googlegroups.com
Zoe Chao commented on Bug JENKINS-55836
 
Re: Unable to delete workspace due to locked git .pack file

It happens to us as well.

  • We are using Workspace Cleanup  plugin 0.37 
  • Jenkins 3.183.3 Freestyle 

daniel.gront@microfocus.com (JIRA)

unread,
Jul 2, 2019, 1:38:02 AM7/2/19
to jenkinsc...@googlegroups.com

Radi Berkovich, was it fixed in the latest version of the plugin?

bowzoo@gmail.com (JIRA)

unread,
Jul 2, 2019, 1:58:04 AM7/2/19
to jenkinsc...@googlegroups.com
Zohan edited a comment on Bug JENKINS-55836
It happens to us as well.
* We are using Workspace Cleanup  plugin 0.37 
* Jenkins 3.183.3 Freestyle 


It keeps running the same error
```
Triggered by Benson GitLab Merge Request #181: omg/feature/gateway/IotRequestServer_v2 => master
Building in workspace /var/lib/jenkins/workspace/omg_smoke_test
[WS-CLEANUP] Deleting project workspace...
ERROR: [WS-CLEANUP] Cannot delete workspace: Unable to delete '/var/lib/jenkins/workspace/omg_smoke_test'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
ERROR: Cannot delete workspace: Unable to delete '/var/lib/jenkins/workspace/omg_smoke_test'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
Finished: FAILURE
```

Util the other user kick a new job from different repo.


moneysc27@gmail.com (JIRA)

unread,
Aug 13, 2019, 11:30:03 AM8/13/19
to jenkinsc...@googlegroups.com

Radi Berkovich do we have any updates on this? I can confirm that workspace is not getting deleted because of locked .pack file.

radislav.berkovich@hpe.com (JIRA)

unread,
Aug 14, 2019, 1:57:02 AM8/14/19
to jenkinsc...@googlegroups.com

 

Hi.

I see here several directions

1.first of all, please validate that you use hp-automation-tools-plugin. if so , we did several improvements in the area, 

Please try to use our last beta version [5.8.5-beta|https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/hp-application-automation-tools-plugin/5.8.5-beta/hp-application-automation-tools-plugin-5.8.5-beta.hpi.]

2.if you don't use  hp-automation-tools-plugin, then you've found a different problem and it most likely has a different root cause

3.inthe beginning of the thread I saw the following : Unable to delete 'C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\.git\FETCH_HEAD

Root problem of this is locks of git and its not related to  hp-automation-tools-plugin plugin.

radislav.berkovich@hpe.com (JIRA)

unread,
Aug 14, 2019, 2:17:06 AM8/14/19
to jenkinsc...@googlegroups.com
Radi Berkovich edited a comment on Bug JENKINS-55836
 

Hi.

I see here several directions

1.first of all, please validate that you use hp-automation-tools-plugin. if so , we did several improvements in the area, 



2.if you don't use  hp-automation-tools-plugin, then you've found a different problem and it most likely has a different root cause

3. inthe in the beginning of the thread I saw the following : Unable to delete 'C:\Jenkins\workspace\LabD_Build_Automation\Validate_LabD_VCSA\.git\FETCH_HEAD


Root problem of this is locks of git and its not related to  hp-automation-tools-plugin plugin.

moneysc27@gmail.com (JIRA)

unread,
Aug 20, 2019, 4:28:03 PM8/20/19
to jenkinsc...@googlegroups.com

Radi Berkovich,

Thank you so much!!!

I can confirm that 5.8.5-beta have fixed workspace delete issue.

We are on latest 5.8 version. Any plan on releasing stable version with the fix?

daniel.gront@microfocus.com (JIRA)

unread,
Aug 21, 2019, 12:21:02 AM8/21/19
to jenkinsc...@googlegroups.com

Hey Manish Christian, our release process takes some time in order to ensure that everything works correctly and no bugs are found. We are hoping to release a stable version in October.

daniel.gront@microfocus.com (JIRA)

unread,
Aug 21, 2019, 12:22:05 AM8/21/19
to jenkinsc...@googlegroups.com
Daniel Gront edited a comment on Bug JENKINS-55836
Hey [~manishchristian], our release process takes some time in order to ensure that everything works correctly and no bugs are found. We are hoping to release a stable version in October.

I am moving this issue to fixed.

daniel.gront@microfocus.com (JIRA)

unread,
Aug 21, 2019, 12:22:06 AM8/21/19
to jenkinsc...@googlegroups.com
Change By: Daniel Gront
Status: Open Fixed but Unreleased
Resolution: Fixed

al.nik.kovaliov@gmail.com (JIRA)

unread,
Oct 23, 2019, 3:51:03 AM10/23/19
to jenkinsc...@googlegroups.com
Aliaksandr Kavaliou commented on Bug JENKINS-55836
 
Re: Unable to delete workspace due to locked git .pack file

Hello, Can please someone tell the ETA when the fix will be released? Thanks in advance.

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

jan.paul.van.der.jagt@achmea.nl (JIRA)

unread,
Oct 30, 2019, 10:00:10 AM10/30/19
to jenkinsc...@googlegroups.com

jan.paul.van.der.jagt@achmea.nl (JIRA)

unread,
Oct 30, 2019, 10:01:05 AM10/30/19
to jenkinsc...@googlegroups.com

jan.paul.van.der.jagt@achmea.nl (JIRA)

unread,
Oct 30, 2019, 10:01:08 AM10/30/19
to jenkinsc...@googlegroups.com

jan.paul.van.der.jagt@achmea.nl (JIRA)

unread,
Oct 30, 2019, 10:01:12 AM10/30/19
to jenkinsc...@googlegroups.com

peter.willekens@kbc.be (JIRA)

unread,
Nov 28, 2019, 8:09:03 AM11/28/19
to jenkinsc...@googlegroups.com

When will this fix actually be Released ?
As far as I can see it was not in 5.9.

radislav.berkovich@microfocus.com (JIRA)

unread,
Nov 28, 2019, 8:16:03 AM11/28/19
to jenkinsc...@googlegroups.com

In versions 5.9 we did several related fixes in the area.

Version 5.9 was released in september.

peter.willekens@kbc.be (JIRA)

unread,
Nov 28, 2019, 8:26:03 AM11/28/19
to jenkinsc...@googlegroups.com

Can you confirm this beta fix was included in version 5.9 ?
Status of this issue suggests otherwise ...

radislav.berkovich@microfocus.com (JIRA)

unread,
Nov 28, 2019, 8:30:09 AM11/28/19
to jenkinsc...@googlegroups.com

included,

I also will change status of issue.

radislav.berkovich@microfocus.com (JIRA)

unread,
Nov 28, 2019, 8:30:11 AM11/28/19
to jenkinsc...@googlegroups.com

peter.willekens@kbc.be (JIRA)

unread,
Nov 28, 2019, 8:47:03 AM11/28/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages