[JIRA] (JENKINS-17212) Git clean broken on Windows

2016-08-26 Thread stephan.kr...@tomtom.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Stephan Krull commented on  JENKINS-17212  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Git clean broken on Windows   
 

  
 
 
 
 

 
 We get the aforementioned exception too. Jenkins 2.7.1 (LTS); Git Plugin (2.5.2); Git Client Plugin (1.19.7) A job running on a Windows node. Build steps create output directories in the Git repository that is referenced by the job. Next run occasionally fails with the exception while JGit tries to clean up. On the Windows node no file handle could by found by Process Explorer. We deactivated "Clean before Checkout" and created a build step before SCM to run "git clean -fdx" (see https://wiki.jenkins-ci.org/display/JENKINS/pre-scm-buildstep).  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17212) Git clean broken on Windows

2016-08-18 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite commented on  JENKINS-17212  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Git clean broken on Windows   
 

  
 
 
 
 

 
 Some of the common conditions which cause Windows to refuse to delete files and directories include: 
 
File busy because a process has it open (look for git.exe processes still running, or for other processes which might be using that file 
Directory busy because a process has a file in the directory open (look for processes which might be using that directory) 
Directory busy because a process is using that directory as its current directory 
 There is a stackoverflow article which provides good hints for locating processes that are preventing file deletion. If your investigation shows that the Jenkins java process is the process holding the file busy, then you will need to try to identify which Jenkins plugin is holding the file open.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17212) Git clean broken on Windows

2016-08-18 Thread cobe...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Christoph Obexer commented on  JENKINS-17212  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Git clean broken on Windows   
 

  
 
 
 
 

 
 Mark Waite I have a Multibranch Pipeline build that used "bat 'git clean -fdx'" and "checkout scm" when I read that I could now configure the clean before checkout behavior I enabled that and on subsequent builds (triggered by branch indexing) the builds failed with the exception above. Prior runs of the build created temporary files and folders (multiple levels deep) and my exception said "Could not delete file" and then showed the path of a directory. I don't know if there is supposed to be a difference in the message tough.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17212) Git clean broken on Windows

2016-08-08 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite commented on  JENKINS-17212  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Git clean broken on Windows   
 

  
 
 
 
 

 
 Christoph Obexer can you provide step by step instructions which show the problem in multiple environments? I'm not aware of JGit clean issues, though each time I search the code for resource leaks, I find more to be fixed.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17212) Git clean broken on Windows

2016-08-08 Thread cobe...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Christoph Obexer commented on  JENKINS-17212  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Git clean broken on Windows   
 

  
 
 
 
 

 
 Using the experimental git plugin made no difference for me. And I doubt it's related to leaked file handles because the Jenkinsfile that's started afterwards calls git clean -fdx which never failed.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17212) Git clean broken on Windows

2016-07-04 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite commented on  JENKINS-17212  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Git clean broken on Windows   
 

  
 
 
 
 

 
 I'm not aware of any open issue related to the JGit implementation of clean. If you're open to experimentation with your Jenkins server, you could install git client plugin 2.0.0-beta1 and git plugin 3.0.0-beta1 from the experimental update center. The git client plugin 2.0.0-beta1 uses JGit 4.3 instead of JGit 3.7 and uses the JDK 7 "try with resources" facility inside the git client plugin to reduce the risk of a programming mistake which left a file open.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17212) Git clean broken on Windows

2016-07-04 Thread quen...@dufour.io (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Quentin Dufour commented on  JENKINS-17212  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Git clean broken on Windows   
 

  
 
 
 
 

 
 Just to confirm that I'm currently encountering the same problem with JGit on Windows (on build agent, Windows Server 2012 R2, a different file each time).  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-17212) Git clean broken on Windows

2013-03-22 Thread markwa...@yahoo.com (JIRA)














































Mark Waite
 commented on  JENKINS-17212


Git clean broken on Windows















I am unable to duplicate this problem with git-client-plugin 1.0.5.  I confirmed that the workspace is cleaned on each build by having the job create an internal tag for the build, and confirming by browsing the workspace after the build to confirm that only the most recent tag is in the repository, not the tag from other builds.

I was using a very small repository for my tests, and was cloning to a Windows Home Server 2011 machine.  Your results may be different than mine, depending on repository size, virus scanning engine, etc.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-17212) Git clean broken on Windows

2013-03-22 Thread markwa...@yahoo.com (JIRA)












































 
Mark Waite
 edited a comment on  JENKINS-17212


Git clean broken on Windows
















I am unable to duplicate this problem with git-client-plugin 1.0.5.  I verified that the workspace is cleaned on each build by having the job create an internal tag for the build, then  browsing the workspace after the build to see that only the most recent tag is in the repository, not the tag from previous builds.

I was using a very small repository for my tests, and was cloning to a Windows Home Server 2011 machine.  Your results may be different than mine, depending on repository size, virus scanning engine, etc.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-17212) Git clean broken on Windows

2013-03-18 Thread icker...@java.net (JIRA)














































ickersep
 commented on  JENKINS-17212


Git clean broken on Windows















