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

Uncached checks of Stapler.openResourcePathByLocale for non-resources

      A thread dump showed many HTTP threads doing something like this:

      "Handling POST /job/.../ajaxExecutors : ...
         java.lang.Thread.State: RUNNABLE
      	at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
      	at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:242)
      	at java.io.File.exists(File.java:772)
      	at org.apache.naming.resources.FileDirContext.file(FileDirContext.java:785)
      	at org.apache.naming.resources.FileDirContext.lookup(FileDirContext.java:206)
      	at org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:299)
      	at org.apache.catalina.core.ApplicationContext.getResource(ApplicationContext.java:495)
      	at org.apache.catalina.core.ApplicationContextFacade.getResource(ApplicationContextFacade.java:176)
      	at org.kohsuke.stapler.Stapler.openResourcePathByLocale(Stapler.java:207)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:147)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      

      If the container's implementation of ServletContext.getResource is slow to return a negative result, as it seems Tomcat's is, we waste a considerable amount of time (and disk I/O) looking for files which clearly do not exist before serving a request from the Stapler model. Probably if this method once returns null it is safe to assume it will continue to do so for the rest of the session.

          [JENKINS-16606] Uncached checks of Stapler.openResourcePathByLocale for non-resources

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/pom.xml
          http://jenkins-ci.org/commit/jenkins/f373cd5c5ea9e6e9c619d9913b1a9bc66001a1b8
          Log:
          [FIXED JENKINS-16606]

          Integrated the new version of Stapler that includes the fix.


          You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com.
          For more options, visit https://groups.google.com/groups/opt_out.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/pom.xml http://jenkins-ci.org/commit/jenkins/f373cd5c5ea9e6e9c619d9913b1a9bc66001a1b8 Log: [FIXED JENKINS-16606] Integrated the new version of Stapler that includes the fix. – You received this message because you are subscribed to the Google Groups "Jenkins Commits" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out .

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2351
          [FIXED JENKINS-16606] (Revision f373cd5c5ea9e6e9c619d9913b1a9bc66001a1b8)

          Result = SUCCESS
          kohsuke : f373cd5c5ea9e6e9c619d9913b1a9bc66001a1b8
          Files :

          • core/pom.xml
          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #2351 [FIXED JENKINS-16606] (Revision f373cd5c5ea9e6e9c619d9913b1a9bc66001a1b8) Result = SUCCESS kohsuke : f373cd5c5ea9e6e9c619d9913b1a9bc66001a1b8 Files : core/pom.xml changelog.html

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: