Never seems to release bound objects, even after they have been rendered.

          [JENKINS-16341] Memory leak in createJavaScriptProxy

          Jesse Glick created issue -

          Jesse Glick added a comment -

          In Jenkins Enterprise, merely opening the config page for a newly created freestyle job results in >100 RenderOnDemandClosure instances being bound, none of which are ever released.

          Jesse Glick added a comment - In Jenkins Enterprise, merely opening the config page for a newly created freestyle job results in >100 RenderOnDemandClosure instances being bound, none of which are ever released.
          Jesse Glick made changes -
          Labels Original: stapler New: performance stapler

          Jesse Glick added a comment - - edited

          Heap delta in OSS trunk, after ~18 requests from

          curl -I http://localhost:8080/job/x/configure >&-
          

          Jesse Glick added a comment - - edited Heap delta in OSS trunk, after ~18 requests from curl -I http://localhost:8080/job/x/configure >&-
          Jesse Glick made changes -
          Attachment New: JENKINS-16341.png [ 23054 ]

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/src/main/java/hudson/widgets/RenderOnDemandClosure.java
          http://jenkins-ci.org/commit/jenkins/08efdf5d3ab962cfd4c4c489266592fe1db7df8e
          Log:
          JENKINS-16341 Amelioration of memory leak by at least interning some heavily redundant strings.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/widgets/RenderOnDemandClosure.java http://jenkins-ci.org/commit/jenkins/08efdf5d3ab962cfd4c4c489266592fe1db7df8e Log: JENKINS-16341 Amelioration of memory leak by at least interning some heavily redundant strings.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2190
          JENKINS-16341 Amelioration of memory leak by at least interning some heavily redundant strings. (Revision 08efdf5d3ab962cfd4c4c489266592fe1db7df8e)

          Result = SUCCESS
          Jesse Glick : 08efdf5d3ab962cfd4c4c489266592fe1db7df8e
          Files :

          • changelog.html
          • core/src/main/java/hudson/widgets/RenderOnDemandClosure.java

          dogfood added a comment - Integrated in jenkins_main_trunk #2190 JENKINS-16341 Amelioration of memory leak by at least interning some heavily redundant strings. (Revision 08efdf5d3ab962cfd4c4c489266592fe1db7df8e) Result = SUCCESS Jesse Glick : 08efdf5d3ab962cfd4c4c489266592fe1db7df8e Files : changelog.html core/src/main/java/hudson/widgets/RenderOnDemandClosure.java

          Jesse Glick added a comment -

          JENKINS-9142 describes how to enable logging in bound objects.

          Jesse Glick added a comment - JENKINS-9142 describes how to enable logging in bound objects.

          Jesse Glick added a comment -

          The hard part is that there is no way to know when the page is being rendered when the bound object can be released: it may be used zero, one, or several times while the page is opened, at any time the user likes.

          Possible resolution: release the binding if no “ping” has been received from the rendered page for at least a minute; send a ping every fifteen seconds. Means creating some kind of Stapler adjunct and helper script and REST endpoint that lets the page send a short request to Jenkins periodically; Jenkins would keep a list of ping IDs and for each of these a list of bound objects.

          Jesse Glick added a comment - The hard part is that there is no way to know when the page is being rendered when the bound object can be released: it may be used zero, one, or several times while the page is opened, at any time the user likes. Possible resolution: release the binding if no “ping” has been received from the rendered page for at least a minute; send a ping every fifteen seconds. Means creating some kind of Stapler adjunct and helper script and REST endpoint that lets the page send a short request to Jenkins periodically; Jenkins would keep a list of ping IDs and for each of these a list of bound objects.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          test/src/main/java/org/jvnet/hudson/test/MemoryAssert.java
          test/src/test/java/lib/layout/RenderOnDemandTest.java
          http://jenkins-ci.org/commit/jenkins/f178f0cef4bf86c5fb4cf4a2c40afce4c2b43410
          Log:
          JENKINS-16341 INSANE testing shows that a RenderOnDemandClosure binding adds about 380k, with or wothout 08efdf5.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: test/src/main/java/org/jvnet/hudson/test/MemoryAssert.java test/src/test/java/lib/layout/RenderOnDemandTest.java http://jenkins-ci.org/commit/jenkins/f178f0cef4bf86c5fb4cf4a2c40afce4c2b43410 Log: JENKINS-16341 INSANE testing shows that a RenderOnDemandClosure binding adds about 380k, with or wothout 08efdf5.

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

              Created:
              Updated: