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

Windows slaves take hours to come online

XMLWordPrintable

      On a Jenkins instance with around 40 slaves, we see Jenkins taking hours to fully attach all slaves. Operations such as transferring files are extraordinarily slow.

      Looking at the thread dump, we see more than 36 threads waiting for a single lock on a jcifs.smb.Dfs when calling the synchronized method Dfs.resolveDfs. This lock is held by a thread looking up the IP address of the Primary Domain Controller:

      Computer.threadPoolForRemoting [#34] id=190 (0xbe) state=RUNNABLE cpu=69% (running in native)
          at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
          at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
          at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
          at java.net.InetAddress.getAllByName0(InetAddress.java:1246)
          at java.net.InetAddress.getAllByName(InetAddress.java:1162)
          at java.net.InetAddress.getAllByName(InetAddress.java:1098)
          at jcifs.UniAddress.getAllByName(UniAddress.java:299)
          at jcifs.UniAddress.getByName(UniAddress.java:245)
          at jcifs.smb.Dfs.getTrustedDomains(Dfs.java:62)
          at jcifs.smb.Dfs.resolve(Dfs.java:167)
          at jcifs.smb.SmbFile.resolveDfs(SmbFile.java:671)
          at jcifs.smb.SmbFile.send(SmbFile.java:773)
          at jcifs.smb.SmbFileOutputStream.writeDirect(SmbFileOutputStream.java:245)
          at jcifs.smb.SmbFileOutputStream.write(SmbFileOutputStream.java:216)
          at hudson.Util.copyStream(Util.java:448)
          at hudson.Util.copyStreamAndClose(Util.java:460)
          at hudson.os.windows.ManagedWindowsServiceLauncher.copySlaveJar(ManagedWindowsServiceLauncher.java:465)
          at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:342)
      

      For some reason, this is not being cached across all slave threads or is otherwise lost and needs to be retrieved for each operation.

            kohsuke Kohsuke Kawaguchi
            recampbell Ryan Campbell
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: