[JIRA] (JENKINS-41558) Memory leak in Jenkins stage view

18 views
Skip to first unread message

robin.bjorklin@gmail.com (JIRA)

unread,
Jan 30, 2017, 7:31:01 AM1/30/17
to jenkinsc...@googlegroups.com
Robin Björklin created an issue
 
Jenkins / Bug JENKINS-41558
Memory leak in Jenkins stage view
Issue Type: Bug Bug
Assignee: Sam Van Oort
Components: pipeline-stage-view-plugin
Created: 2017/Jan/30 12:30 PM
Environment: Firefox (other browsers untested)
Labels: memory-leak
Priority: Major Major
Reporter: Robin Björklin

Leaving a tab open with the stage view plugin active leaks memory with about 200MB every 10 minutes. Closing the tab and forcing a GC under 'about:memory' seems to recover the memory.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

robin.bjorklin@gmail.com (JIRA)

unread,
Jan 30, 2017, 7:33:01 AM1/30/17
to jenkinsc...@googlegroups.com
Robin Björklin commented on Bug JENKINS-41558
 
Re: Memory leak in Jenkins stage view

Added reference to possibly related issue.

joachim.herb@gmx.de (JIRA)

unread,
Feb 6, 2017, 5:10:05 PM2/6/17
to jenkinsc...@googlegroups.com

I see exactly the same behavior (with the 32bit Windows version of Firefox (release 51.x and beta 52.x)). The "fix" at the moment is to use 64bit version.

robin.bjorklin@gmail.com (JIRA)

unread,
Feb 7, 2017, 2:24:01 AM2/7/17
to jenkinsc...@googlegroups.com

I'm running 64-bit Firefox version 51.0.1 under Linux if it makes any difference.

robin.bjorklin@gmail.com (JIRA)

unread,
Feb 7, 2017, 8:36:02 AM2/7/17
to jenkinsc...@googlegroups.com
Robin Björklin edited a comment on Bug JENKINS-41558
I'm running 64-bit Firefox version 51.0.1 under Linux if it makes any difference.


UPDATE: I tried leaving a tab open in Chrome 56.0.2924.76 (64-bit), and it crashes after consuming more and more memory for awhile.

richardkettelerij@gmail.com (JIRA)

unread,
Feb 8, 2017, 3:06:02 AM2/8/17
to jenkinsc...@googlegroups.com
Richard Kettelerij updated an issue
 
Change By: Richard Kettelerij
Attachment: stage-view-memory-leak.PNG

richardkettelerij@gmail.com (JIRA)

unread,
Feb 8, 2017, 3:07:01 AM2/8/17
to jenkinsc...@googlegroups.com
Richard Kettelerij commented on Bug JENKINS-41558
 
Re: Memory leak in Jenkins stage view

We're also experiencing this issue: We have a Windows 7 PC that continuously displays the Jenkins Stage View, it serves as a wallboard/information radiator. This PC is running Chrome (64 bits) and over time the stage view tab becomes slower and slower until it finally crashes. At that point the Chrome tab has accumulated about 1.5 - 2 GB of memory. When the stage view is open and you look in the Windows task manager you'll see the memory increasing every few seconds.

richardkettelerij@gmail.com (JIRA)

unread,
Feb 10, 2017, 8:39:01 AM2/10/17
to jenkinsc...@googlegroups.com

Our workaround: refresh the Chrome tab every few minutes using the SuperAutoRefresh plugin/extension to keep the memory from increasing above +/- 100mb.

richardkettelerij@gmail.com (JIRA)

unread,
Feb 10, 2017, 8:40:03 AM2/10/17
to jenkinsc...@googlegroups.com
Richard Kettelerij updated an issue
Change By: Richard Kettelerij
Environment: Firefox (other browsers untested)
Chrome 64bits on Windows

grandemange.kevin@gmail.com (JIRA)

unread,
Mar 1, 2017, 7:55:06 AM3/1/17
to jenkinsc...@googlegroups.com
Grandemange Kevin commented on Bug JENKINS-41558
 
Re: Memory leak in Jenkins stage view

To add to what was said:

This happens with all major navigators: we have computers with Internet Explorer, Firefox and Chrome/Chromium in 32 / 64 bits accessing the stage view and the result is the same: an extremely fast leak that will keep eating memory until the machine isn't responsive anymore. This makes it impossible to keep an eye on the stage view at all time.

So we use the same workaround than Richard Kettelerij but this makes the stage view essentially useless as you might be interrupted by a refresh while inspecting the pipeline

vivek.pandey@gmail.com (JIRA)

unread,
Nov 19, 2018, 10:09:04 AM11/19/18
to jenkinsc...@googlegroups.com
Vivek Pandey assigned an issue to Vivek Pandey
 
Change By: Vivek Pandey
Assignee: Sam Van Oort Vivek Pandey
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

