InternalError: Memory Pool (Shenandoah) not found

Aleksey Shipilev shade at redhat.com
Sat Nov 3 20:53:57 UTC 2018


Reproduced. Weird bug. We actually have the test that is supposed to verify it:

http://hg.openjdk.java.net/shenandoah/jdk/file/4ce8c4c952b3/test/hotspot/jtreg/gc/shenandoah/TestMemoryMXBeans.java

But it passes! And I scanned through all integer-M heap sizes to find that -Xms4097m -Xmx4097m is
the lowest heap settings where it fails. Let's see what is up.

-Aleksey

On 11/03/2018 09:23 PM, Robert Stupp wrote:
> And the funny part is, that omitting '-Xms' helps to prevent the error.
> 
> This one fails:
> java -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xms16081M -Xmx16081M -classpath . Demo
> 
> This one succeeds:
> java -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xmx16081M -classpath . Demo
> 
> 
> Demo.java:
> 
> 
> import java.lang.management.*;
> public class Demo {
>     public static void main(String args[]) {
>     for (MemoryPoolMXBean pool: ManagementFactory.getMemoryPoolMXBeans())
>         System.out.println(pool.getName()+ " : " + pool.getPeakUsage());
>     }
> }
> 
> 
> 
> On 11/3/18 9:05 PM, Robert Stupp wrote:
>> The following code snippet produces an InternalError when either the getPeakUsage() or getUsage()
>> methods for the memory-pool "Shenandoah" are called.
>>
>> for(MemoryPoolMXBean pool:
>> ManagementFactory.getMemoryPoolMXBeans())System.out.println(pool.getName()+ " : " +
>> pool.getPeakUsage());
>>
>> java.lang.InternalError: Memory Pool not found
>>     at java.management/sun.management.MemoryPoolImpl.getPeakUsage0(Native Method)
>>     at java.management/sun.management.MemoryPoolImpl.getPeakUsage(MemoryPoolImpl.java:99)
>>
>> It's 100% reproducible with recent builds from http://hg.openjdk.java.net/shenandoah/jdk +
>> http://hg.openjdk.java.net/shenandoah/jdk11
>>
>> I'm pretty sure that this worked a few months ago.
>>
>> Robert
>>




More information about the shenandoah-dev mailing list