JLink-generated image is extremely large

Bug #2003820 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-lts (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Sample project:
https://github.com/beryx-gist/badass-jlink-example

clone it and produce a jlink image with

`./gradlew jlink`

the image uses 300+ mb
`
vladimirp@vladimirp:~/git/rocks/badass-jlink-example$ du -h build/image
4.0K build/image/legal/java.naming
4.0K build/image/legal/java.logging
52K build/image/legal/java.xml
4.0K build/image/legal/java.security.sasl
76K build/image/legal/java.base
144K build/image/legal
348K build/image/lib/security
326M build/image/lib/server
292K build/image/lib/jli
343M build/image/lib
64K build/image/bin
16K build/image/conf/security/policy/limited
12K build/image/conf/security/policy/unlimited
36K build/image/conf/security/policy
104K build/image/conf/security
120K build/image/conf
343M build/image
`

This is caused by https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/574997

Temurin build of openjdk uses --with-native-debug-symbols=none.

I have validated jmap with openjdk-11 and can confirm that jmap works when the jdk is compiled with the setting above.

Tags: fr-3281 lunar

Related branches

Revision history for this message
Vladimir Petko (vpa1977) wrote :
tags: added: lunar
description: updated
tags: added: fr-3281
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openjdk-20 - 20~36ea~us1-0ubuntu2

---------------
openjdk-20 (20~36ea~us1-0ubuntu2) lunar; urgency=medium

  * d/p: drop obsolete patches (LP: #2011653).
    - generated-headers.patch: include is already added by openjdk makefile.
  * d/rules: use --with-debug-symbols=none (LP: #2003820).

 -- Vladimir Petko <email address hidden> Thu, 16 Mar 2023 16:59:11 +1300

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-17 - 17.0.6+10-1ubuntu2

---------------
openjdk-17 (17.0.6+10-1ubuntu2) lunar; urgency=medium

  * d/p: drop obsolete patches (LP: #2011653).
    - workaround_expand_exec_shield_cs_limit.diff: obsoleted by
      hotspot-disable-exec-shield-workaround.diff.
    - generated-headers.patch: include is already added by openjdk makefile.
  * d/copyright, d/watch: implement uscan repackaging (LP: #2011749).
  * d/rules: use --with-debug-symbols=none (LP: #2003820).

 -- Vladimir Petko <email address hidden> Thu, 16 Mar 2023 15:04:36 +1300

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-lts - 11.0.18+10-0ubuntu4

---------------
openjdk-lts (11.0.18+10-0ubuntu4) lunar; urgency=medium

  * d/p: drop obsolete patches (LP: #2011653).
    - workaround_expand_exec_shield_cs_limit.diff: obsoleted by
      hotspot-disable-exec-shield-workaround.diff.
    - generated-headers.patch: include is already added by openjdk makefile.
    - parallel-build-fix.diff: include is not necessary.
  * d/copyright, d/watch: implement uscan repackaging (LP: #2011749).
  * d/rules: use --with-debug-symbols=none (LP: #2003820).

 -- Vladimir Petko <email address hidden> Thu, 16 Mar 2023 08:39:50 +1300

Changed in openjdk-lts (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

Bug attachments

Remote bug watches

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