[ 
https://issues.apache.org/jira/browse/RATIS-839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

runzhiwang updated RATIS-839:
-----------------------------
    Description: 
*What's the problem ?*

When run hadoop-ozone for 4 days, datanode memory leak.  When dump heap, I 
found there are 460710 instances of GrpcLogAppender. But there are only 6 
instances of SenderList, and each SenderList contains 1-2 instance of 
GrpcLogAppender. So there are a lot of GrpcLogAppender did not stop the Daemon 
Thread when removed from senders.

!image-2020-04-06-13-48-10-703.png!*!image-2020-04-06-13-59-14-146.png!*

*What's the reason ?*

>From the code, when [removeSender|#L431]], it did not call 
>LogAppender::stopAppender.

 

*How to fix ?*

To avoid forgetting stopAppender,  I stopAppender in removeAll.

 

  was:
*What's the problem ?*

When run hadoop-ozone for 4 days, datanode memory leak.  When dump heap, I 
found there are 460710 instances of GrpcLogAppender. But there are only 6 
instances of SenderList, and each SenderList contains 1-2 instance of 
GrpcLogAppender. So there are a lot of GrpcLogAppender did not stop the Daemon 
Thread when remove from senders.

!image-2020-04-06-13-48-10-703.png!*!image-2020-04-06-13-59-14-146.png!*

*What's the reason ?*

>From the code, when [removeSender|#L431]], it did not call 
>LogAppender::stopAppender.

 

*How to fix ?*

To avoid forgetting stopAppender,  I stopAppender in removeAll.

 


> Memory leak of LogAppender
> --------------------------
>
>                 Key: RATIS-839
>                 URL: https://issues.apache.org/jira/browse/RATIS-839
>             Project: Ratis
>          Issue Type: Bug
>            Reporter: runzhiwang
>            Priority: Major
>         Attachments: RATIS-839.001.patch, image-2020-04-06-13-48-10-703.png, 
> image-2020-04-06-13-58-24-681.png, image-2020-04-06-13-59-14-146.png
>
>
> *What's the problem ?*
> When run hadoop-ozone for 4 days, datanode memory leak.  When dump heap, I 
> found there are 460710 instances of GrpcLogAppender. But there are only 6 
> instances of SenderList, and each SenderList contains 1-2 instance of 
> GrpcLogAppender. So there are a lot of GrpcLogAppender did not stop the 
> Daemon Thread when removed from senders.
> !image-2020-04-06-13-48-10-703.png!*!image-2020-04-06-13-59-14-146.png!*
> *What's the reason ?*
> From the code, when [removeSender|#L431]], it did not call 
> LogAppender::stopAppender.
>  
> *How to fix ?*
> To avoid forgetting stopAppender,  I stopAppender in removeAll.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to