Issue Summary

      This is a continuation of the bug reported in JSDSERVER-7387. A fix was released in 1.6.9 but we're seeing the behavior continue in this version
      Insight Macro for Confluence can cause a JVM crash when processing large exports

      Steps to Reproduce

      1. Full steps for setting up a test instance to reproduce can be found in JSDSERVER-7387
      2. In the current case, 900+ objects are being exported

      Expected Results

      The export should complete without crashing JVM or should fail gracefully

      Actual Results

      JVM(confluence) crashes shortly after starting the export

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      #  SIGILL (0x4) at pc=0x00007f0e44652a19, pid=31453, tid=32351
      #
      # JRE version: Java(TM) SE Runtime Environment 18.9 (11.0.12+8) (build 11.0.12+8-LTS-237)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM 18.9 (11.0.12+8-LTS-237, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
      # Problematic frame:
      # C  [libj2v8_linux_x86_64.so+0xae3a19]  v8::base::OS::Abort()+0x9
      #
      # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
      #
      # If you would like to submit a bug report, please visit:
      #   https://bugreport.java.com/bugreport/crash.jsp
      # The crash happened outside the Java Virtual Machine in native code.
      # See problematic frame for where to report the bug.
      #
      
      ---------------  S U M M A R Y ------------
      
      Command Line: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Djava.util.logging.config.file=/apps/7.4.11/opt/atlassian/confluence/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dplugin.jira-integration.remote.timeout.socket=60000 -Dplugin.jira-integration.remote.timeout.connection=60000 -Datlassian.http.connection.timeout=60000 -Datlassian.http.socket.timeout=60000 -Dhttp.socket.timeout=60000 -Dcom.atlassian.seraph.auth.contextThreadPrefix=Caesium -XX:-OmitStackTraceInFastThrow -Dconfluence.upgrade.recovery.file.enabled=false -Dconfluence.document.conversion.threads=2 -Dfile.encoding=UTF-8 -XX:+DisableExplicitGC -Dconfluence.cluster.node.name=conf1-prd-a3 -Dhazelcast.health.monitoring.level=NOISY -Dconfluence.clickjacking.protection.disable=true -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/apps/heap -XX:ReservedCodeCacheSize=768m -XX:+UseCodeCacheFlushing -Djdk.tls.server.protocols=TLSv1.1,TLSv1.2 -Djdk.tls.client.protocols=TLSv1.1,TLSv1.2 -Dconfluence.context.path= -Datlassian.plugins.startup.options= -Djava.locale.providers=JRE,SPI,CLDR -Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 -Xms20G -Xmx20G -XX:+UseG1GC -Datlassian.plugins.enable.wait=300 -Djava.awt.headless=true -XX:G1ReservePercent=20 -Xloggc:/apps/7.4.11/opt/atlassian/confluence/logs/gc-2021-11-09_11-25-33.log -Xlog:gc*,gc+age*=trace:file=/apps/7.4.11/opt/atlassian/confluence/logs/gc-2021-11-09_11-25-33.log:tags,time,uptime,level::filecount=5,filesize=2M -XX:+PrintGCApplicationStoppedTime -XX:+IgnoreUnrecognizedVMOptions -Dignore.endorsed.dirs= -Dcatalina.base=/apps/7.4.11/opt/atlassian/confluence -Dcatalina.home=/apps/7.4.11/opt/atlassian/confluence -Djava.io.tmpdir=/apps/7.4.11/opt/atlassian/confluence/temp org.apache.catalina.startup.Bootstrap start
      
      Host: Intel(R) Xeon(R) Gold 6248R CPU @ 3.00GHz, 24 cores, 39G, CentOS Linux release 7.9.2009 (Core)
      Time: Tue Nov  9 19:10:41 2021 PST elapsed time: 27908.154823 seconds (0d 7h 45m 8s)
      
      ---------------  T H R E A D  ---------------
      
      Current thread (0x00007f11f9ac0000):  JavaThread "http-nio2-8091-exec-12 url: /rest/table-filter/1.0/service/export-hash; user: xxx" daemon [_thread_in_native, id=32351, stack(0x00007f0e7754a000,0x00007f0e7764b000)]
      
      Stack: [0x00007f0e7754a000,0x00007f0e7764b000],  sp=0x00007f0e776403c8,  free space=984k
      Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
      C  [libj2v8_linux_x86_64.so+0xae3a19]  v8::base::OS::Abort()+0x9
      C  [libj2v8_linux_x86_64.so+0x48efa5]  v8::internal::V8::FatalProcessOutOfMemory(char const*, bool)+0x1d5
      C  [libj2v8_linux_x86_64.so+0x54bf19]  v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace)+0x159
      C  [libj2v8_linux_x86_64.so+0x8afc6e]  v8::internal::Runtime_AllocateInTargetSpace(int, v8::internal::Object**, v8::internal::Isolate*)+0x5e
      C  0x00003d4f86b06295
      C  0x00003d4f86b32ab0
      C  0x00003d4f86c77234
      C  0x00003d4f86c764ee
      C  0x00003d4f86c75659
      C  0x00003d4f86c74fc6
      C  0x00003d4f86b19d7d
      C  0x00003d4f86b18ba2
      C  [libj2v8_linux_x86_64.so+0x5427f0]  v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*, bool)+0x120
      C  [libj2v8_linux_x86_64.so+0x4996f7]  v8::Script::Run(v8::Local<v8::Context>)+0x137
      C  [libj2v8_linux_x86_64.so+0x4a4fb4]  v8::Script::Run()+0x34
      C  [libj2v8_linux_x86_64.so+0x3f687a]  runScript(v8::Isolate*, JNIEnv_*, v8::Local<v8::Script>*, v8::TryCatch*, v8::Local<v8::Value>&, long)+0x37
      C  [libj2v8_linux_x86_64.so+0x3f78df]  Java_com_eclipsesource_v8_V8__1executeStringScript+0x255
      j  com.eclipsesource.v8.V8._executeStringScript(JLjava/lang/String;Ljava/lang/String;I)Ljava/lang/String;+0
      j  com.eclipsesource.v8.V8.executeStringScript(JLjava/lang/String;Ljava/lang/String;I)Ljava/lang/String;+7
      j  com.eclipsesource.v8.V8.executeStringScript(Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;+16
      j  com.eclipsesource.v8.V8.executeStringScript(Ljava/lang/String;)Ljava/lang/String;+4
      j  com.mindville.confluence.plugins.insight.export.ExportRenderer.render(Ljava/util/Map;)Ljava/lang/String;+713
      j  com.mindville.confluence.plugins.insight.InsightObjectsMacro.execute(Ljava/util/Map;Ljava/lang/String;Lcom/atlassian/confluence/content/render/xhtml/ConversionContext;)Ljava/lang/String;+186
      

      Workaround

      Currently there is no known workaround for this behavior beyond disabling the export or the plugin. A workaround will be added here when available

            [JSDSERVER-10878] Insight Macro for Confluence causes JVM crash

              e2606e2cc12b Oleh Dibrov (Inactive)
              34e46ad8c98b Branden Miars
              Affected customers:
              12 This affects my team
              Watchers:
              24 Start watching this issue

                Created:
                Updated:
                Resolved: