java-tree-sitter icon indicating copy to clipboard operation
java-tree-sitter copied to clipboard

JVM Crash (SIGSEGV) in G1 GC Barrier when using java-tree-sitter on Alibaba Dragonwell JDK 17

Open yyh834771838 opened this issue 3 months ago • 1 comments

When I used tree sitter to parse a cpp class in a java project, a JVM crash occurred. The contents of the hs_err_pid file were as follows:

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x00007f4180a18d91, pid=3291, tid=5887

JRE version: OpenJDK Runtime Environment (Alibaba Dragonwell)-17.0.2.0.2+8-GA (17.0.2+8) (build 17.0.2+8) Java VM: OpenJDK 64-Bit Server VM (Alibaba Dragonwell)-17.0.2.0.2+8-GA (17.0.2+8, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64) Problematic frame: V [libjvm.so+0x293d91] AccessInternal::PostRuntimeDispatch<G1BarrierSet::AccessBarrier<548964ul, G1BarrierSet>, (AccessInternal::BarrierType)2, 548964ul>::oop_access_barrier(void*)+0x1

Core dump will be written. Default location: Core dumps may be processed with "/opt/coredump/coreWriter %P %e %t" (or dumping to /home/admin/mtl4-admin/target/core.3291)

If you would like to submit a bug report, please visit: mailto:[email protected]

--------------- S U M M A R Y ------------

Command Line: -Dpandora.fast.classloader=true -Xms12g -Xmx12g -Xmn2g -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=1024m -XX:MaxDirectMemorySize=1g -XX:SurvivorRatio=10 -XX:+UseG1GC -Xlog:gc:file=/home/admin/logs/gc.log:time,level,tags -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/admin/logs/java.hprof -Djava.awt.headless=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=30000 -DJM.LOG.PATH=/home/admin/logs -DJM.SNAPSHOT.PATH=/home/admin/snapshots -Dfile.encoding=UTF-8 -Dhsf.publish.delayed=true -Dmetaq.client.delayStartConsumer=true -Dproject.name=mtl4-admin -Dpandora.boot.wait=true -Dlog4j.defaultInitOverride=true -Dserver.port=7001 -Dmanagement.port=7002 --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-exports=java.base/sun.util.calendar=ALL-UNNAMED --add-exports=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/sun.net.util=ALL-UNNAMED --add-opens=java.base/java.math=ALL-UNNAMED --add-opens=java.base/sun.security.action=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/sun.net.www=ALL-UNNAMED --add-opens=java.base/sun.nio=ALL-UNNAMED -agentlib:jdwp=transport=dt_socket,address=*:8000,server=y,suspend=n -Dpandora.location=/home/admin/mtl4-admin/target/taobao-hsf.sar -Dapp.location=/home/admin/mtl4-admin/target/mtl4-admin -Djava.endorsed.dirs= -Djava.io.tmpdir=/home/admin/mtl4-admin/.default/temp com.taobao.pandora.boot.loader.SarLauncher

Host: Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz, 96 cores, 16G, Alibaba Group Enterprise Linux Server release 7.2 (Paladin) Time: Thu Oct 9 20:52:33 2025 CST elapsed time: 2815.659779 seconds (0d 0h 46m 55s)

--------------- T H R E A D ---------------

Current thread (0x00007f41051643f0): JavaThread "file-processor-1760012167027" daemon [_thread_in_vm, id=5887, stack(0x00007f3ff214a000,0x00007f3ff224b000)]

