Quantcast

[JIRA] (JENKINS-15418) Git fails to clean windows workspace with long path

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15418) Git fails to clean windows workspace with long path

JIRA noreply@jenkins-ci.org
Issue Type: Bug Bug
Assignee: Nicolas De Loof
Attachments: config.xml
Components: git
Created: 05/Oct/12 10:28 AM
Description:

I see that issue happening on long paths. A workaround was to use drive mapping in order to reduce the length but it doesn't solve the issue and we came to the limit of path shortening possibilities.

Here's a stacktrace from a Matrix job:
https://qa.nuxeo.org/jenkins/job/nuxeo-master-fullbuild-part2-distribution-multios/218/Slave=MULTIDB_WINDOWS

08:59:26 Building remotely on tweedledum in workspace C:\Jenkins\workspace\nuxeo-master-fullbuild-part2-distribution-multios\Slave\MULTIDB_WINDOWS
08:59:26 Checkout:MULTIDB_WINDOWS / C:\Jenkins\workspace\nuxeo-master-fullbuild-part2-distribution-multios\Slave\MULTIDB_WINDOWS - hudson.remoting.Channel@4a58a509:tweedledum
08:59:26 Using strategy: Default
08:59:26 Last Built Revision: Revision 3676821964588c85aa8b71e288c743c24edd00a3 (origin/master)
08:59:27 Cloning the remote Git repository
08:59:27 Cloning repository git://github.com/nuxeo/nuxeo-distribution.git
08:59:27 git --version
08:59:27 git version 1.7.6.msysgit.0
08:59:27 ERROR: Failed to clean the workspace
08:59:27 java.io.IOException: Unable to delete C:\Jenkins\workspace\nuxeo-master-fullbuild-part2-distribution-multios\Slave\MULTIDB_WINDOWS\nuxeo-distribution-jboss\target\nuxeo-cap-5.7-SNAPSHOT-jboss\server\default\deploy\jbossws.sar\jbossws-management.war\META-INF\maven\org.jboss.ws.native\jbossws-native-management - files in dir: [C:\Jenkins\workspace\nuxeo-master-fullbuild-part2-distribution-multios\Slave\MULTIDB_WINDOWS\nuxeo-distribution-jboss\target\nuxeo-cap-5.7-SNAPSHOT-jboss\server\default\deploy\jbossws.sar\jbossws-management.war\META-INF\maven\org.jboss.ws.native\jbossws-native-management\pom.properties, C:\Jenkins\workspace\nuxeo-master-fullbuild-part2-distribution-multios\Slave\MULTIDB_WINDOWS\nuxeo-distribution-jboss\target\nuxeo-cap-5.7-SNAPSHOT-jboss\server\default\deploy\jbossws.sar\jbossws-management.war\META-INF\maven\org.jboss.ws.native\jbossws-native-management\pom.xml]
08:59:27 	at hudson.Util.deleteFile(Util.java:238)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:289)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.FilePath$11.invoke(FilePath.java:910)
08:59:27 	at hudson.FilePath$11.invoke(FilePath.java:908)
08:59:27 	at hudson.FilePath.act(FilePath.java:842)
08:59:27 	at hudson.FilePath.act(FilePath.java:824)
08:59:27 	at hudson.FilePath.deleteRecursive(FilePath.java:908)
08:59:27 	at hudson.plugins.git.GitAPI.clone(GitAPI.java:239)
08:59:27 	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1040)
08:59:27 	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:982)
08:59:27 	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2200)
08:59:27 	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
08:59:27 	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
08:59:27 	at hudson.remoting.Request$2.run(Request.java:326)
08:59:27 	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
08:59:27 	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
08:59:27 	at java.util.concurrent.FutureTask.run(Unknown Source)
08:59:27 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
08:59:27 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
08:59:27 	at hudson.remoting.Engine$1$1.run(Engine.java:60)
08:59:27 	at java.lang.Thread.run(Unknown Source)
08:59:27 ERROR: Error cloning remote repo 'origin' : Failed to delete workspace
08:59:27 hudson.plugins.git.GitException: Failed to delete workspace
08:59:27 	at hudson.plugins.git.GitAPI.clone(GitAPI.java:242)
08:59:27 	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1040)
08:59:27 	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:982)
08:59:27 	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2200)
08:59:27 	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
08:59:27 	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
08:59:27 	at hudson.remoting.Request$2.run(Request.java:326)
08:59:27 	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
08:59:27 	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
08:59:27 	at java.util.concurrent.FutureTask.run(Unknown Source)
08:59:27 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
08:59:27 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
08:59:27 	at hudson.remoting.Engine$1$1.run(Engine.java:60)
08:59:27 	at java.lang.Thread.run(Unknown Source)
08:59:27 Caused by: java.io.IOException: Unable to delete C:\Jenkins\workspace\nuxeo-master-fullbuild-part2-distribution-multios\Slave\MULTIDB_WINDOWS\nuxeo-distribution-jboss\target\nuxeo-cap-5.7-SNAPSHOT-jboss\server\default\deploy\jbossws.sar\jbossws-management.war\META-INF\maven\org.jboss.ws.native\jbossws-native-management - files in dir: [C:\Jenkins\workspace\nuxeo-master-fullbuild-part2-distribution-multios\Slave\MULTIDB_WINDOWS\nuxeo-distribution-jboss\target\nuxeo-cap-5.7-SNAPSHOT-jboss\server\default\deploy\jbossws.sar\jbossws-management.war\META-INF\maven\org.jboss.ws.native\jbossws-native-management\pom.properties, C:\Jenkins\workspace\nuxeo-master-fullbuild-part2-distribution-multios\Slave\MULTIDB_WINDOWS\nuxeo-distribution-jboss\target\nuxeo-cap-5.7-SNAPSHOT-jboss\server\default\deploy\jbossws.sar\jbossws-management.war\META-INF\maven\org.jboss.ws.native\jbossws-native-management\pom.xml]
08:59:27 	at hudson.Util.deleteFile(Util.java:238)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:289)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27 	at hudson.Util.deleteRecursive(Util.java:280)
08:59:27 	at hudson.FilePath$11.invoke(FilePath.java:910)
08:59:27 	at hudson.FilePath$11.invoke(FilePath.java:908)
08:59:27 	at hudson.FilePath.act(FilePath.java:842)
08:59:27 	at hudson.FilePath.act(FilePath.java:824)
08:59:27 	at hudson.FilePath.deleteRecursive(FilePath.java:908)
08:59:27 	at hudson.plugins.git.GitAPI.clone(GitAPI.java:239)
08:59:27 	... 13 more
08:59:27 Trying next repository
08:59:27 ERROR: Could not clone repository
08:59:27 FATAL: Could not clone
08:59:27 hudson.plugins.git.GitException: Could not clone
08:59:27 	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1052)
08:59:27 	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:982)
08:59:27 	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2200)
08:59:27 	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
08:59:27 	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
08:59:27 	at hudson.remoting.Request$2.run(Request.java:326)
08:59:27 	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
08:59:27 	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
08:59:27 	at java.util.concurrent.FutureTask.run(Unknown Source)
08:59:27 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
08:59:27 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
08:59:27 	at hudson.remoting.Engine$1$1.run(Engine.java:60)
08:59:27 	at java.lang.Thread.run(Unknown Source)