vivek.pandey@gmail.com (JIRA)

unread,
Nov 19, 2018, 10:09:06 AM11/19/18
to jenkinsc...@googlegroups.com
Vivek Pandey updated an issue
Change By: Vivek Pandey
Labels: memory-leak stageview-frontend testing-notes-reviewed triaged-2018-11

svanoort@cloudbees.com (JIRA)

unread,
Nov 19, 2018, 10:10:03 AM11/19/18
to jenkinsc...@googlegroups.com
Sam Van Oort assigned an issue to Unassigned
Change By: Sam Van Oort
Assignee: Vivek Pandey

vivek.pandey@gmail.com (JIRA)

unread,
Nov 19, 2018, 10:10:06 AM11/19/18
to jenkinsc...@googlegroups.com
Vivek Pandey updated an issue
Change By: Vivek Pandey
Labels: frontend memory-leak stageview-frontend testing-notes-reviewed triaged-2018-11

pwhoriskey@comcast.net (JIRA)

unread,
Nov 5, 2019, 11:56:04 AM11/5/19
to jenkinsc...@googlegroups.com
Phillip Whoriskey commented on Bug JENKINS-41558
 
Re: Memory leak in Jenkins stage view

Just adding a data point in case it helps: 

 

On linux/Firefox, I can see a running build page grow from ~40Mb to over 2Gb over the course of an hour or so.  the majority of that space, ~1.6Gb is listed under dom/orphan-nodes.  

Jenkins 2.190.1

Firefox 60.9.0esr

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

Tizkiko@gmail.com (JIRA)

unread,
Mar 22, 2020, 6:20:04 AM3/22/20
to jenkinsc...@googlegroups.com
Tizki KO commented on Bug JENKINS-41558

any update about this? happens to me as well.

Jenkins 2.176.2

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

dnusbaum@cloudbees.com (JIRA)

unread,
Apr 13, 2020, 2:43:07 PM4/13/20
to jenkinsc...@googlegroups.com

Here are some notes from when a few developers looked into this a few months back:

Whenever Stage View receives an event, it re-renders the entire table. When that happens, all of the DOM nodes from the last render pass should become unreachable and be garbage collected, but right now, that does not happen, because there are a bunch of references to those nodes from the page-wide instance of JQuery (definitely via event listeners, but also via other JQuery-internal paths which we did not fully understand), so the old nodes are retained forever, causing the memory leak.

We did not see an obvious or easy way to fix this, but we are not JavaScript experts, so maybe someone with more experience in the area would be able to quickly figure out how to fix it. Maybe we need to modify all event listener registration so that the listeners are stored at the top level and can be cleared out when an event is received before re-rendering the table, maybe the version of JQuery being used needs to be updated, maybe both, etc.

fl.hoffmann@sap.com (JIRA)

unread,
Apr 24, 2020, 5:13:03 AM4/24/20
to jenkinsc...@googlegroups.com
Florian Hoffmann updated an issue
 
Change By: Florian Hoffmann
Environment:
Firefox (other browsers untested)
Chrome 64bits on Windows

Microsoft Edge
Microsoft Internet Explorer

fl.hoffmann@sap.com (JIRA)

unread,
Apr 24, 2020, 5:24:03 AM4/24/20
to jenkinsc...@googlegroups.com
Florian Hoffmann commented on Bug JENKINS-41558
 
Re: Memory leak in Jenkins stage view

We are being affected by this more and more. In fact we are seeing notebook batteries being sucked dry in 45 minutes because of this. 

Our stages view spins out of control really quickly, aggregating up to 11 GB RAM in about 20 minutes. The UI also constantly consumes 10-15% of CPU time, which sounds overly high for that tiny bit of visualization; we assume it's related to the browser trying to manage the large amounts of memory.

BlueOcean, in comparison, remains stable.

We have confirmed this issue on all common Windows browsers, Firefox, IE, Edge, and Chrome, so added these to the issue's header.

From the reports above, I deduce that there is nobody actively working on this. And the issue is now > 3 years old, which is quite a shame... Can we help somehow?

kshultz@cloudbees.com (JIRA)

unread,
Apr 24, 2020, 9:04:07 AM4/24/20
to jenkinsc...@googlegroups.com

That's interesting that it's so prevalent on Windows browsers. I think many of us have been able to recreate the problem elsewhere, but your description above sounds more severe than what I've experienced myself.

From the reports above, I deduce that there is nobody actively working on this. And the issue is now > 3 years old, which is quite a shame... Can we help somehow?

Yes! Yes please. If someone in the community has the willingness to try and tackle this problem, we'll make sure the PR gets reviewed thoughtfully and quickly.There are a lot of potentially useful notes in the previous comments in this ticket.

Reply all
Reply to author
Forward
0 new messages