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

Path length exception on long paths (less 260)

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Critical Critical
    • tfs-plugin
    • Jenkins ver. 1.609.2
      Server: Windows 2008 R2 x64
      Client: Windows 7 SP1 x64
      VisualStudio: 2013 Update 4.
      TFS Plugin: 4.0

      After upgrade TFS Plugin from 3.2 to 4.0 I've got an exception on 'TF.exe" get . -recursive ...' command.
      This is pure regress because the project has successfully gotten with TFS-plugin version 3.2.
      Bug can be reproduced on path lenght near and less than 260 (220 < path < 260).

      12:39:18 FATAL: hudson.remoting.ProxyException: com.microsoft.tfs.core.clients.versioncontrol.exceptions.VersionControlException: com.microsoft.tfs.core.exceptions.TECoreException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
      12:39:18 java.lang.RuntimeException: hudson.remoting.ProxyException: com.microsoft.tfs.core.clients.versioncontrol.exceptions.VersionControlException: com.microsoft.tfs.core.exceptions.TECoreException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
      12:39:18 	at hudson.plugins.tfs.model.Server.execute(Server.java:110)
      12:39:18 	at hudson.plugins.tfs.model.Project.getFiles(Project.java:177)
      12:39:18 	at hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:54)
      12:39:18 	at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:221)
      12:39:18 	at hudson.model.AbstractProject.checkout(AbstractProject.java:1274)
      12:39:18 	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609)
      12:39:18 	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      12:39:18 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531)
      12:39:18 	at hudson.model.Run.execute(Run.java:1738)
      12:39:18 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      12:39:18 	at hudson.model.ResourceController.execute(ResourceController.java:98)
      12:39:18 	at hudson.model.Executor.run(Executor.java:381)
      12:39:18 Caused by: hudson.remoting.ProxyException: com.microsoft.tfs.core.clients.versioncontrol.exceptions.VersionControlException: com.microsoft.tfs.core.exceptions.TECoreException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
      12:39:18 	at com.microsoft.tfs.core.clients.versioncontrol.engines.internal.GetEngine.throwIfFatalError(GetEngine.java:3308)
      12:39:18 	at com.microsoft.tfs.core.clients.versioncontrol.engines.internal.GetEngine.processOperationsInternal(GetEngine.java:1257)
      12:39:18 	at com.microsoft.tfs.core.clients.versioncontrol.engines.internal.GetEngine.processOperations(GetEngine.java:1056)
      12:39:18 	at com.microsoft.tfs.core.clients.versioncontrol.engines.internal.GetEngine.processGetOperations(GetEngine.java:881)
      12:39:18 	at com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Workspace.get(Workspace.java:2652)
      12:39:18 	at com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Workspace.get(Workspace.java:2527)
      12:39:18 	at com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Workspace.get(Workspace.java:2515)
      12:39:18 	at com.microsoft.tfs.core.clients.versioncontrol.soapextensions.Workspace.get(Workspace.java:2491)
      12:39:18 	at hudson.plugins.tfs.commands.GetFilesToWorkFolderCommand.call(GetFilesToWorkFolderCommand.java:60)
      12:39:18 	at hudson.plugins.tfs.commands.GetFilesToWorkFolderCommand.call(GetFilesToWorkFolderCommand.java:17)
      12:39:18 	at hudson.remoting.UserRequest.perform(UserRequest.java:121)
      12:39:18 	at hudson.remoting.UserRequest.perform(UserRequest.java:49)
      12:39:18 	at hudson.remoting.Request$2.run(Request.java:324)
      12:39:18 	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      12:39:18 	at java.util.concurrent.FutureTask.run(Unknown Source)
      12:39:18 	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      12:39:18 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      12:39:18 	at hudson.remoting.Engine$1$1.run(Engine.java:63)
      12:39:18 	at java.lang.Thread.run(Unknown Source)
      12:39:18 	at ......remote call to rusbuilder-ims(Native Method)
      12:39:18 	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1360)
      12:39:18 	at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
      12:39:18 	at hudson.remoting.Channel.call(Channel.java:753)
      12:39:18 	at hudson.plugins.tfs.model.Server.execute(Server.java:106)
      12:39:18 	... 11 more
      12:39:18 Caused by: hudson.remoting.ProxyException: com.microsoft.tfs.core.exceptions.TECoreException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
      12:39:18 	at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:105)
      12:39:18 	at com.microsoft.tfs.core.exceptions.mappers.VersionControlExceptionMapper.map(VersionControlExceptionMapper.java:50)
      12:39:18 	at com.microsoft.tfs.core.clients.versioncontrol.internal.WebServiceLayer.updateLocalVersion(WebServiceLayer.java:3650)
      12:39:18 	at com.microsoft.tfs.core.clients.versioncontrol.internal.WebServiceLayer.updateLocalVersion(WebServiceLayer.java:3691)
      12:39:18 	at com.microsoft.tfs.core.clients.versioncontrol.UpdateLocalVersionQueue.sendToServer(UpdateLocalVersionQueue.java:875)
      12:39:18 	at com.microsoft.tfs.core.clients.versioncontrol.UpdateLocalVersionQueue.flush(UpdateLocalVersionQueue.java:498)
      12:39:18 	at com.microsoft.tfs.core.clients.versioncontrol.UpdateLocalVersionQueue.queueUpdate(UpdateLocalVersionQueue.java:408)
      12:39:18 	at com.microsoft.tfs.core.clients.versioncontrol.engines.internal.AsyncGetOperation.queueLocalVersionUpdate(AsyncGetOperation.java:312)
      12:39:18 	at com.microsoft.tfs.core.clients.versioncontrol.engines.internal.workers.GetDownloadWorker.completeGetOperation(GetDownloadWorker.java:697)
      12:39:18 	at com.microsoft.tfs.core.clients.versioncontrol.engines.internal.workers.GetDownloadWorker.call(GetDownloadWorker.java:168)
      12:39:18 	at com.microsoft.tfs.core.clients.versioncontrol.engines.internal.workers.GetDownloadWorker.call(GetDownloadWorker.java:74)
      12:39:18 	at java.util.concurrent.FutureTask.run(Unknown Source)
      12:39:18 	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      12:39:18 	at java.util.concurrent.FutureTask.run(Unknown Source)
      12:39:18 	at com.microsoft.tfs.core.clients.versioncontrol.internal.concurrent.BoundedExecutor$1.run(BoundedExecutor.java:96)
      12:39:18 	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      12:39:18 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      12:39:18 	at java.lang.Thread.run(Unknown Source)
      12:39:18 Caused by: hudson.remoting.ProxyException: com.microsoft.tfs.core.ws.runtime.exceptions.SOAPFault: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
      12:39:18 	at com.microsoft.tfs.core.ws.runtime.client.SOAP12Service.examineResponseDOMForFault(SOAP12Service.java:132)
      12:39:18 	at com.microsoft.tfs.core.ws.runtime.client.SOAPService.examineBodyForFault(SOAPService.java:1103)
      12:39:18 	at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:732)
      12:39:18 	at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:475)
      12:39:18 	at ms.tfs.versioncontrol.clientservices._03._Repository5Soap12Service.updateLocalVersion(_Repository5Soap12Service.java:1169)
      12:39:18 	at com.microsoft.tfs.core.clients.versioncontrol.internal.WebServiceLayer.updateLocalVersion(WebServiceLayer.java:3634)
      12:39:18 	... 15 more
      

          [JENKINS-30241] Path length exception on long paths (less 260)

          Fawzy Manaa added a comment -

          How long is your Jenkins workspace base (e.g. /work/Jenkins/workspace/ or C:\workspace)? Did that change just before/ after or during the plugin upgrade?

          When you say (220 < path < 260), is that the Jenkins $workspace path length or is it the TFS server path length?

          Fawzy Manaa added a comment - How long is your Jenkins workspace base (e.g. /work/Jenkins/workspace/ or C:\workspace)? Did that change just before/ after or during the plugin upgrade? When you say (220 < path < 260), is that the Jenkins $workspace path length or is it the TFS server path length?

          Alexey Larsky added a comment -

          For example lenght 252:

          D:\jenkins-slave\workspace\zzz zzz\src\Modules\ResourceLibrary\Desktop\zzzzzzzzzzzzzzz.zzzzzzzzzzzzzzz.zzzzzzzzzzzzzzz\Service References\ResourceLibraryProxy\aaaaaaaaaaaaaaa.aaaaaaaaaaaaaaa.WcfRepositories.ResourceLibraryProxy.ResourceInfo.datasource
          

          Alexey Larsky added a comment - For example lenght 252: D:\jenkins-slave\workspace\zzz zzz\src\Modules\ResourceLibrary\Desktop\zzzzzzzzzzzzzzz.zzzzzzzzzzzzzzz.zzzzzzzzzzzzzzz\Service References\ResourceLibraryProxy\aaaaaaaaaaaaaaa.aaaaaaaaaaaaaaa.WcfRepositories.ResourceLibraryProxy.ResourceInfo.datasource

          Manfred Moser added a comment -

          It might have NOT actually been successful with earlier versions. There was a bug that I fixed with https://github.com/jenkinsci/tfs-plugin/pull/34.

          With 3.2.0 and earlier TFS would checkout longer file system paths and if a longer path than the limit was found just flag the checkout as partial success and proceed. That means that it actually did NOT get all the files and continued the build anyway.

          At least with 4.0.0 it is now explicit and fails the build as expected rather than shadowing a problem.

          Manfred Moser added a comment - It might have NOT actually been successful with earlier versions. There was a bug that I fixed with https://github.com/jenkinsci/tfs-plugin/pull/34 . With 3.2.0 and earlier TFS would checkout longer file system paths and if a longer path than the limit was found just flag the checkout as partial success and proceed. That means that it actually did NOT get all the files and continued the build anyway. At least with 4.0.0 it is now explicit and fails the build as expected rather than shadowing a problem.

          Alexey Larsky added a comment - - edited

          I've checked v 4.0 again. You are right - there is not a bug. The problem is some of my TFS repo file path lengths were more than 260.
          Sorry for mistake.

          Alexey Larsky added a comment - - edited I've checked v 4.0 again. You are right - there is not a bug. The problem is some of my TFS repo file path lengths were more than 260. Sorry for mistake.

            Unassigned Unassigned
            alexey_larsky Alexey Larsky
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: