Details
-
Bug
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
0.9.1
-
None
-
None
-
None
Description
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:
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)
Attachments
Attachments
Issue Links
- is related to
-
HIVE-22038 Fix memory related sideeffects of opening/closing sessions
- Patch Available