[JIRA] (JENKINS-58899) ThreadLocal leak causing high CPU usage with DurableTaskStep threads

瀏覽次數:0 次
跳到第一則未讀訊息

glavoie@gmail.com (JIRA)

未讀,
2019年8月12日 下午1:31:032019/8/12
收件者:jenkinsc...@googlegroups.com
Gabriel Lavoie updated an issue
 
Jenkins / Bug JENKINS-58899
ThreadLocal leak causing high CPU usage with DurableTaskStep threads
Change By: Gabriel Lavoie
Summary: ThreadLocal leak causing high CPU usage with DurableTaskStep threads
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

dnusbaum@cloudbees.com (JIRA)

未讀,
2019年8月13日 中午12:41:022019/8/13
收件者:jenkinsc...@googlegroups.com
Devin Nusbaum commented on Bug JENKINS-58899
 
Re: ThreadLocal leak causing high CPU usage with DurableTaskStep threads

I think we should call ThreadLocal.remove here instead of trying to reset the original value, since calls to DelayBufferedOutputStream.flushBuffer will always be from a thread in the jenkins.util.Timer thread pool, and so even if we did care about what the original value was (I don't think we do, the default is true, we set it to false just for the call to flush, and then set it back to true, and it is a ThreadLocal so we don't have to worry about interference from other threads, so it will always be true going into flushBuffer IIUC), it would only matter if we happened to use a thread from the pool that we had already used previously, which is not something we can count on.

glavoie@gmail.com (JIRA)

未讀,
2019年8月13日 中午12:47:012019/8/13
收件者:jenkinsc...@googlegroups.com

As additional data to the comment above, I forgot to mention that all leaked values were boolean "true". 

dnusbaum@cloudbees.com (JIRA)

未讀,
2019年8月13日 下午4:56:022019/8/13
收件者:jenkinsc...@googlegroups.com
Devin Nusbaum started work on Bug JENKINS-58899
 
Change By: Devin Nusbaum
Status: Open In Progress

dnusbaum@cloudbees.com (JIRA)

未讀,
2019年8月13日 下午4:56:032019/8/13
收件者:jenkinsc...@googlegroups.com

dnusbaum@cloudbees.com (JIRA)

未讀,
2019年8月13日 下午4:56:032019/8/13
收件者:jenkinsc...@googlegroups.com

dnusbaum@cloudbees.com (JIRA)

未讀,
2019年8月13日 下午4:59:032019/8/13
收件者:jenkinsc...@googlegroups.com
Devin Nusbaum commented on Bug JENKINS-58899
 
Re: ThreadLocal leak causing high CPU usage with DurableTaskStep threads

Gabriel Lavoie If you want to review https://github.com/jenkinsci/workflow-api-plugin/pull/100, and/or test it out on your instance to confirm whether it fixes the issue (Especially to see if we should modify FlushControlledOutputStream.flush in the same way based on real data), that would be appreciated, thanks!

glavoie@gmail.com (JIRA)

未讀,
2019年8月13日 晚上7:42:022019/8/13
收件者:jenkinsc...@googlegroups.com

dnusbaum@cloudbees.com (JIRA)

未讀,
2019年8月27日 下午3:49:022019/8/27
收件者:jenkinsc...@googlegroups.com

dnusbaum@cloudbees.com (JIRA)

未讀,
2019年8月29日 下午4:08:032019/8/29
收件者:jenkinsc...@googlegroups.com
 

A fix for this issue was just released in version 2.37 of Pipeline API Plugin. Gabriel Lavoie thank you for the detailed bug report and for helping test the fix!

Change By: Devin Nusbaum
Status: Fixed but Unreleased Resolved
Released As: workflow-api 2.37
回覆所有人
回覆作者
轉寄
0 則新訊息