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

Multibranch directory path length restriction not working properly

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins 2.249.3
      WMI 1.7
      workflow-mutlibranch-plugin 2.21
      bitbucket branch source 2.9.4

      Two days ago we updated Jenkins from 2.202.4 to 2.249.3.

      Alongside, we updated the WMI plugin to 1.7 as well as the Bitbucket branch source plugin to 2.9.4.

      Now the setting jenkins.branch.WorkspaceLocatorImpl.PATH_MAX sometimes is no longer picked up by some of the nodes - while other still respect the setting.

      I dumped both 'System information' into my compare tool. No changes could be found besides the obvious ones, e.g. hostname.

      Tried to reconnect both nodes. However this did not change anything.

      Remark:
      After updating Jenkins + WMI we had to manually delete the jenkins.exe.config file on all WMI agents to be able to connect them. Maybe this is related?

          [JENKINS-64367] Multibranch directory path length restriction not working properly

          I think I found something after checking the Jenkins logs:

          could not manage workspaces on hudson.slaves.DumbSlave[xxx]
          java.io.IOException: malformed d:\slave\workspace\workspaces.txt
          	at jenkins.branch.WorkspaceLocatorImpl.load(WorkspaceLocatorImpl.java:228)
          	at jenkins.branch.WorkspaceLocatorImpl.locate(WorkspaceLocatorImpl.java:159)
          	at jenkins.branch.WorkspaceLocatorImpl.locate(WorkspaceLocatorImpl.java:129)
          	at jenkins.branch.WorkspaceLocatorImpl.locate(WorkspaceLocatorImpl.java:125)
          	at hudson.model.Slave.getWorkspaceFor(Slave.java:343)
          	at org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask$PlaceholderExecutable.run(ExecutorStepExecution.java:827)
          	at hudson.model.ResourceController.execute(ResourceController.java:97)
          	at hudson.model.Executor.run(Executor.java:428)
          

          Unfortunately I cannot tell whether the workspaces.txt was already malformed before. Neither can I tell why Jenkins does the fallback to using long paths.

          Joerg Schwaerzler added a comment - I think I found something after checking the Jenkins logs: could not manage workspaces on hudson.slaves.DumbSlave[xxx] java.io.IOException: malformed d:\slave\workspace\workspaces.txt at jenkins.branch.WorkspaceLocatorImpl.load(WorkspaceLocatorImpl.java:228) at jenkins.branch.WorkspaceLocatorImpl.locate(WorkspaceLocatorImpl.java:159) at jenkins.branch.WorkspaceLocatorImpl.locate(WorkspaceLocatorImpl.java:129) at jenkins.branch.WorkspaceLocatorImpl.locate(WorkspaceLocatorImpl.java:125) at hudson.model.Slave.getWorkspaceFor(Slave.java:343) at org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask$PlaceholderExecutable.run(ExecutorStepExecution.java:827) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:428) Unfortunately I cannot tell whether the workspaces.txt was already malformed before. Neither can I tell why Jenkins does the fallback to using long paths.

          The workspaces.txt on that failing node is empty, meaning it only contains CRLF
          Is that not valid?

          Joerg Schwaerzler added a comment - The workspaces.txt on that failing node is empty, meaning it only contains CRLF Is that not valid?

          Renaming the workspace.txt fixed the issue. However I was thinking whether it could be possible that Jenkins automatically re-creates the workspace.txt if it finds it to be malformed?

          Joerg Schwaerzler added a comment - Renaming the workspace.txt fixed the issue. However I was thinking whether it could be possible that Jenkins automatically re-creates the workspace.txt if it finds it to be malformed?

            Unassigned Unassigned
            macdrega Joerg Schwaerzler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: