Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-13974

Java Heap Space error when running Bootable JAR TS against WildFly 21

XMLWordPrintable

      While running internal TS tests which are dealing with Bootable JAR we noticed that a Java Heap Space error appears randomly and on different platforms, e.g.:

      ...
      19:04:49 [INFO] --- wildfly-jar-maven-plugin:2.0.0.Final-redhat-00001:package (wildfly-jar.cdi-jaxrs-jpa-jta.optimized) @ cdi-jaxrs-jpa-jta ---
      19:04:49 [INFO] Provisioning server using feature-packs
      19:04:49 [INFO] Provisioning server configuration based on the set of configured layers
      19:04:49 [INFO] Building server based on [[eap-mp@maven(org.jboss.universe:product-universe):current#2.0.0.GA-redhat-20201013-1 inherit-packages=false inheritConfigs=false]] galleon feature-packs
      19:04:49 [INFO] Found boot artifact org.jboss.eap:wildfly-jar-boot:jar:2.0.0.GA-redhat-20201013-1:provided in eap-mp@maven(org.jboss.universe:product-universe):current#2.0.0.GA-redhat-20201013-1
      19:04:53 [INFO] CLI executions are done in forked process
      19:04:53 [INFO] Executing CLI, Server configuration
      19:04:56 [INFO] CLI scripts execution done.
      ...
      19:05:07 [INFO] BUILD FAILURE
      19:05:07 [INFO] ------------------------------------------------------------------------
      19:05:07 [INFO] Total time:  07:22 min
      19:05:07 [INFO] Finished at: 2020-10-14T17:05:06Z
      19:05:07 [INFO] ------------------------------------------------------------------------
      19:05:07 [ERROR] Java heap space -> [Help 1]
      ...
      

      Form an early investigation by jbliznak@redhat.com it seems Galleon core
      org.jboss.galleon.util.ZipUtils is using default com.sun.nio.zipfs.ZipFileSystem implementation which seems to perform filesystem operations without buffering in some cases. This would for instance cause a +100 MB growth when wildfly.zip is added to JAR.

      This could be reproduced randomly with WildFly as well by explicitly setting Heap quota:

      export MAVEN_OPTS="-XX:+PrintFlagsFinal -Xmx1g"; mvn clean integration-test -Dversion.org.wildfly.jar.plugin=2.0.0.Final -Dmaven.repo.local=/tmp/local-repo-bootjar -Dtestsuite.galleon.pack.groupId=org.wildfly -Dtestsuite.galleon.pack.artifactId=wildfly-galleon-pack -Dtestsuite.galleon.pack.version=21.0.0.Final -Dinsecure.repositories=WARN -e
      

              jdenise@redhat.com Jean Francois Denise
              fburzigo Fabio Burzigotti
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: