Please fix native memory tracking

Bug #2012326 reported by Vladimir Petko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openjdk-17 (Ubuntu)
Fix Released
Undecided
Unassigned
openjdk-20 (Ubuntu)
Fix Released
Undecided
Unassigned
openjdk-21 (Ubuntu)
Fix Released
Undecided
Unassigned
openjdk-lts (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

We already have an issue with NMT dumps callsites are not resolved (openjdk-jdk and openjdk-xxx-dbg are installed).

/usr/lib/jvm/java-11-openjdk-amd64/bin/java -XX:NativeMemoryTracking=detail -cp . infinite&
[1] 4739
/usr/lib/jvm/java-11-openjdk-amd64/bin/jcmd 4739 VM.native_memory detail
----------------------------------------------------------cut------------------------------
4739:

Native Memory Tracking:

Total: reserved=2415496KB, committed=131892KB
- Java Heap (reserved=1005568KB, committed=65536KB)
                            (mmap: reserved=1005568KB, committed=65536KB)

- Class (reserved=1056874KB, committed=4970KB)
                            (classes #478)
                            ( instance classes #413, array classes #65)
                            (malloc=106KB #517)
                            (mmap: reserved=1056768KB, committed=4864KB)
                            ( Metadata: )
                            ( reserved=8192KB, committed=4352KB)
                            ( used=146KB)
                            ( free=4206KB)
                            ( waste=0KB =0.00%)
                            ( Class space:)
                            ( reserved=1048576KB, committed=512KB)
                            ( used=5KB)
                            ( free=507KB)
                            ( waste=0KB =0.00%)

- Thread (reserved=17486KB, committed=842KB)
                            (thread #17)
                            (stack: reserved=17408KB, committed=764KB)
                            (malloc=60KB #104)
                            (arena=18KB #32)

- Code (reserved=247724KB, committed=7584KB)
                            (malloc=36KB #394)
                            (mmap: reserved=247688KB, committed=7548KB)

- GC (reserved=74681KB, committed=39797KB)
                            (malloc=4465KB #704)
                            (mmap: reserved=70216KB, committed=35332KB)

- Compiler (reserved=136KB, committed=136KB)
                            (malloc=4KB #51)
                            (arena=133KB #5)

- Internal (reserved=556KB, committed=556KB)
                            (malloc=524KB #931)
                            (mmap: reserved=32KB, committed=32KB)

- Symbol (reserved=1038KB, committed=1038KB)
                            (malloc=678KB #16)
                            (arena=360KB #1)

- Native Memory Tracking (reserved=276KB, committed=276KB)
                            (malloc=166KB #2361)
                            (tracking overhead=110KB)

- Shared class space (reserved=10872KB, committed=10872KB)
                            (mmap: reserved=10872KB, committed=10872KB)

- Arena Chunk (reserved=173KB, committed=173KB)
                            (malloc=173KB)

- Logging (reserved=4KB, committed=4KB)
                            (malloc=4KB #192)

- Arguments (reserved=18KB, committed=18KB)
                            (malloc=18KB #489)

- Module (reserved=59KB, committed=59KB)
                            (malloc=59KB #1043)

- Synchronizer (reserved=21KB, committed=21KB)
                            (malloc=21KB #177)

- Safepoint (reserved=8KB, committed=8KB)
                            (mmap: reserved=8KB, committed=8KB)

Virtual memory map:

[0x00000000c2a00000 - 0x0000000100000000] reserved 1005568KB for Java Heap from
    [0x00007fb273aa1b0f]
    [0x00007fb273aa281c]
    [0x00007fb273aa2abe]
    [0x00007fb273a647e2]

 [0x00000000c2a00000 - 0x00000000c6800000] committed 63488KB from
            [0x00007fb273397e45]
            [0x00007fb273398228]
            [0x00007fb2733a34a7]
            [0x00007fb2734288b8]

 [0x00000000ffe00000 - 0x00000000ffe48000] committed 288KB from
----------------------------------------------------------cut------------------------------

Tags: fr-3688

Related branches

Revision history for this message
Vladimir Petko (vpa1977) wrote :

Note, this is an issue caused by the stripped symbols, temurin build does not strip them.

no longer affects: openjdk-11 (Ubuntu)
description: updated
tags: added: fr-3688
Revision history for this message
Vladimir Petko (vpa1977) wrote :
Download full text (98.9 KiB)

Expected output:
--------------------------cut--------------------------------------
./bin/jcmd 201706 VM.native_memory detail
201706:

Native Memory Tracking:

(Omitting categories weighting less than 1KB)

Total: reserved=18269442KB, committed=1176934KB
       malloc: 51606KB #5827
       mmap: reserved=18217836KB, committed=1125328KB

- Java Heap (reserved=16244736KB, committed=1032192KB)
                            (mmap: reserved=16244736KB, committed=1032192KB)

- Class (reserved=1048651KB, committed=203KB)
                            (classes #484)
                            ( instance classes #400, array classes #84)
                            (malloc=75KB #519)
                            (mmap: reserved=1048576KB, committed=128KB)
                            ( Metadata: )
                            ( reserved=8192KB, committed=192KB)
                            ( used=70KB)
                            ( waste=122KB =63.56%)
                            ( Class space:)
                            ( reserved=1048576KB, committed=128KB)
                            ( used=3KB)
                            ( waste=125KB =97.41%)

- Thread (reserved=19506KB, committed=830KB)
                            (thread #19)
                            (stack: reserved=19456KB, committed=780KB)
                            (malloc=30KB #118)
                            (arena=20KB #36)

- Code (reserved=247726KB, committed=7586KB)
                            (malloc=38KB #595)
                            (mmap: reserved=247688KB, committed=7548KB)

- GC (reserved=686398KB, committed=121870KB)
                            (malloc=49542KB #648)
                            (mmap: reserved=636856KB, committed=72328KB)

- Compiler (reserved=167KB, committed=167KB)
                            (malloc=3KB #20)
                            (arena=165KB #5)

- Internal (reserved=192KB, committed=192KB)
                            (malloc=156KB #1169)
                            (mmap: reserved=36KB, committed=36KB)

- Symbol (reserved=1131KB, committed=1131KB)
                            (malloc=771KB #50)
                            (arena=360KB #1)

- Native Memory Tracking (reserved=217KB, committed=217KB)
                            (malloc=126KB #1791)
                            (tracking overhead=91KB)

- Shared class space (reserved=12288KB, committed=12116KB)
                            (mmap: reserved=12288KB, committed=12116KB)

- Arena Chunk (reserved=175KB, committed=175KB)
                            (malloc=175KB)

- Module (reserved=13KB, committed=13KB)
                            (malloc=13KB #401)

- Safepoint (reserved=8KB, committed=8KB)
                            (mmap: reserved=8KB, committed=8KB)

- Synchronization (reserved=30KB, committed=30KB)
                            (malloc=30KB #423)

- Serviceability (reserved=1KB, committed=1KB)
           ...

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openjdk-lts - 11.0.19+7~us1-0ubuntu1~23.04

---------------
openjdk-lts (11.0.19+7~us1-0ubuntu1~23.04) lunar-security; urgency=medium

  * Upload to Ubuntu 23.04.

openjdk-lts (11.0.19+7~us1-0ubuntu1) mantic; urgency=medium

  * OpenJDK 11.0.19 release, build 7.
    - CVE-2023-21930, CVE-2023-21937, CVE-2023-21938, CVE-2023-21939,
      CVE-2023-21954, CVE-2023-21967, CVE-2023-21968.
    - Release notes:
      https://mail.openjdk.org/pipermail/jdk-updates-dev/2023-April/021900.html
    - d/p/*: refresh patches.
  * d/rules: pack external debug symbols with build-id, do not pack duplicate
    symbols, do not strip JVM shared libraries (LP: #2012326, LP: #2016739).
  * d/rules: always use jtreg6.

 -- Vladimir Petko <email address hidden> Sat, 06 May 2023 12:26:45 +0200

Changed in openjdk-lts (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openjdk-lts - 11.0.19+7~us1-0ubuntu1~22.10.1

---------------
openjdk-lts (11.0.19+7~us1-0ubuntu1~22.10.1) kinetic-security; urgency=medium

  * Upload to Ubuntu 22.10.

openjdk-lts (11.0.19+7~us1-0ubuntu1) mantic; urgency=medium

  * OpenJDK 11.0.19 release, build 7.
    - CVE-2023-21930, CVE-2023-21937, CVE-2023-21938, CVE-2023-21939,
      CVE-2023-21954, CVE-2023-21967, CVE-2023-21968.
    - Release notes:
      https://mail.openjdk.org/pipermail/jdk-updates-dev/2023-April/021900.html
    - d/p/*: refresh patches.
  * d/rules: pack external debug symbols with build-id, do not pack duplicate
    symbols, do not strip JVM shared libraries (LP: #2012326, LP: #2016739).
  * d/rules: always use jtreg6.

 -- Vladimir Petko <email address hidden> Wed, 10 May 2023 09:03:48 +1200

Changed in openjdk-lts (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openjdk-lts - 11.0.19+7~us1-0ubuntu1~22.04.1

---------------
openjdk-lts (11.0.19+7~us1-0ubuntu1~22.04.1) jammy-security; urgency=medium

  * Upload to Ubuntu 22.04.

openjdk-lts (11.0.19+7~us1-0ubuntu1) mantic; urgency=medium

  * OpenJDK 11.0.19 release, build 7.
    - CVE-2023-21930, CVE-2023-21937, CVE-2023-21938, CVE-2023-21939,
      CVE-2023-21954, CVE-2023-21967, CVE-2023-21968.
    - Release notes:
      https://mail.openjdk.org/pipermail/jdk-updates-dev/2023-April/021900.html
    - d/p/*: refresh patches.
  * d/rules: pack external debug symbols with build-id, do not pack duplicate
    symbols, do not strip JVM shared libraries (LP: #2012326, LP: #2016739).
  * d/rules: always use jtreg6.

 -- Vladimir Petko <email address hidden> Wed, 10 May 2023 09:03:04 +1200

Changed in openjdk-lts (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openjdk-17 - 17.0.7+7~us1-0ubuntu1~23.04

---------------
openjdk-17 (17.0.7+7~us1-0ubuntu1~23.04) lunar-security; urgency=medium

  * Upload to Ubuntu 23.04.

openjdk-17 (17.0.7+7~us1-0ubuntu1) mantic; urgency=medium

  * OpenJDK 17.0.7 release, build 7.
    - CVE-2023-21930, CVE-2023-21937, CVE-2023-21938, CVE-2023-21939,
      CVE-2023-21954, CVE-2023-21967, CVE-2023-21968.
    - Release notes:
      https://mail.openjdk.org/pipermail/jdk-updates-dev/2023-April/021899.html
  * d/rules: update jquery to 3.6.1.
  * d/p/*: refresh patches.
  * d/rules: pack external debug symbols with build-id, do not pack duplicate
    symbols, do not strip JVM shared libraries (LP: #2012326, LP: #2016739).
  * d/p/system-pcsclite.diff: disable built-in pcsclite version assertion.
  * d/rules: always use jtreg6.
  * d/rules: only compile google tests when with_check is enabled, disable them
    for bullseye and jammy.

 -- Vladimir Petko <email address hidden> Sat, 06 May 2023 12:03:41 +0200

Changed in openjdk-17 (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openjdk-17 - 17.0.7+7~us1-0ubuntu1~22.10.2

---------------
openjdk-17 (17.0.7+7~us1-0ubuntu1~22.10.2) kinetic-security; urgency=medium

  * Upload to Ubuntu 22.10.

openjdk-17 (17.0.7+7~us1-0ubuntu1) mantic; urgency=medium

  * OpenJDK 17.0.7 release, build 7.
    - CVE-2023-21930, CVE-2023-21937, CVE-2023-21938, CVE-2023-21939,
      CVE-2023-21954, CVE-2023-21967, CVE-2023-21968.
    - Release notes:
      https://mail.openjdk.org/pipermail/jdk-updates-dev/2023-April/021899.html
  * d/rules: update jquery to 3.6.1.
  * d/p/*: refresh patches.
  * d/rules: pack external debug symbols with build-id, do not pack duplicate
    symbols, do not strip JVM shared libraries (LP: #2012326, LP: #2016739).
  * d/p/system-pcsclite.diff: disable built-in pcsclite version assertion.
  * d/rules: always use jtreg6.
  * d/rules: only compile google tests when with_check is enabled, disable them
    for bullseye and jammy.

 -- Vladimir Petko <email address hidden> Wed, 10 May 2023 15:45:23 +1200

Changed in openjdk-17 (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openjdk-17 - 17.0.7+7~us1-0ubuntu1~22.04.2

---------------
openjdk-17 (17.0.7+7~us1-0ubuntu1~22.04.2) jammy-security; urgency=medium

  * Upload to Ubuntu 22.04.

openjdk-17 (17.0.7+7~us1-0ubuntu1) mantic; urgency=medium

  * OpenJDK 17.0.7 release, build 7.
    - CVE-2023-21930, CVE-2023-21937, CVE-2023-21938, CVE-2023-21939,
      CVE-2023-21954, CVE-2023-21967, CVE-2023-21968.
    - Release notes:
      https://mail.openjdk.org/pipermail/jdk-updates-dev/2023-April/021899.html
  * d/rules: update jquery to 3.6.1.
  * d/p/*: refresh patches.
  * d/rules: pack external debug symbols with build-id, do not pack duplicate
    symbols, do not strip JVM shared libraries (LP: #2012326, LP: #2016739).
  * d/p/system-pcsclite.diff: disable built-in pcsclite version assertion.
  * d/rules: always use jtreg6.
  * d/rules: only compile google tests when with_check is enabled, disable them
    for bullseye and jammy.

 -- Vladimir Petko <email address hidden> Wed, 10 May 2023 15:46:43 +1200

Changed in openjdk-17 (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openjdk-20 - 20.0.1+9~us1-0ubuntu1~23.04

---------------
openjdk-20 (20.0.1+9~us1-0ubuntu1~23.04) lunar-security; urgency=medium

  * Upload to Ubuntu 23.04.

openjdk-20 (20.0.1+9~us1-0ubuntu1) mantic; urgency=medium

  * OpenJDK 20.0.1 release, build 9.
    - CVE-2023-21930, CVE-2023-21937, CVE-2023-21938, CVE-2023-21939,
      CVE-2023-21954, CVE-2023-21967, CVE-2023-21968.
    - Release notes:
      https://adoptium.net/en-GB/temurin/release-notes/?version=jdk-20.0.1+9
  * d/p/*: refresh patches.
  * d/watch: update version format for the security release.
  * d/rules: pack external debug symbols with build-id, do not pack duplicate
    symbols, do not strip JVM shared libraries (LP: #2012326, LP: #2016739).
  * d/rules: disable jtreg tests in kinetic, no jtreg7 package.
  * d/rules: only compile google tests when with_check is enabled, disable them
    for bullseye and jammy.

 -- Vladimir Petko <email address hidden> Sat, 06 May 2023 13:22:21 +0200

Changed in openjdk-20 (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openjdk-20 - 20.0.1+9~us1-0ubuntu1~22.10

---------------
openjdk-20 (20.0.1+9~us1-0ubuntu1~22.10) kinetic-security; urgency=medium

  * Upload to Ubuntu 22.10.

openjdk-20 (20.0.1+9~us1-0ubuntu1) mantic; urgency=medium

  * OpenJDK 20.0.1 release, build 9.
    - CVE-2023-21930, CVE-2023-21937, CVE-2023-21938, CVE-2023-21939,
      CVE-2023-21954, CVE-2023-21967, CVE-2023-21968.
    - Release notes:
      https://adoptium.net/en-GB/temurin/release-notes/?version=jdk-20.0.1+9
  * d/p/*: refresh patches.
  * d/watch: update version format for the security release.
  * d/rules: pack external debug symbols with build-id, do not pack duplicate
    symbols, do not strip JVM shared libraries (LP: #2012326, LP: #2016739).
  * d/rules: disable jtreg tests in kinetic, no jtreg7 package.
  * d/rules: only compile google tests when with_check is enabled, disable them
    for bullseye and jammy.

 -- Vladimir Petko <email address hidden> Sat, 06 May 2023 13:21:05 +0200

Changed in openjdk-20 (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openjdk-21 - 21~28ea-1

---------------
openjdk-21 (21~28ea-1) unstable; urgency=medium

  * OpenJDK 21 snapshot, Build 28.
  * Add support for alpha, m68k, ppc, sh, x32.

 -- Matthias Klose <email address hidden> Mon, 26 Jun 2023 07:48:49 +0200

Changed in openjdk-21 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.