Unfortunately I still get the same failure with the snapshot build.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-17212) Git clean broken on Windows

2013-03-16 Thread nicolas.del...@gmail.com (JIRA)














































Nicolas De Loof
 commented on  JENKINS-17212


Git clean broken on Windows















Can you please try a SNAPSHOT build https://jenkins.ci.cloudbees.com/job/plugins/job/git-client-plugin/33/org.jenkins-ci.plugins$git-client/artifact/org.jenkins-ci.plugins/git-client/1.0.5-SNAPSHOT/git-client-1.0.5-SNAPSHOT.hpi ?

I've included an attempt to fix this issue, configuring JGit to retry after deletion failure (up to 10 times, with a 100ms delay) - my assumption is that, on windows, file may be locked (maybe by antivirus, or other system process) as JVM tries to delete it. This delay+retry should then be a valid workaround. Let me know



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-17212) Git clean broken on Windows

2013-03-15 Thread nicolas.del...@gmail.com (JIRA)














































Nicolas De Loof
 commented on  JENKINS-17212


Git clean broken on Windows















short term workaround is either to run jenkins with -Dorg.jenkinsci.plugins.gitclient.Git.useCLI=true

possible workaround is to copy JGit CleanCommand into git-client and force IGNORE on such failure, not sure this is a good option (from a code duplication perspective, it isn't)



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-17212) Git clean broken on Windows

2013-03-14 Thread icker...@java.net (JIRA)














































ickersep
 created  JENKINS-17212


Git clean broken on Windows















Issue Type:


Bug



Assignee:


Nicolas De Loof



Components:


git



Created:


14/Mar/13 11:20 AM



Description:


Since the update of the Git Client plugin to 1.0.4 git clean doesn't work anymore on Windows build agents. It fails with (the file being different between different tries):

Cleaning workspace

FATAL: Could not delete file C:\JenkinsSlaveHome\slave2\workspace\Somejob\tmp\Store1\trash
org.eclipse.jgit.api.errors.JGitInternalException: Could not delete file C:\JenkinsSlaveHome\slave2\workspace\Somejob\tmp\Store1\trash
	at org.eclipse.jgit.api.CleanCommand.call(CleanCommand.java:137)
	at org.jenkinsci.plugins.gitclient.JGitAPIImpl.clean(JGitAPIImpl.java:305)
	at hudson.plugins.git.GitAPI.clean(GitAPI.java:248)
	at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1213)
	at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1196)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2348)
	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
	at hudson.remoting.Request$2.run(Request.java:326)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
	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 java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Could not delete file C:\JenkinsSlaveHome\slave2\workspace\Gerrit-FieldWorks-Win-any-develop-debug\tmp\Store1\trash
	at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:142)
	at org.eclipse.jgit.api.CleanCommand.call(CleanCommand.java:132)
	... 14 more




Environment:


Windows




Project:


Jenkins



Priority:


Major



Reporter:


ickersep

























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-17212) Git clean broken on Windows

2013-03-14 Thread icker...@java.net (JIRA)














































ickersep
 updated  JENKINS-17212


Git clean broken on Windows
















Change By:


ickersep
(14/Mar/13 11:24 AM)




Description:


SincetheupdateoftheGitClientpluginto1.0.4gitclean
(Cleanaftercheckout)
doesntworkanymoreonWindowsbuildagents.Itfailswith(thefilebeingdifferentbetweendifferenttries):CleaningworkspaceFATAL:CouldnotdeletefileC:\JenkinsSlaveHome\slave2\workspace\Somejob\tmp\Store1\trashorg.eclipse.jgit.api.errors.JGitInternalException:CouldnotdeletefileC:\JenkinsSlaveHome\slave2\workspace\Somejob\tmp\Store1\trash	atorg.eclipse.jgit.api.CleanCommand.call(CleanCommand.java:137)	atorg.jenkinsci.plugins.gitclient.JGitAPIImpl.clean(JGitAPIImpl.java:305)	athudson.plugins.git.GitAPI.clean(GitAPI.java:248)	athudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1213)	athudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1196)	athudson.FilePath$FileCallableWrapper.call(FilePath.java:2348)	athudson.remoting.UserRequest.perform(UserRequest.java:118)	athudson.remoting.UserRequest.perform(UserRequest.java:48)	athudson.remoting.Request$2.run(Request.java:326)	athudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)	atjava.util.concurrent.FutureTask$Sync.innerRun(UnknownSource)	atjava.util.concurrent.FutureTask.run(UnknownSource)	atjava.util.concurrent.ThreadPoolExecutor.runWorker(UnknownSource)	atjava.util.concurrent.ThreadPoolExecutor$Worker.run(UnknownSource)	atjava.lang.Thread.run(UnknownSource)Causedby:java.io.IOException:CouldnotdeletefileC:\JenkinsSlaveHome\slave2\workspace\Gerrit-FieldWorks-Win-any-develop-debug\tmp\Store1\trash	atorg.eclipse.jgit.util.FileUtils.delete(FileUtils.java:142)	atorg.eclipse.jgit.api.CleanCommand.call(CleanCommand.java:132)	...14more



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.