spring-startup-analyzer icon indicating copy to clipboard operation
spring-startup-analyzer copied to clipboard

Sharing is only supported for boot loader classes because bootstrap classpath has been appended

Open elloku opened this issue 1 year ago • 4 comments

出现以上问题应该如何解决呢: 详细错误如下: `8月 23, 2023 4:08:32 下午 io.github.linyimin0812.profiler.agent.ProfilerAgentBoostrap premain 信息: command args: null Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended 8月 23, 2023 4:08:32 下午 io.github.linyimin0812.profiler.agent.ProfilerAgentBoostrap createAgentClassLoader 信息: [file:/Users//spring-startup-analyzer/lib/spring-profiler-api.jar, file:/Users//spring-startup-analyzer/lib/spring-profiler-agent.jar, file:/Users//sing-startup-analyzer/lib/spring-profiler-common.jar, file:/Users//spring-startup-analyzer/lib/spring-profiler-core.jar, file:/Users//spring-startup-analyzer/lib/extension/spring-profiler-extension.jar, file:/Users//spring-startup-analyzer/lib/extension/spring-profiler-starter.jar] Server listening on port 8066 *

  • A fatal error has been detected by the Java Runtime Environment:
  • SIGBUS (0xa) at pc=0x00000001475354e4, pid=15168, tid=8707
  • JRE version: Java(TM) SE Runtime Environment (17.0.8+9) (build 17.0.8+9-LTS-211)
  • Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0.8+9-LTS-211, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
  • Problematic frame:
  • v ~StubRoutines::SafeFetch32
  • Core dump will be written. Default location: /cores/core.15168
  • An error report file with more information is saved as:
  • /Users/*****/////hs_err_pid15168.log
  • If you would like to submit a bug report, please visit:
  • https://bugreport.java.com/bugreport/crash.jsp

[1] 15168 abort /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/bin/java -jar ` 也尝试过使用zulu的openjdk,出现了一样的问题。 我的硬件配置如下: Host: "MacBookPro18,3" arm64, 10 cores, 32G, Darwin 23.0.0, macOS 14.0 (23A5301h)

elloku avatar Aug 23 '23 08:08 elloku

开始出现的是和这个issuecomment出现的问题一样,然后按照issue中提示的,将版本改成了2.0.6,2.0.10也尝试过,未能解决问题

elloku avatar Aug 23 '23 08:08 elloku

这个看起来像是async-profiler导致的,可以添加配置-Dspring-startup-analyzer.linux.and.mac.profiler=jvm_profiler使用自定义的采集器。或者多重试几次

linyimin0812 avatar Aug 23 '23 08:08 linyimin0812

首先我不是很理解这个警告提示“Sharing is only supported for boot loader classes because bootstrap classpath has been appended”,正常来讲,他只是一个警告,并不会影响应用运行,但是下面又没出显现其他的报错信息,只提示了“A fatal error has been detected by the Java Runtime Environment:SIGBUS (0xa) at pc=0x00000001475354e4, pid=22305, tid=8707”,这个简单的错误提示让我无法确定问题。然后输出的错误日志中,也没有明显的错误出现,这让我很困惑

elloku avatar Aug 23 '23 09:08 elloku

首先我不是很理解这个警告提示“Sharing is only supported for boot loader classes because bootstrap classpath has been appended”,正常来讲,他只是一个警告,并不会影响应用运行,但是下面又没出显现其他的报错信息,只提示了“A fatal error has been detected by the Java Runtime Environment:SIGBUS (0xa) at pc=0x00000001475354e4, pid=22305, tid=8707”,这个简单的错误提示让我无法确定问题。然后输出的错误日志中,也没有明显的错误出现,这让我很困惑

这个错误信息是JVM抛出来的,项目中没办法catch

linyimin0812 avatar Aug 27 '23 09:08 linyimin0812