It is still possible to manually delete the files.

FYI, we encountered such a seemingly similar issue in a Python script using Python internal delTree implementation, and it has been resolved by using Windows Shell command: "rmdir /s /q path/to/file" instead.

Also, find attached the job's config.xml if it can help to look at the parameters.

Environment: Linux master
Windows 2008R2 x64 slave
Project: Jenkins
Labels: git matrix windows path
Priority: Major Major
Reporter: Julien Carsique
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15418) Git fails to clean windows workspace with long path

JIRA noreply@jenkins-ci.org
markewaite commented on Bug JENKINS-15418

We've seen a general problem on Windows file systems with paths which exceed about 250 characters. The problems were visible in our MSBuild scripts and affected other programs as well. We finally decided that it was not worth fighting what appeared to be Microsoft file system limitations, so we forced ourselves to use shorter paths. The sample path in your output is longer than 250 characters, so you may be encountering the same problem we encountered.

You might find Jeff Attwood's comments on the topic interesting.

http://www.codinghorror.com/blog/2006/11/filesystem-paths-how-long-is-too-long.html

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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15418) Git fails to clean windows workspace with long path

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

Hi,

Thanks for that interesting link.
You're right and we already worked on shortening our paths. We also wrote a few scripts which automatically map the current path on a new drive letter in order to reduce the risk to encounter that ridiculous Windows issue. But anything we do is only delaying the issue. And it came back with that job.

