memory consumption of builds
Hello, i noticed a memory problem with my valgrind plugin for jenkins. The result of the valgrind plugin (basically a list of errors with stacktraces) is stored with the build (build.xml). After a fresh restart of jenkins, those builds gets deserialized and kept in memory as soon as the first user opens jenkins in his browser. Some users of my plugin have huge projects with a lot of errors (up to 1 per build). After a few dozen builds, all those errors and stacktraces are eating up a lot of memory, despite most of them are never needed. Why does jenkins always deserialize all builds for all jobs? My initial (naive?) expectation was that jenkins would only deserialize a build when a user opens it in the browser. Or am i doing something fundamentally wrong with the way the plugin stores its data? Regards, Johannes
Re: kind and stapler-class attributes in JSON form data (since 1.463)
Hi Chris, Thanks for your answer, that helped a lot :) Regards, Johannes Am Montag, 14. Mai 2012 14:24:51 UTC+2 schrieb cjo: Kind and stapler-class are used by the stapler to bind the configuration section to the correct class (in this case your plugin), this also enabled the stapler to use the Databound constructors of there objects rather than the newInstance method of the descriptor. From your code it looks like you don't have a data bound constructor for ValgrindPublisher object. Adding a Databound constructor, and removing the newInstance method from the descriptor may fix the issue. However you may also need change the config.jelly files so that ValgrindPublisherConfig has its own file. Example constructor to add: @DataBoundConstructor public ValgrindPublisher (ValgrindPublisherConfig valgrindPublisherConfig){ this.valgrindPublisherConfig = valgrindpublisherconfig; } This change also makes the plugin work correctly with other plugins such as the flexible publish and build condition where it is used as a sub interface, these rely on having a correct DataBoundConstructor. Chris On Saturday, 12 May 2012 12:36:08 UTC+1, Johannes Ohlemacher wrote: Hi everyone, since version 1.463 i can't configure the Publisher of my plugin anymore. The JSONObject form data contains two strange attributes: kind and stapler-class. Because of those two attributes the StaplerRequest object can't bind the form data to the data bound constructor of my configuration class (or at least thats what i understand, i am still pretty new to jenkins development...). The JSONObject looks like this: {failThresholdDefinitelyLost:, failThresholdInvalidReadWrite:, failThresholdTotal:, kind:org.jenkinsci.plugins.valgrind.ValgrindPublisher, pattern:*.memcheck, stapler-class:org.jenkinsci.plugins.valgrind.ValgrindPublisher, unstableThresholdDefinitelyLost:, unstableThresholdInvalidReadWrite:, unstableThresholdTotal:} If i remove the two attributes from the JSONObject before binding it, everything works fine... publisher with descriptor (see lines 258 to 266): https://github.com/jenkinsci/valgrind-plugin/blob/master/src/main/java/org/jenkinsci/plugins/valgrind/ValgrindPublisher.java configuration class: https://github.com/jenkinsci/valgrind-plugin/blob/master/src/main/java/org/jenkinsci/plugins/valgrind/config/ValgrindPublisherConfig.java jelly file: https://github.com/jenkinsci/valgrind-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/valgrind/ValgrindPublisher/config.jelly Where do the kind and stapler-class attributes come from? They don't appear with older versions of jenkins (i tested 1.455, 1.460 and 1.462). Greetings, Johannes
kind and stapler-class attributes in JSON form data (since 1.463)
Hi everyone, since version 1.463 i can't configure the Publisher of my plugin anymore. The JSONObject form data contains two strange attributes: kind and stapler-class. Because of those two attributes the StaplerRequest object can't bind the form data to the data bound constructor of my configuration class (or at least thats what i understand, i am still pretty new to jenkins development...). The JSONObject looks like this: {failThresholdDefinitelyLost:, failThresholdInvalidReadWrite:, failThresholdTotal:, kind:org.jenkinsci.plugins.valgrind.ValgrindPublisher, pattern:*.memcheck, stapler-class:org.jenkinsci.plugins.valgrind.ValgrindPublisher, unstableThresholdDefinitelyLost:, unstableThresholdInvalidReadWrite:, unstableThresholdTotal:} If i remove the two attributes from the JSONObject before binding it, everything works fine... publisher with descriptor (see lines 258 to 266): https://github.com/jenkinsci/valgrind-plugin/blob/master/src/main/java/org/jenkinsci/plugins/valgrind/ValgrindPublisher.java configuration class: https://github.com/jenkinsci/valgrind-plugin/blob/master/src/main/java/org/jenkinsci/plugins/valgrind/config/ValgrindPublisherConfig.java jelly file: https://github.com/jenkinsci/valgrind-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/valgrind/ValgrindPublisher/config.jelly Where do the kind and stapler-class attributes come from? They don't appear with older versions of jenkins (i tested 1.455, 1.460 and 1.462). Greetings, Johannes
Re: Plugin hosting request, valgrind-plugin
Hi Asmund, nice to hear there is some interest in a valgrind plugin. It just happened to require 1.455 because thats the version i am working and testing with, but as Ulli said its a really good idea to downgrade that to a LTS version of jenkins. I will do that, run some tests and make a new release (with some other small changes) over the course of the day. Johannes Am Mittwoch, 9. Mai 2012 09:44:02 UTC+2 schrieb asmundo: I have been hoping this should be created! On [1] it states that it needs Jenkins core 1.455 is this actually needed? I ask because my production environment is 1.445? I may consider upgrading Jenkins just because of this plugin, but I would prefer not to. Regards Asmund [1] https://wiki.jenkins-ci.org/display/JENKINS/Valgrind+Plugin On Fri, May 4, 2012 at 4:14 PM, Johannes Ohlemacher johannes.ohlemac...@googlemail.com wrote: hi, i wrote a jenkins plugin to run valgrind on executables and collect information about memory leaks and errors. Its in use for some of my other projects since a couple of weeks and i would like to share it with the jenkins community. github ID: eXistence github rep: git://github.com/eXistence/valgrind-plugin.git greetings, Johannes
Plugin hosting request, valgrind-plugin
hi, i wrote a jenkins plugin to run valgrind on executables and collect information about memory leaks and errors. Its in use for some of my other projects since a couple of weeks and i would like to share it with the jenkins community. github ID: eXistence github rep: git://github.com/eXistence/valgrind-plugin.git greetings, Johannes