8245867: Logger/bundleLeak/BundleTest.java fails due to "OutOfMemoryError: Java heap space"
Lance Andersen
lance.andersen at oracle.com
Thu May 28 10:48:43 UTC 2020
Hi Daniel,
The change looks reasonable. Thank you for addressing so quickly.
Best
Lance
> On May 28, 2020, at 4:50 AM, Daniel Fuchs <daniel.fuchs at oracle.com> wrote:
>
> Hi,
>
> Please find an almost trivial fix for:
>
> 8245867: Logger/bundleLeak/BundleTest.java fails due
> to "OutOfMemoryError: Java heap space"
> https://bugs.openjdk.java.net/browse/JDK-8245867
>
> webrev:
> http://cr.openjdk.java.net/~dfuchs/webrev_8245867/webrev.00/
>
> My new test for JDK-8239013 has been observed failing
> intermittently in OutOfMemory. The test needs to trigger
> the clearing of SoftReferences, and does so by eating
> up heap memory in order to trigger a GC that will
> clear them.
> The issue is that the test didn't release the memory
> when it no longer needed it, which caused trouble for
> the test harness when it tried to clean up after the
> test.
>
> The fix is to use SoftReference to retain the eaten-up
> memory (instead of strong references) so that it can
> be reclaimed at the time the full GC that clear soft
> references is triggered, and also to release the heap
> memory as soon as it is no longer needed.
>
> best regards,
>
> -- daniel
<http://oracle.com/us/design/oracle-email-sig-198324.gif>
<http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
<http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering
1 Network Drive
Burlington, MA 01803
Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>
More information about the core-libs-dev
mailing list