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

Attila Doroszlai commented on HDDS-7136:
----------------------------------------

bq. The fix looks good, but the buffer should be owned by ChunkInputStream, 
which should be dereferenced post close(), and GC should clean up buffers. The 
release is only setting the local reference to null, which should be the same 
as the ChunkInputStream being GCed

I was thinking the same.  [~weichiu], does Impala keep reference to the input 
stream after closing it?  If you still have the heap dump, can you share it?

> Memory leak due to ChunkInputStream.close() not releasing buffer
> ----------------------------------------------------------------
>
>                 Key: HDDS-7136
>                 URL: https://issues.apache.org/jira/browse/HDDS-7136
>             Project: Apache Ozone
>          Issue Type: Bug
>            Reporter: Wei-Chiu Chuang
>            Assignee: Wei-Chiu Chuang
>            Priority: Critical
>              Labels: pull-request-available
>
> We found Impala queries that run on ofs does not release memory after 
> completion.
> Looking at heap dump, we realized unbuffer() was not called (due to 
> HDDS-7135) and Impala calls close() on the input stream instead.
> According to InputStream javadoc, the close() should 
> bq. "Closes this input stream and releases any system resources associated 
> with the stream."
> I believe close() should release buffer in addition to sockets (which it 
> already does).



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to