Jenkins memory leak

331 views
Skip to first unread message

Andrew Barber

unread,
Mar 24, 2016, 10:04:53 AM3/24/16
to Jenkins Users
Our jenkins server seems to have a slow memory leak (runs out after about 5 days).  We noticed this after upgrading from 1.596 to 1.642.1.  I already increased memory space for java ( -XX:MaxPermSize=512m  -Xmx512m).  

I have a heap dump and histogram, but I am not sure how to proceed.  The histogram starts like this



num     #instances         #bytes  class name
----------------------------------------------
   1:        978285      187967360  [C
   2:         42467      113726864  [B
   3:       1259878       40316096  java.lang.StackTraceElement
   4:        968080       23233920  java.lang.String
   5:        252385       19069600  [Ljava.lang.Object;
   6:        116007       12968192  [I
   7:         82985        6636360  [S
   8:        204713        6550816  java.util.concurrent.ConcurrentHashMap$Node
   9:         91323        5844672  java.net.URL
  10:         56639        5683352  [Ljava.lang.StackTraceElement;


I don't know what [C or [B is.  Perhaps a corruption?  Also, what is going on with StackTraceElement?

We see a lot of these in our log

WARNING: Executor #0 for XXX-build1 : executing XXX-treemake #4203 termination trace
hudson.model.Computer$TerminationRequest: Termination requested at Wed Mar 23 15:17:25 PDT 2016 by Thread[jenkins.util.Timer [#2],5,main] [id=27]
        at hudson.model.Computer.recordTermination(Computer.java:219)
        at hudson.model.Computer.disconnect(Computer.java:481)
        at hudson.slaves.SlaveComputer.disconnect(SlaveComputer.java:611)
        at hudson.slaves.RetentionStrategy$Demand.check(RetentionStrategy.java:270)
        at hudson.slaves.RetentionStrategy$Demand.check(RetentionStrategy.java:178)
        at hudson.slaves.ComputerRetentionWork$1.run(ComputerRetentionWork.java:71)
        at hudson.model.Queue._withLock(Queue.java:1346)
        at hudson.model.Queue.withLock(Queue.java:1229)
        at hudson.slaves.ComputerRetentionWork.doRun(ComputerRetentionWork.java:62)
        at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:50)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)


Ashish Yadav

unread,
Mar 24, 2016, 11:11:33 AM3/24/16
to jenkins...@googlegroups.com
Termination trace (log) could be due to a network connectivity issue between the master and the slaves. I restarted jenkins to resolve this (termination request) issue.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d555b38b-70e4-4f46-b189-08151d280d4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Barber

unread,
Mar 24, 2016, 2:20:33 PM3/24/16
to Jenkins Users, ashish...@firemon.com
Restarting Jenkins isn't a good option for us as it is fairly disruptive.  We have some very long jobs (3-7 days) so draining out the running jobs takes a long time during which we can't make progress with other jobs.
Reply all
Reply to author
Forward
0 new messages