hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rohith Sharma K S (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (YARN-1145) Potential file handle leak in aggregated logs web ui
Date Wed, 06 Nov 2013 09:27:22 GMT

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

Rohith Sharma K S updated YARN-1145:
------------------------------------

    Attachment: YARN-1145.4.patch

Apologies for delayed response. Thank you Vinod for reviewing patch :-)

Attaching patch addressing all Vinod comments. 

For 5th comment, added try{}finally{} for whole render method in AggregatedLogsBlock.java.
Eventhough patch looks with lot of difference(since try catch added for whole render method),
modified code is 
{noformat}
protected void render(Block html) {
+    AggregatedLogFormat.LogReader reader = null;
+    try{
      // render block : NO CHANGE
      Path remoteRootLogDir = new Path(conf.get(
          YarnConfiguration.NM_REMOTE_APP_LOG_DIR,
          YarnConfiguration.DEFAULT_NM_REMOTE_APP_LOG_DIR));
-    AggregatedLogFormat.LogReader reader = null;
     // render block : NO CHANGE

+    } finally{
+      if (reader != null) {
+        reader.close();
+      }
+   }
}
{noformat}

> Potential file handle leak in aggregated logs web ui
> ----------------------------------------------------
>
>                 Key: YARN-1145
>                 URL: https://issues.apache.org/jira/browse/YARN-1145
>             Project: Hadoop YARN
>          Issue Type: Bug
>    Affects Versions: 2.0.5-alpha, 0.23.9, 2.1.1-beta
>            Reporter: Rohith Sharma K S
>            Assignee: Rohith Sharma K S
>         Attachments: MAPREDUCE-5486.patch, YARN-1145.1.patch, YARN-1145.2.patch, YARN-1145.3.patch,
YARN-1145.4.patch, YARN-1145.patch
>
>
> Any problem in getting aggregated logs for rendering on web ui, then LogReader is not
closed. 
> Now, it reader is not closed which causing many connections in close_wait state.
> hadoopuser@hadoopuser:> jps
> *27909* JobHistoryServer
> DataNode port is 50010. When greped with DataNode port, many connections are in CLOSE_WAIT
from JHS.
> hadoopuser@hadoopuser:> netstat -tanlp |grep 50010
> tcp        0      0 10.18.40.48:50010       0.0.0.0:*               LISTEN      21453/java
         
> tcp        1      0 10.18.40.48:20596       10.18.40.48:50010       CLOSE_WAIT  *27909*/java
         
> tcp        1      0 10.18.40.48:19667       10.18.40.152:50010      CLOSE_WAIT  *27909*/java
         
> tcp        1      0 10.18.40.48:20593       10.18.40.48:50010       CLOSE_WAIT  *27909*/java
         
> tcp        1      0 10.18.40.48:12290       10.18.40.48:50010       CLOSE_WAIT  *27909*/java
         
> tcp        1      0 10.18.40.48:19662       10.18.40.152:50010      CLOSE_WAIT  *27909*/java
         



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message