RFR: 8064814: Print more helpful error message when getting OOM due to low Java Heap base when running with CompressedOops

Poonam Bajaj Parhar poonam.bajaj at oracle.com
Tue Jun 7 18:25:03 UTC 2016


Hello Thomas,

Thanks for sharing the details on how this is handled on Aix. I will 
file a bug to explore if this can be done for the other platforms as well.

regards,
Poonam

On 5/30/2016 4:35 AM, Thomas Stüfe wrote:
> Hi all,
>
> a better way to fix this may be to prevent heap allocation from 
> happening too close to the data segment.
>
> On Aix we regularly ran into this problem, so we added a workaround to 
> never attach the java heap (nor any other memory) within a safety zone 
> behind the data segment. The size of this safety zone is configurable 
> via MaxExpectedDataSegmentSize (AIX specific switch).
>
> For details see os_aix.cpp, function "is_close_to_brk()" and its usage 
> in the context of reserve_memory() and friends. Maybe this feature 
> could be ported to other Unices - all variants where the C heap is 
> living in the process data segment and increased using sbrk.
>
> Kind Regards, Thomas
>
> On Fri, May 27, 2016 at 12:14 AM, David Holmes 
> <david.holmes at oracle.com <mailto:david.holmes at oracle.com>> wrote:
>
>     Hi Poonam,
>
>     The changes seem okay to me - I think Coleen would need to confirm
>     the accuracy of the actual words used.
>
>     Note that this enhancement requires approval before it can be pushed.
>
>     Thanks,
>     David
>
>
>     On 27/05/2016 7:39 AM, Poonam Bajaj Parhar wrote:
>
>         Hello,
>
>         Gentle reminder!
>
>         Thanks,
>         Poonam
>
>         On 5/10/2016 1:04 PM, Poonam Bajaj Parhar wrote:
>
>             Hello,
>
>             Could I get reviews for this small change, please!
>             http://cr.openjdk.java.net/~poonam/8064814/webrev.00/
>             <http://cr.openjdk.java.net/%7Epoonam/8064814/webrev.00/>
>
>             Thanks,
>             Poonam
>
>             On 5/5/2016 6:49 AM, poonam.bajaj at oracle.com
>             <mailto:poonam.bajaj at oracle.com> wrote:
>
>                 Hello,
>
>                 Please review this simple fix for:
>                 Bug 8064814
>                 <https://bugs.openjdk.java.net/browse/JDK-8064814> : Print
>                 more helpful error message when getting OOM due to low
>                 Java Heap base
>                 when running with CompressedOops
>                 Webrev:
>                 http://cr.openjdk.java.net/~poonam/8064814/webrev.00/
>                 <http://cr.openjdk.java.net/%7Epoonam/8064814/webrev.00/>
>
>                 Problem: We can encounter out-of-native-heap errors
>                 when the Java heap
>                 is either placed in the first 4gb or 32gb address
>                 space when running
>                 with the CompressedOops. The Java Heap base in these
>                 cases limits and
>                 blocks the growth of the native heap.
>
>                 Fix: Print better error message giving an indication
>                 that the
>                 out-of-native heap error may be due to the use of
>                 CompressedOops and how
>                 it can be resolved. These changes also check if the
>                 process is running
>                 in 32-bit mode and then print the appropriate 32-bit
>                 or 64-bit related
>                 suggestions.
>
>                 Testing: Manual testing
>
>                 Thanks,
>                 Poonam
>
>
>
>



More information about the hotspot-runtime-dev mailing list