Request for review : 7181793 FileDescriptor keeps its own hard reference to Closeables causing a memory leak

Chris Hegarty chris.hegarty at oracle.com
Tue Jul 10 21:17:55 UTC 2012


Sean,

The backout approach seems reasonable, but I really don't like the test. 
It is racey and not guaranteed to consistently pass. I agree/approve the 
backout, but would prefer not to add the test in its current state.

-Chris.

On 10/07/2012 17:37, Seán Coffey wrote:
>
> 7105952 fix introduced some improvements for finalization strategy
> around FileInputStream/FileOutputStream/RandomAccessFile.
>
> However a recently reported issue has highlighted an issue where memory
> heap can be consumed with SocketOutputStream objects as a result of
> clients repeatedly calling socket.getOutputStream() on a common socket
> (shared fd).
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7181793
>
> Use of weakreferences was considered at 7105952 fix time but hard
> references was considered a cleaner approach. Altering that design at
> this late stage in the 7u6 plan could be risky and I'm suggesting that
> we back out the 7105952 fix and concentrate on this area again in 7u8.
>
> The changeset is basically a backout of the original changeset plus the
> addition of a new testcase (FDStrongReference.java)
>
> http://cr.openjdk.java.net/~coffeys/webrev.7181793.jdk7u6/
> <http://cr.openjdk.java.net/%7Ecoffeys/webrev.7181793.jdk7u6/>
>
> Once reviewed, I'll ping 7u openjdk alias to start the critical fix
> approval process.
> regards,
> Sean.
>



More information about the core-libs-dev mailing list