Stack: [0x00007f3ff214a000,0x00007f3ff224b000], sp=0x00007f3ff21624a0, free space=97k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x293d91] AccessInternal::PostRuntimeDispatch<G1BarrierSet::AccessBarrier<548964ul, G1BarrierSet>, (AccessInternal::BarrierType)2, 548964ul>::oop_access_barrier(void*)+0x1

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) J 32751 ch.usi.si.seart.treesitter.Node.getChildren(Lch/usi/si/seart/treesitter/Node;Z)[Lch/usi/si/seart/treesitter/Node; (0 bytes) @ 0x00007f416e47f71a [0x00007f416e47f6c0+0x000000000000005a] J 42910 c2 com.alibaba.emas.agent.tools.code.treesitter.CppTreeSitter.parseClass(Lch/usi/si/seart/treesitter/Node;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List; (251 bytes) @ 0x00007f416f055a54 [0x00007f416f054f40+0x0000000000000b14] J 42910 c2 com.alibaba.emas.agent.tools.code.treesitter.CppTreeSitter.parseClass(Lch/usi/si/seart/treesitter/Node;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List; (251 bytes) @ 0x00007f416f056f88 [0x00007f416f054f40+0x0000000000002048] J 42910 c2 com.alibaba.emas.agent.tools.code.treesitter.CppTreeSitter.parseClass(Lch/usi/si/seart/treesitter/Node;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List; (251 bytes) @ 0x00007f416f056f88 [0x00007f416f054f40+0x0000000000002048] J 42910 c2 com.alibaba.emas.agent.tools.code.treesitter.CppTreeSitter.parseClass(Lch/usi/si/seart/treesitter/Node;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List; (251 bytes) @ 0x00007f416f056f88 [0x00007f416f054f40+0x0000000000002048] J 42910 c2 com.alibaba.emas.agent.tools.code.treesitter.CppTreeSitter.parseClass(Lch/usi/si/seart/treesitter/Node;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List; (251 bytes) @ 0x00007f416f056f88 [0x00007f416f054f40+0x0000000000002048] J 42910 c2 com.alibaba.emas.agent.tools.code.treesitter.CppTreeSitter.parseClass(Lch/usi/si/seart/treesitter/Node;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List; (251 bytes) @ 0x00007f416f056f88 [0x00007f416f054f40+0x0000000000002048] J 42910 c2 com.alibaba.emas.agent.tools.code.treesitter.CppTreeSitter.parseClass(Lch/usi/si/seart/treesitter/Node;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List; (251 bytes) @ 0x00007f416f056f88 [0x00007f416f054f40+0x0000000000002048] J 42910 c2 com.alibaba.emas.agent.tools.code.treesitter.CppTreeSitter.parseClass(Lch/usi/si/seart/treesitter/Node;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List; (251 bytes) @ 0x00007f416f056f88 [0x00007f416f054f40+0x0000000000002048] J 42910 c2 com.alibaba.emas.agent.tools.code.treesitter.CppTreeSitter.parseClass(Lch/usi/si/seart/treesitter/Node;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List; (251 bytes) @ 0x00007f416f056f88 [0x00007f416f054f40+0x0000000000002048] J 42910 c2 com.alibaba.emas.agent.tools.code.treesitter.CppTreeSitter.parseClass(Lch/usi/si/seart/treesitter/Node;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List; (251 bytes) @ 0x00007f416f056f88 [0x00007f416f054f40+0x0000000000002048] J 42910 c2 com.alibaba.emas.agent.tools.code.treesitter.CppTreeSitter.parseClass(Lch/usi/si/seart/treesitter/Node;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List; (251 bytes) @ 0x00007f416f056f88 [0x00007f416f054f40+0x0000000000002048] J 42910 c2 com.alibaba.emas.agent.tools.code.treesitter.CppTreeSitter.parseClass(Lch/usi/si/seart/treesitter/Node;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List; (251 bytes) @ 0x00007f416f056f88 [0x00007f416f054f40+0x0000000000002048] J 42910 c2 com.alibaba.emas.agent.tools.code.treesitter.CppTreeSitter.parseClass(Lch/usi/si/seart/treesitter/Node;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List; (251 bytes) @ 0x00007f416f056f88 [0x00007f416f054f40+0x0000000000002048] J 42910 c2 com.alibaba.emas.agent.tools.code.treesitter.CppTreeSitter.parseClass(Lch/usi/si/seart/treesitter/Node;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List; (251 bytes) @ 0x00007f416f056f88 [0x00007f416f054f40+0x0000000000002048] J 42910 c2 com.alibaba.emas.agent.tools.code.treesitter.CppTreeSitter.parseClass(Lch/usi/si/seart/treesitter/Node;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List; (251 bytes) @ 0x00007f416f056f88 [0x00007f416f054f40+0x0000000000002048]

yyh834771838 avatar Oct 10 '25 08:10 yyh834771838

This issue is stale because it has been open for 30 days with no activity.

seart-bot avatar Nov 10 '25 01:11 seart-bot

This issue was closed because it has been inactive for 14 days since being marked as stale.

seart-bot avatar Nov 24 '25 01:11 seart-bot