← Back to team overview

openjdk team mailing list archive

[Bug 1548434] Re: jmap -heap broken since update to 7u95-2.6.4-0ubuntu0.14.04.1

 

There's nothing we can do upstream because package managers strip out
all of the debug information. It requires

If installing the correct debuginfo package doesn't work, there is a
problem finding the debuginfo packages.  libjvm will read the .note.gnu
.build-id section in libjvm.so, and then look for a corresponding file
in /usr/lib/debug.

Like this:

 $ readelf -x .note.gnu.build-id
"/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.131.x86_64/jre/lib/amd64/server/libjvm.so"

Hex dump of section '.note.gnu.build-id':
  0x00000190 04000000 14000000 03000000 474e5500 ............GNU.
  0x000001a0 14501d56 be269cfd 9234342b 58407e0f .P.V.&...44+X@~.
  0x000001b0 bbe4f5c8                            ....

And the debuginfo should be found here:

/usr/lib/debug/.build-id/14/501d56be269cfd9234342b58407e0fbbe4f5c8.debug

Note that the filename of the debuginfo is the hex representation of the
hex data in the .note.gnu.build-id section of libjvm.so.

It would be possible for the distros to avoid this by not stripping out
the symbols we need, but most distro packaging has an "all or nothing"
approach to debuginfo.

-- 
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-7 in Ubuntu.
https://bugs.launchpad.net/bugs/1548434

Title:
  jmap -heap broken since update to 7u95-2.6.4-0ubuntu0.14.04.1

Status in openjdk-7 package in Ubuntu:
  Confirmed
Status in openjdk-8 package in Ubuntu:
  Confirmed

Bug description:
  The jmap -heap <pid> command is broken since the update to
  7u95-2.6.4-0ubuntu0.14.04.1

  Given a tomcat process running with openjdk-7 under a non-root user.

  Before that update sudo jmap -heap <pid> gave output about heap configured on top + also the heap usage inside each reason of the java heap (eden, old gen, permgen) etc...
  Note: running as root is and was required even before to get the '-heap' option to work. Where as running 'jmap -dump:file' only works when running as user the jvm runs under and not root. That just as context as it is strange behavior of jmap since a long time.

  After the update to the specified version only the intro is shown and
  instead of the usage the following error:

  Attaching to process ID 1571, please wait...
  Debugger attached successfully.
  Server compiler detected.
  JVM version is 24.95-b01

  using thread-local object allocation.
  Parallel GC with 2 thread(s)

  Heap Configuration:
     MinHeapFreeRatio = 0
     MaxHeapFreeRatio = 100
     MaxHeapSize      = 1363148800 (1300.0MB)
     NewSize          = 1310720 (1.25MB)
     MaxNewSize       = 17592186044415 MB
     OldSize          = 5439488 (5.1875MB)
     NewRatio         = 2
     SurvivorRatio    = 8
     PermSize         = 21757952 (20.75MB)
     MaxPermSize      = 268435456 (256.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(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at sun.tools.jmap.JMap.runTool(JMap.java:197)
          at sun.tools.jmap.JMap.main(JMap.java:128)
  Caused by: java.lang.RuntimeException: unknown CollectedHeap type : class sun.jvm.hotspot.gc_interface.CollectedHeap
          at sun.jvm.hotspot.tools.HeapSummary.run(HeapSummary.java:146)
          at sun.jvm.hotspot.tools.Tool.start(Tool.java:221)
          at sun.jvm.hotspot.tools.HeapSummary.main(HeapSummary.java:40)
          ... 6 more

  
  The last version before we noticed that bug was:
  7u91-2.6.3-0ubuntu0.14.04.1

  Not 100% sure that this exact version still worked but quite sure.

  We could reproduce the issue in 2 different servers both running 14.04
  LTS 64bit

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/1548434/+subscriptions


References