The point here is:

  • the job is a "matrix" job so the working dir path is longer (C:\Jenkins\workspace\nuxeo-master-fullbuild-part2-distribution-multios\Slave\MULTIDB_WINDOWS). Reducing too much the job name is an issue when you have 400 jobs.
  • in the currently failing path, the only part we could still reduce is not very long: nuxeo-distribution-jboss\target\nuxeo-cap-5.7-SNAPSHOT-jboss.

The deletion fails in Java File.delete() so there's no quick solution for that issue. But we could imagine some workarounds to reduce the times it's happening:

  • Jenkins could mount the working directory on a new drive letter,
  • Jenkins could propose to use a specific short path when on Windows (ie c:\ws\buildNumber or c:\ws\jobName\buildNumber),
  • when failing to delete a file on Windows, the code could try to fallback on calling a delete windows command (rmdir /s /q path/to/file),
  • ...
    I can't see a "clean" solution but anything that could help to shorten the path when working on windows would help...
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15418) Fails to clean windows workspace with long path

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Change By: Julien Carsique (22/Oct/12 9:30 AM)
Summary: Git fails Fails  to clean windows workspace with long path
Priority: Major Minor
Description: I see that issue happening on long paths. A workaround was to use drive mapping in order to reduce the length but it doesn't solve the issue and we came to the limit of path shortening possibilities.

