jmap throwing RuntimeException about unknown CollectedHeap type

Trying to find out the heap space usage of a Java process with jmap on a 64 bit Red Hat machine, I got the following error message:

Heap Configuration:
  MinHeapFreeRatio = 40
  MaxHeapFreeRatio = 70
  MaxHeapSize      = 6442450944 (6144.0MB)
  NewSize          = 1310720 (1.25MB)
  MaxNewSize       = 17592186044415 MB
  OldSize          = 5439488 (5.1875MB)
  NewRatio         = 2
  SurvivorRatio    = 8
  PermSize         = 21757952 (20.75MB)
  MaxPermSize      = 174063616 (166.0MB)
  G1HeapRegionSize = 0 (0.0MB)

Heap Usage:
Exception in thread "main" java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(
       at java.lang.reflect.Method.invoke(
Caused by: java.lang.RuntimeException: unknown CollectedHeap type : class sun.jvm.hotspot.gc_interface.CollectedHeap

The reason was not obvious and Google didn’t help. In the end, I found out I was just missing the following package:


After installing this package, jmap worked as expected.

This entry was posted in Uncategorized. Bookmark the permalink.

5 Responses to jmap throwing RuntimeException about unknown CollectedHeap type

  1. Juan Velez says:

    Can you post exactly what command you used? I tried

    [root@lx64mmt11 bin]# yum install java-1.7.0-openjdk-debuginfo.x86_64
    Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    This system is receiving updates from RHN Classic or RHN Satellite.
    Setting up Install Process
    No package java-1.7.0-openjdk-debuginfo.x86_64 available.
    Error: Nothing to do

  2. ocroquette2 says:

    The package name might be different on your system. Try:
    yum list available | grep debuginfo

  3. Hello Java says:

    May I know how to install matching openjdk debuginfo package.

    • ocroquette2 says:

      Use “yum”. Please search for “redhat install package” on Google for more detailed information.

  4. Nan Zhong says:

    On an AWS ElasticBeanstalk instance, the command that worked for me was “sudo debuginfo-install java-1.8.0-openjdk-devel”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s