[ 
https://issues.apache.org/jira/browse/HADOOP-18526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17635447#comment-17635447
 ] 

ASF GitHub Bot commented on HADOOP-18526:
-----------------------------------------

steveloughran opened a new pull request, #5144:
URL: https://github.com/apache/hadoop/pull/5144

   
   This has triggered an OOM in a process which was churning through s3a fs 
instances; the increased memory footprint of IOStatistics amplified what must 
have been a long standing issue.
   
   * Makes sure instrumentation is closed when fs is closed
   * Uses a weak reference from metrics to instrumentation, so even if the fs 
wasn't closed (see HADOOP-18478), this ref would not be holding things back.
   
   
   ### How was this patch tested?
   
   cloud tests. no new tests...if there are suggestions, that'd be good
   
   ### For code changes:
   
   - [X] Does the title or this PR starts with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [X] Object storage: have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   
   




> Leak of S3AInstrumentation instances via hadoop Metrics references
> ------------------------------------------------------------------
>
>                 Key: HADOOP-18526
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18526
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/s3
>    Affects Versions: 3.3.4
>            Reporter: Steve Loughran
>            Priority: Major
>
> A heap dump of a process running OOM shows that if a process creates then 
> destroys lots of S3AFS instances, you seem to run out of heap due to 
> references to S3AInstrumentation and the IOStatisticsStore kept via the 
> hadoop metrics registry
> It doesn't look like S3AInstrumentation.close() is being invoked in 
> S3AFS.close(). it should -with the IOStats being snapshotted to a local 
> reference before this happens. This allows for stats of a closed fs to be 
> examined.
> If you look at org.apache.hadoop.ipc.DecayRpcScheduler.MetricsProxy it uses a 
> WeakReference to refer back to the larger object. we should do the same for 
> abfs/s3a bindings. ideally do some template proxy class in hadoop common they 
> can both use.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to