TTL 的 java agent 模式与dragonwell 的 eagerappcds有冲突

Author: CodeWeaver13Created May 7, 2024Updated Jun 20, 2024
Labels😖 no runnable reproducible demo 😵ttl agent

eagerappcds 在 trace 阶段正常,replay 阶段会出现Bootstrap loader class path中期望的 jar 顺序与实际顺序不一致的情况。

bash
java -server -javaagent:/transmittable-thread-local-2.13.0-SNAPSHOT.jar -XX:-OmitStackTraceInFastThrow -XX:+TraceClassPaths -Xquickstart:path=/root/alibaba.quickstart.sharedcache  -Xquickstart:verbose -Dzeusrpc-appkey=moqipobing.wanba.report -Dwb.appname=report -Dserver.port=80 -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Dmicroserver.host=0.0.0.0 -Dmicroserver.port=80 -Dlog4j.log.dir=80 -Dmicroserver.maxThreads=400 -Dmicroserver.minThreads=50 -Dmicroserver.queueCapacity=12000 -Dmicroserver.queueGrowBy=100 -Dfastjson.parser.safeMode=true -Dwb.env=develop -jar /tmp/test.jar
[classpath: /tmp/test.jar]
cache path is set from -Xquickstart:path=/root/alibaba.quickstart.sharedcache
Running as replayer
[Bootstrap loader class path=/jw/dragonwell-8.18.19/jre/lib/resources.jar:/jw/dragonwell-8.18.19/jre/lib/rt.jar:/jw/dragonwell-8.18.19/jre/lib/sunrsasign.jar:/jw/dragonwell-8.18.19/jre/lib/jsse.jar:/jw/dragonwell-8.18.19/jre/lib/jce.jar:/jw/dragonwell-8.18.19/jre/lib/charsets.jar:/jw/dragonwell-8.18.19/jre/lib/jfr.jar:/jw/dragonwell-8.18.19/jre/classes:/jw/dragonwell-8.18.19/jre/lib/amd64/serverless/serverless-adapter.jar:/transmittable-thread-local-2.13.0-SNAPSHOT.jar]
[type=BOOT Expecting -Dsun.boot.class.path=/jw/dragonwell-8.18.19/jre/lib/resources.jar:/jw/dragonwell-8.18.19/jre/lib/rt.jar:/jw/dragonwell-8.18.19/jre/lib/sunrsasign.jar:/jw/dragonwell-8.18.19/jre/lib/jsse.jar:/jw/dragonwell-8.18.19/jre/lib/jce.jar:/jw/dragonwell-8.18.19/jre/lib/charsets.jar:/jw/dragonwell-8.18.19/jre/lib/jfr.jar:/jw/dragonwell-8.18.19/jre/classes:/jw/dragonwell-8.18.19/jre/lib/amd64/serverless/serverless-adapter.jar]
[BOOT classpath mismatch, actual: -Dsun.boot.class.path=/jw/dragonwell-8.18.19/jre/lib/resources.jar:/jw/dragonwell-8.18.19/jre/lib/rt.jar:/jw/dragonwell-8.18.19/jre/lib/sunrsasign.jar:/jw/dragonwell-8.18.19/jre/lib/jsse.jar:/jw/dragonwell-8.18.19/jre/lib/jce.jar:/jw/dragonwell-8.18.19/jre/lib/charsets.jar:/jw/dragonwell-8.18.19/jre/lib/jfr.jar:/jw/dragonwell-8.18.19/jre/classes:/jw/dragonwell-8.18.19/jre/lib/amd64/serverless/serverless-adapter.jar:/transmittable-thread-local-2.13.0-SNAPSHOT.jar]
An error has occurred while processing the shared archive file.
shared class paths mismatch (hint: enable -XX:+TraceClassPaths to diagnose the failure)
Error occurred during initialization of VM
Unable to use shared archive.

Source: alibaba/transmittable-thread-local