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

attach运行时报错 #3

Open
shellsniper opened this issue Jul 29, 2021 · 0 comments
Open

attach运行时报错 #3

shellsniper opened this issue Jul 29, 2021 · 0 comments

Comments

@shellsniper
Copy link

shellsniper commented Jul 29, 2021

环境:

  • Mac 11.4
  • JDK 8 1.8.0_275-b01

错误日志 - GuanYu

 ~/WorkSpace/reproduce/GuanYu     main  java -jar agent-mac.jar 11240 denyMethodsConfigFile=/tmp/deny.conf                                                                                                              17:30:20    100% 
Exception in thread "main" java.io.IOException: Premature EOF
	at sun.tools.attach.HotSpotVirtualMachine.readInt(HotSpotVirtualMachine.java:292)
	at sun.tools.attach.BsdVirtualMachine.execute(BsdVirtualMachine.java:183)
	at sun.tools.attach.HotSpotVirtualMachine.loadAgentLibrary(HotSpotVirtualMachine.java:58)
	at sun.tools.attach.HotSpotVirtualMachine.loadAgentLibrary(HotSpotVirtualMachine.java:79)
	at sun.tools.attach.HotSpotVirtualMachine.loadAgent(HotSpotVirtualMachine.java:103)
	at me.threedr3am.guanyu.agent.GuanYu.main(GuanYu.java:51)

错误日志 - springboot app


  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.4.2)

2021-07-29 17:23:52.393  INFO 9530 --- [           main] c.s.kaiming.KaimingShieldApplication     : Starting KaimingShieldApplication v0.0.1-SNAPSHOT using Java 1.8.0_275 on ShellSnipers-MacBook-Pro.local with PID 9530 (/Users/levonpro/WorkSpace/kaiming-demo/target/kaiming-0.0.1-SNAPSHOT.jar started by levonpro in /Users/levonpro/WorkSpace/kaiming-demo/target)
2021-07-29 17:23:52.396  INFO 9530 --- [           main] c.s.kaiming.KaimingShieldApplication     : No active profile set, falling back to default profiles: default
2021-07-29 17:23:53.111  INFO 9530 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2021-07-29 17:23:53.127  INFO 9530 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2021-07-29 17:23:53.127  INFO 9530 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.41]
2021-07-29 17:23:53.190  INFO 9530 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2021-07-29 17:23:53.190  INFO 9530 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 759 ms
2021-07-29 17:23:53.363  INFO 9530 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2021-07-29 17:23:53.554  INFO 9530 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2021-07-29 17:23:53.567  INFO 9530 --- [           main] c.s.kaiming.KaimingShieldApplication     : Started KaimingShieldApplication in 1.496 seconds (JVM running for 1.862)
[GuanYu] 类加载监控Agent启动 ...
[GuanYu] 参数: denyMethodsConfigFile=/tmp/deny.conf
[GuanYu] 检测到新的类加载: me/threedr3am/guanyu/core/PluginManager
[GuanYu] 加载插件: class me.threedr3am.guanyu.plugin.BcelDenyPlugin
[GuanYu] 加载插件: class me.threedr3am.guanyu.plugin.BlackMethodDenyPlugin
[GuanYu] 加载插件数量: 2
[GuanYu] 读取方法调用黑名单配置文件 ...
java/lang/Runtime exec * sun/usagetracker/UsageTrackerClient
java/lang/ProcessBuilder start *
[GuanYu] retransform class: org.springframework.boot.SpringApplicationRunListeners$$Lambda$518/891093184
[GuanYu] retransform class: org.springframework.boot.SpringApplicationRunListeners$$Lambda$517/310623126
[GuanYu] retransform class: org.springframework.beans.CachedIntrospectionResults$$Lambda$516/1793799654
[GuanYu] retransform class: org.springframework.beans.CachedIntrospectionResults$$Lambda$515/691690486
[GuanYu] retransform class: org.springframework.beans.CachedIntrospectionResults$$Lambda$514/1118078504
[GuanYu] retransform class: org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport$$Lambda$513/1427651360
[GuanYu] retransform class: org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport$$Lambda$512/29183965
[GuanYu] retransform class: java.util.stream.Collectors$$Lambda$511/1740797075
...
...
[GuanYu] retransform class: java.lang.String
[GuanYu] retransform class: java.lang.CharSequence
[GuanYu] retransform class: java.lang.Comparable
[GuanYu] retransform class: java.io.Serializable
[GuanYu] retransform class: java.lang.Object
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000000110229439, pid=9530, tid=0x000000000000450b
#
# JRE version: OpenJDK Runtime Environment (8.0_275-b01) (build 1.8.0_275-b01)
# Java VM: OpenJDK 64-Bit Server VM (25.275-b01 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.dylib+0x52f439]  Symbol::as_C_string() const+0xd
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/levonpro/WorkSpace/kaiming-demo/target/hs_err_pid9530.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/AdoptOpenJDK/openjdk-support/issues
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

1 participant