Here's a stacktrace from a Matrix job:
https://qa.nuxeo.org/jenkins/job/nuxeo-master-fullbuild-part2-distribution-multios/218/Slave=MULTIDB_WINDOWS
{code}08:59:26 Building remotely on tweedledum in workspace C:\Jenkins\workspace\nuxeo-master-fullbuild-part2-distribution-multios\Slave\MULTIDB_WINDOWS
08:59:26 Checkout:MULTIDB_WINDOWS / C:\Jenkins\workspace\nuxeo-master-fullbuild-part2-distribution-multios\Slave\MULTIDB_WINDOWS - hudson.remoting.Channel@4a58a509:tweedledum
08:59:26 Using strategy: Default
08:59:26 Last Built Revision: Revision 3676821964588c85aa8b71e288c743c24edd00a3 (origin/master)
08:59:27 Cloning the remote Git repository
08:59:27 Cloning repository git://github.com/nuxeo/nuxeo-distribution.git
08:59:27 git --version
08:59:27 git version 1.7.6.msysgit.0
08:59:27 ERROR: Failed to clean the workspace
08:59:27 java.io.IOException: Unable to delete C:\Jenkins\workspace\nuxeo-master-fullbuild-part2-distribution-multios\Slave\MULTIDB_WINDOWS\nuxeo-distribution-jboss\target\nuxeo-cap-5.7-SNAPSHOT-jboss\server\default\deploy\jbossws.sar\jbossws-management.war\META-INF\maven\org.jboss.ws.native\jbossws-native-management - files in dir: [C:\Jenkins\workspace\nuxeo-master-fullbuild-part2-distribution-multios\Slave\MULTIDB_WINDOWS\nuxeo-distribution-jboss\target\nuxeo-cap-5.7-SNAPSHOT-jboss\server\default\deploy\jbossws.sar\jbossws-management.war\META-INF\maven\org.jboss.ws.native\jbossws-native-management\pom.properties, C:\Jenkins\workspace\nuxeo-master-fullbuild-part2-distribution-multios\Slave\MULTIDB_WINDOWS\nuxeo-distribution-jboss\target\nuxeo-cap-5.7-SNAPSHOT-jboss\server\default\deploy\jbossws.sar\jbossws-management.war\META-INF\maven\org.jboss.ws.native\jbossws-native-management\pom.xml]
08:59:27  at hudson.Util.deleteFile(Util.java:238)
08:59:27  at hudson.Util.deleteRecursive(Util.java:289)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.FilePath$11.invoke(FilePath.java:910)
08:59:27  at hudson.FilePath$11.invoke(FilePath.java:908)
08:59:27  at hudson.FilePath.act(FilePath.java:842)
08:59:27  at hudson.FilePath.act(FilePath.java:824)
08:59:27  at hudson.FilePath.deleteRecursive(FilePath.java:908)
08:59:27  at hudson.plugins.git.GitAPI.clone(GitAPI.java:239)
08:59:27  at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1040)
08:59:27  at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:982)
08:59:27  at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2200)
08:59:27  at hudson.remoting.UserRequest.perform(UserRequest.java:118)
08:59:27  at hudson.remoting.UserRequest.perform(UserRequest.java:48)
08:59:27  at hudson.remoting.Request$2.run(Request.java:326)
08:59:27  at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
08:59:27  at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
08:59:27  at java.util.concurrent.FutureTask.run(Unknown Source)
08:59:27  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
08:59:27  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
08:59:27  at hudson.remoting.Engine$1$1.run(Engine.java:60)
08:59:27  at java.lang.Thread.run(Unknown Source)
08:59:27 ERROR: Error cloning remote repo 'origin' : Failed to delete workspace
08:59:27 hudson.plugins.git.GitException: Failed to delete workspace
08:59:27  at hudson.plugins.git.GitAPI.clone(GitAPI.java:242)
08:59:27  at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1040)
08:59:27  at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:982)
08:59:27  at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2200)
08:59:27  at hudson.remoting.UserRequest.perform(UserRequest.java:118)
08:59:27  at hudson.remoting.UserRequest.perform(UserRequest.java:48)
08:59:27  at hudson.remoting.Request$2.run(Request.java:326)
08:59:27  at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
08:59:27  at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
08:59:27  at java.util.concurrent.FutureTask.run(Unknown Source)
08:59:27  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
08:59:27  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
08:59:27  at hudson.remoting.Engine$1$1.run(Engine.java:60)
08:59:27  at java.lang.Thread.run(Unknown Source)
08:59:27 Caused by: java.io.IOException: Unable to delete C:\Jenkins\workspace\nuxeo-master-fullbuild-part2-distribution-multios\Slave\MULTIDB_WINDOWS\nuxeo-distribution-jboss\target\nuxeo-cap-5.7-SNAPSHOT-jboss\server\default\deploy\jbossws.sar\jbossws-management.war\META-INF\maven\org.jboss.ws.native\jbossws-native-management - files in dir: [C:\Jenkins\workspace\nuxeo-master-fullbuild-part2-distribution-multios\Slave\MULTIDB_WINDOWS\nuxeo-distribution-jboss\target\nuxeo-cap-5.7-SNAPSHOT-jboss\server\default\deploy\jbossws.sar\jbossws-management.war\META-INF\maven\org.jboss.ws.native\jbossws-native-management\pom.properties, C:\Jenkins\workspace\nuxeo-master-fullbuild-part2-distribution-multios\Slave\MULTIDB_WINDOWS\nuxeo-distribution-jboss\target\nuxeo-cap-5.7-SNAPSHOT-jboss\server\default\deploy\jbossws.sar\jbossws-management.war\META-INF\maven\org.jboss.ws.native\jbossws-native-management\pom.xml]
08:59:27  at hudson.Util.deleteFile(Util.java:238)
08:59:27  at hudson.Util.deleteRecursive(Util.java:289)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.Util.deleteContentsRecursive(Util.java:200)
08:59:27  at hudson.Util.deleteRecursive(Util.java:280)
08:59:27  at hudson.FilePath$11.invoke(FilePath.java:910)
08:59:27  at hudson.FilePath$11.invoke(FilePath.java:908)
08:59:27  at hudson.FilePath.act(FilePath.java:842)
08:59:27  at hudson.FilePath.act(FilePath.java:824)
08:59:27  at hudson.FilePath.deleteRecursive(FilePath.java:908)
08:59:27  at hudson.plugins.git.GitAPI.clone(GitAPI.java:239)
08:59:27  ... 13 more
08:59:27 Trying next repository
08:59:27 ERROR: Could not clone repository
08:59:27 FATAL: Could not clone
08:59:27 hudson.plugins.git.GitException: Could not clone
08:59:27  at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1052)
08:59:27  at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:982)
08:59:27  at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2200)
08:59:27  at hudson.remoting.UserRequest.perform(UserRequest.java:118)
08:59:27  at hudson.remoting.UserRequest.perform(UserRequest.java:48)
08:59:27  at hudson.remoting.Request$2.run(Request.java:326)
08:59:27  at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
08:59:27  at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
08:59:27  at java.util.concurrent.FutureTask.run(Unknown Source)
08:59:27  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
08:59:27  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
08:59:27  at hudson.remoting.Engine$1$1.run(Engine.java:60)
08:59:27  at java.lang.Thread.run(Unknown Source)
{code}

