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

[Conflict] 同时使用JacocoAgent参数和XquickStart参数启动时报错 #633

Open
Sugartx opened this issue May 10, 2024 · 6 comments
Open

Comments

@Sugartx
Copy link

Sugartx commented May 10, 2024

Description
当在启动参数中添加-javaagent:xxx/jacocoagent.jar=includes=,output=tcpserver,port=10000,address= 时,可以添加-Xquickstart:verbose参数启用录制功能,但是在参数相同的情况下进行回放,会出现异常

Steps to Reproduce
Steps to reproduce the behavior:

  1. 我们使用的启动参数可以参考:
    /xxx/dragonwell-8.18.19/bin/java -javaagent:xxx/jacocoagent.jar=includes=,output=tcpserver,port=10000,address= -Xquickstart:verbose org.apache.catalina.startup.Bootstrap start
  2. 录制启动时,不会出现问题,可以正常在进程结束时录制
  3. 回放启动时,会出现如图所示的问题
    0zm4q12000dxxyc478E1F
    *4. 如果在录制启动时把jacoco的参数去掉,在回放时是可以添加的

JDK version
Alibaba Dragonwell Extended Edition 8.18.19

Execution environment

  • OS and version:
  • CPU model:
  • Number of CPU cores:
  • Size of physical memory:
  • Inside Linux container?
    • Linux container name (docker, pouch, etc):
    • Linux container version:
@Sugartx
Copy link
Author

Sugartx commented May 10, 2024

关于jacoco方面:
1.如果不使用quickstart功能是可以正常使用的
2.针对这个异常已经搜索过相关的资料,发现都是因为jacoco和java版本不匹配时会产生这个异常

@lingjun-cg
Copy link
Collaborator

quickstart不要与javaagent一起使用,由于javaagent里可以会对类做各种修改,包括增加字段,这个与quickstart的功能是冲突的

@sendaoYan
Copy link
Collaborator

使用JacocoAgent的目的是收集覆盖率信息吗。如果目的是收集覆盖率信息,关闭XquickStart和开启XquickStart收集覆盖率结果应该是一致的,可以关闭XquickStart来收集覆盖率

@Sugartx
Copy link
Author

Sugartx commented May 10, 2024

主要是这个启动参数,我们并不能够非常灵活的控制,所以并不能选择在启用quickStart时去掉JacocoAgent。

另外,使用quickStart启动失败时,能不能自动切换成一般方式启动

@lingjun-cg
Copy link
Collaborator

目前是不行的。这里并不是quickstart启动失败了,因为JacocoAgent抛异常了,但是具体什么异常,quickstart是无法知道的。
建议还是在启动脚本里判断一下,如果有JacocoAgent,就关闭quickstart

@Sugartx
Copy link
Author

Sugartx commented May 11, 2024

好的,感谢答疑

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants