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

DirectoryBrowserSupport.buildChildPaths does quadratic number of calls to check whether entries are directories

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      From a thread dump when the workspace browser was timing out trying to show me a directory:

      "Handling GET /job/.../ws/test/target/surefire-reports/ : ... / waiting for hudson.remoting.Channel@..." Id=... Group=main TIMED_WAITING on hudson.remoting.UserRequest@...
      	at java.lang.Object.wait(Native Method)
      	-  waiting on hudson.remoting.UserRequest@280e3332
      	at hudson.remoting.Request.call(Request.java:146)
      	at hudson.remoting.Channel.call(Channel.java:714)
      	at hudson.FilePath.act(FilePath.java:905)
      	at hudson.FilePath.act(FilePath.java:889)
      	at hudson.FilePath.isDirectory(FilePath.java:1389)
      	at jenkins.util.VirtualFile$2.isDirectory(VirtualFile.java:266)
      	at hudson.model.DirectoryBrowserSupport$FileComparator.dirRank(DirectoryBrowserSupport.java:443)
      	at hudson.model.DirectoryBrowserSupport$FileComparator.compare(DirectoryBrowserSupport.java:435)
      	at hudson.model.DirectoryBrowserSupport$FileComparator.compare(DirectoryBrowserSupport.java:426)
      	at java.util.TimSort.mergeHi(Unknown Source)
      	at java.util.TimSort.mergeAt(Unknown Source)
      	at java.util.TimSort.mergeCollapse(Unknown Source)
      	at java.util.TimSort.sort(Unknown Source)
      	at java.util.TimSort.sort(Unknown Source)
      	at java.util.Arrays.sort(Unknown Source)
      	at hudson.model.DirectoryBrowserSupport.buildChildPaths(DirectoryBrowserSupport.java:460)
      	at hudson.model.DirectoryBrowserSupport.serveFile(DirectoryBrowserSupport.java:254)
      	at hudson.model.DirectoryBrowserSupport.generateResponse(DirectoryBrowserSupport.java:123)
      

        Attachments

          Issue Links

            Activity

            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3200
            [FIXED JENKINS-21780] Revised fix to make cache work properly without introducing a new remote call to find hash codes. (Revision e51fdbbc0e74f14aceef9f4e9729fc33e300bbc3)
            JENKINS-21780 Much more effective fix. (Revision 6fe5d6c6bab63998b11a3b987c57f59a928c965e)

            Result = UNSTABLE
            Jesse Glick : e51fdbbc0e74f14aceef9f4e9729fc33e300bbc3
            Files :

            • changelog.html
            • core/src/main/java/hudson/model/DirectoryBrowserSupport.java

            Jesse Glick : 6fe5d6c6bab63998b11a3b987c57f59a928c965e
            Files :

            • core/src/main/java/jenkins/util/VirtualFile.java
            • core/src/main/java/hudson/model/DirectoryBrowserSupport.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3200 [FIXED JENKINS-21780] Revised fix to make cache work properly without introducing a new remote call to find hash codes. (Revision e51fdbbc0e74f14aceef9f4e9729fc33e300bbc3) JENKINS-21780 Much more effective fix. (Revision 6fe5d6c6bab63998b11a3b987c57f59a928c965e) Result = UNSTABLE Jesse Glick : e51fdbbc0e74f14aceef9f4e9729fc33e300bbc3 Files : changelog.html core/src/main/java/hudson/model/DirectoryBrowserSupport.java Jesse Glick : 6fe5d6c6bab63998b11a3b987c57f59a928c965e Files : core/src/main/java/jenkins/util/VirtualFile.java core/src/main/java/hudson/model/DirectoryBrowserSupport.java
            Hide
            alex_ouzounis Alex Ouzounis added a comment -

            Is this fix present in the latest version ?

            We are also getting hit by it.

            Show
            alex_ouzounis Alex Ouzounis added a comment - Is this fix present in the latest version ? We are also getting hit by it.
            Hide
            danielbeck Daniel Beck added a comment -

            Alex Ouzounis: Try http://jenkins-ci.org/changelog ("upcoming changes" might be interesting)

            Show
            danielbeck Daniel Beck added a comment - Alex Ouzounis: Try http://jenkins-ci.org/changelog ("upcoming changes" might be interesting)
            Hide
            alex_ouzounis Alex Ouzounis added a comment -

            Aha!

            Yes, indeed. Its part of 1.554

            Thanks for the quick reply

            Alex

            Show
            alex_ouzounis Alex Ouzounis added a comment - Aha! Yes, indeed. Its part of 1.554 Thanks for the quick reply Alex
            Hide
            danielbeck Daniel Beck added a comment -

            May have caused JENKINS-22514

            Show
            danielbeck Daniel Beck added a comment - May have caused JENKINS-22514

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                jglick Jesse Glick
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: