Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wangshiyu13 opened this issue May 7, 2024 · 3 comments
Open
Labels
😖 no runnable reproducible demo 😵 please provide a simple runnable demo that reproduce the problem ttl agent

Comments

@wangshiyu13
Copy link

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

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.
@wangshiyu13 wangshiyu13 changed the title TTL 的 java agent 模式与dragonwell 的 eagerappcds有冲突 label:agent TTL 的 java agent 模式与dragonwell 的 eagerappcds有冲突 May 7, 2024
@wangshiyu13 wangshiyu13 changed the title label:agent TTL 的 java agent 模式与dragonwell 的 eagerappcds有冲突 TTL 的 java agent 模式与dragonwell 的 eagerappcds有冲突 May 7, 2024
@oldratlee
Copy link
Member

oldratlee commented May 7, 2024

@wangshiyu13 会不会加其它Java Agent(自动加bootclasspath)也有这个问题?

显式加上-Xbootclasspath/a:path/to/transmittable-thread-local-2.x.y.jar试试

@wangshiyu13
Copy link
Author

@wangshiyu13 会不会加其它java agent(会自动加bootclasspath)也有这个问题?

显式加上-Xbootclasspath/a:path/to/transmittable-thread-local-2.x.y.jar试试

测试过 otel 或者 skywalking 的 agent 没有冲突
显式加上 bootclasspath 会出现加载两次的问题,最后一样会报classpath mismatch

@oldratlee
Copy link
Member

oldratlee commented May 18, 2024

@wangshiyu13

  • 请提供一个 极简、可运行、复现问题的 代码Demo工程。
  • 包含 otel 或者 skywalking Agent 没有冲突。

推荐提供成一个单独的工程(GitHub repo)。这样可以:

  • 方便大家能排查分析;只提供片段代码、运行问题概述,排查信息不足
  • 方便分离不相关的业务实现内容,以及排除可能的业务使用问题
    如使用配置问题、其它业务代码的意外影响

@oldratlee oldratlee added 😖 no runnable reproducible demo 😵 please provide a simple runnable demo that reproduce the problem ttl agent labels May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
😖 no runnable reproducible demo 😵 please provide a simple runnable demo that reproduce the problem ttl agent
Projects
None yet
Development

No branches or pull requests

2 participants