You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tez.apache.org by "Zoltan Haindrich (JIRA)" <ji...@apache.org> on 2019/07/24 14:16:00 UTC

[jira] [Created] (TEZ-4080) TezClient should close FileSystem objects to prevent leak

Zoltan Haindrich created TEZ-4080:
-------------------------------------

             Summary: TezClient should close FileSystem objects to prevent leak
                 Key: TEZ-4080
                 URL: https://issues.apache.org/jira/browse/TEZ-4080
             Project: Apache Tez
          Issue Type: Bug
            Reporter: Zoltan Haindrich


When opening/closing a lot of tez clients; some FileSystem object references are retained even after the client is closed - due to the fact the  FileSystem has a "cache" which collects all open FileSystem objects - to be able to close all of them from a single shutdownhook.

Not closing these FileSystem objects causes them to pile up in the "cache" which has hard references to them 
In a simple hive test which was run with 150M of memory; these "lost" filesystem objects could result in an OOM after ~170 sessions.

A sample creation stack trace of a FileSystem object:
{code}
        at org.apache.hadoop.hive.ql.io.ProxyLocalFileSystem.<init>(ProxyLocalFileSystem.java:49)
        at sun.reflect.GeneratedConstructorAccessor83.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133)
        at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:3353)
        at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:124)
        at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:3403)
        at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:3371)
        at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:477)
        at org.apache.hadoop.fs.Path.getFileSystem(Path.java:361)
        at org.apache.tez.dag.app.DAGAppMaster.serviceInit(DAGAppMaster.java:502)
        at org.apache.hadoop.service.AbstractService.init(AbstractService.java:164)
        at org.apache.tez.dag.app.DAGAppMaster$9.run(DAGAppMaster.java:2663)
{code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)