-
Bug
-
Resolution: Unresolved
-
Critical
-
Chrome (Ubuntu, Debian), Firefox.
In ./war/src/main/webapp/scripts/hudson-behavior.js there is a memory leak triggered by replacing the HTML for the executors panel with fresh content. On installations with a huge list of executors, Chrome can increase in memory usage with over 200MBs every 10minutes by just having the Jenkins dashboard open.
// refresh a part of the HTML specified by the given ID, // by using the contents fetched from the given URL. function refreshPart(id,url) { var f = function() { if(isPageVisible()) { new Ajax.Request(url, { onSuccess: function(rsp) { var hist = $(id); if (hist == null) { console.log("There's no element that has ID of " + id); return; } var p = hist.up(); var div = document.createElement('div'); div.innerHTML = rsp.responseText; var node = $(div).firstDescendant(); p.replaceChild(node, hist); ########## hist cannot be garbage collected after the replaceChild! ########## If I comment out applySubtree(node) the memory leak disappears ########## So perhaps some event listeners stopping the GC from cleaning up? Behaviour.applySubtree(node); layoutUpdateCallback.call(); if(isRunAsTest) return; refreshPart(id,url); } }); } else { // Reschedule if(isRunAsTest) return; refreshPart(id,url); } }; // if run as test, just do it once and do it now to make sure it's working, // but don't repeat. if(isRunAsTest) f(); else window.setTimeout(f, 5000); }
- is related to
-
JENKINS-41558 Memory leak in Jenkins stage view
- Open