<AWT Dev> [JDK-8175015] FileSystemView.isDrive(File) memory leak on "C:\" file reference
prasanta.sadhukhan at oracle.com
Wed Aug 30 08:30:13 UTC 2017
One thing, if sf.isFileSystem() is true and sf.parent is NULL, then in
previous case, it falls through but with this fix, it returns false. Can
On 8/30/2017 11:42 AM, Sergey Bylokhov wrote:
> Ok, looks fine.
> ----- krishna.addepalli at oracle.com wrote:
>> Hi Sergey,
>> I checked with Thread.MAX_PRIORITY - 1, and found that it still leads
>> to OOM exception, although it takes longer to get to that condition.
>> -----Original Message-----
>> From: Sergey Bylokhov
>> Sent: Tuesday, August 29, 2017 6:19 AM
>> To: Krishna Addepalli <krishna.addepalli at oracle.com>
>> Cc: awt-dev at openjdk.java.net
>> Subject: Re: <AWT Dev> [JDK-8175015] FileSystemView.isDrive(File)
>> memory leak on "C:\" file reference
>> Hi, Krishna.
>> Did you check other priorities like Thread.MAX_PRIORITY-1/2/3?
>> ----- krishna.addepalli at oracle.com wrote:
>>> Hi Sergey,
>>> The root cause for the OOM exception is due to mismatched thread
>>> priority. When folders are listed, each folder/file is associated
>>> a COM object, that is wrapped by the Java ShellFolder object. Now,
>>> when the ShellFolder object needs to be deleted, the underlying COM
>>> object should be released in ComThread, whose priority is normal.
>>> Whereas, the java2D.Disposer thread runs at highest priority, but it
>>> is unable to clean up the piled up objects, which eventually leads
>>> this exception.
>>> I have added a fix for this as well, and created a new webrev as
>>> -----Original Message-----
>>> From: Sergey Bylokhov
>>> Sent: Wednesday, August 9, 2017 5:16 AM
>>> To: Krishna Addepalli <krishna.addepalli at oracle.com>;
>>> awt-dev at openjdk.java.net
>>> Subject: Re: <AWT Dev> [JDK-8175015]
>>> memory leak on "C:\" file reference
>>> Hi, Krishna.> The problem is internally,
>>> Win32ShellFolderManager2.java, the function
>>>> "isFileSystemRoot" is called, which lists the contents of all the
>>>> drives, in addition to including them. It also includes the hidden
>>>> files. For each file present, it is wrapped with a
>>>> object. So, for each query, it will list the files in the drives,
>>>> throws them away, which is leading to both memory consumption as
>>>> as slow performance.
>>> If for each query we list the files in the drive and *throws* all of
>>> them away, then why(and where) we have a memory leak and as a result
>>> Best regards, Sergey.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the awt-dev