It is still possible to manually delete the files. 

FYI, we encountered such a seemingly similar issue in a Python script using Python internal delTree implementation, and it has been resolved by using Windows Shell command: "rmdir /s /q path/to/file" instead.

Also, find attached the Using a matrix  job 's config  is increasing the path length . xml if it can help
We would also need
 to  look at the parameters  use a different workspace path when under Windows .
Component/s: core
Component/s: git
URL: https://qa.nuxeo.org/jenkins/job/nuxeo-master-fullbuild-part2-distribution-multios
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15418) Fails to clean windows workspace with long path

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

We're also running into the windows MAX_PATH problem.

I tried calling File.delete with the unicode prefix (\\?\C:\...) but it didn't work.

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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15418) Fails to clean windows workspace with long path

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

I have a fix for the issue, but it needs review. The two main issues are:
1) safe guard that the pivot point in the path is in the workspace so we don't delete too much
2) should the code go in deleteRecursive

What it does is move the subtree close to the MAX_PATH limit to a temp directory and try to delete from there.

Commit at: https://github.com/onemanbucket/jenkins/commit/0ab18187eb60dd89cf5759eb231c326cb31c866b

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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15418) Fails to clean windows workspace with long path

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15418) Fails to clean windows workspace with long path

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

Hi, I've done some more research now, and it turns out the jre actually supports using unicode prefixes, and all win api calls are correct. The problem is in hudsons Kernel32Utils that doesn't call GetFileAttributesW correctly (the path should be prefixed as far as I can tell). This makes deleteRecursive() mistakenly think that the first directory after MAX_PATH is a file, and since delete only works on empty directories the subsequent delete call fails.

I'll post a test case and a patch in a bit.

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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15418) Fails to clean windows workspace with long path

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15418) Fails to clean windows workspace with long path

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Jesse Glick commented on Bug JENKINS-15418
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15418) Fails to clean windows workspace with long path

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

Code changed in jenkins
User: Erik Lindblad
Path:
core/src/main/java/hudson/util/jna/Kernel32Utils.java
core/src/test/java/hudson/FilePathTest.java
http://jenkins-ci.org/commit/jenkins/f66e19c072a24afb6f083db9fc0124f58b9742e6
Log:
JENKINS-15418 take shares int account, ignore short paths

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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15418) Fails to clean windows workspace with long path

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Change By: SCM/JIRA link daemon (25/Oct/12 4:25 PM)
Status: Open Resolved
Resolution: Fixed
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15418) Fails to clean windows workspace with long path

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

Code changed in jenkins
User: Jesse Glick
Path:
core/src/main/java/hudson/util/jna/Kernel32Utils.java
core/src/test/java/hudson/FilePathTest.java
http://jenkins-ci.org/commit/jenkins/d7ef52e1bf68c3e7ca0a82596be89650625c1099
Log:
Merge pull request #595 from onemanbucket/jenkins-15418

[FIXED JENKINS-15418] Allow long paths on windows.

Compare: https://github.com/jenkinsci/jenkins/compare/edbe2aedca03...d7ef52e1bf68

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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15418) Fails to clean windows workspace with long path

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15418) Fails to clean windows workspace with long path

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
dogfood commented on Bug JENKINS-15418

Integrated in jenkins_main_trunk #2032
JENKINS-15418 take shares int account, ignore short paths (Revision f66e19c072a24afb6f083db9fc0124f58b9742e6)
JENKINS-15418 Noting. (Revision 85019c46d79dd201de8898f4c82e70f761aa2aa5)

Result = UNSTABLE
erik.lindblad : f66e19c072a24afb6f083db9fc0124f58b9742e6
Files :

  • core/src/test/java/hudson/FilePathTest.java
  • core/src/main/java/hudson/util/jna/Kernel32Utils.java

Jesse Glick : 85019c46d79dd201de8898f4c82e70f761aa2aa5
Files :

  • changelog.html
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
Loading...