hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weiwei Yang (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-11887) Shared XceiverClient should be closed if there is no open clients to avoid resource leak
Date Tue, 06 Jun 2017 13:23:18 GMT

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

Weiwei Yang updated HDFS-11887:
-------------------------------
    Labels:   (was: leak)

> Shared XceiverClient should be closed if there is no open clients to avoid resource leak
> ----------------------------------------------------------------------------------------
>
>                 Key: HDFS-11887
>                 URL: https://issues.apache.org/jira/browse/HDFS-11887
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>            Reporter: Mukul Kumar Singh
>            Assignee: Mukul Kumar Singh
>             Fix For: HDFS-7240
>
>         Attachments: HDFS-11887-HDFS-7240.001.patch, HDFS-11887-HDFS-7240.002.patch,
HDFS-11887-HDFS-7240.003.patch
>
>
> XceiverClientManager doesn't close client on eviction which can leak resources.
> {code}
> public XceiverClientManager(Configuration conf) {
> .
> .
> .
>             public void onRemoval(
>                 RemovalNotification<String, XceiverClientWithAccessInfo>
>                   removalNotification) {
>               // If the reference count is not 0, this xceiver client should not
>               // be evicted, add it back to the cache.
>               WithAccessInfo info = removalNotification.getValue();
>               if (info.hasRefence()) {
>                 synchronized (XceiverClientManager.this.openClient) {
>                   XceiverClientManager.this
>                       .openClient.put(removalNotification.getKey(), info);
>                 }
>               }
> {code}
> Also a stack overflow can be triggered because of putting the element back in the cache
on eviction.
> {code}
>                 synchronized (XceiverClientManager.this.openClient) {
>                   XceiverClientManager.this
>                       .openClient.put(removalNotification.getKey(), info);
>                 }
> {code}
> This bug will try to fix both of these cases.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message