【问题标题】:Jprofiler 9 throwing segemnetation fault in offline modeJprofiler 9 在离线模式下抛出分段错误
【发布时间】:2016-05-20 12:02:43
【问题描述】:

我已经在 Windows 7 上安装了 jprofiler 9,我正在尝试以离线模式远程分析在远程 linux 上运行的 JVM。

我在 JVM 参数中添加了 JVM 参数,如下所示。并将二进制文件和 config.xml 复制到 linux 框中。

#Jprofiler Settings
JAVA_OPTIONS="-agentlib:jprofilerti=port=8849,nowait -Xbootclasspath/a:/home/jprofiler9/bin/agent.jar -agentpath:/home/jprofiler9/bin/linux-x64/libjprofilerti.so=offline,id=108,config=/home/.jprofiler9/config.xml  ${JAVA_OPTIONS}"
export JAVA_OPTIONS
export LD_LIBRARY_PATH=/home/jprofiler9/bin/linux-x64:$LD_LIBRARY_PATH

现在,当我启动服务器时,出现分段错误并转储核心,输出日志如下

JProfiler> Protocol version 50
JProfiler> Using JVMTI
JProfiler> JVMTI version 1.1 detected.
JProfiler> Don't wait for frontend to connect.
JProfiler> 64-bit library
JProfiler> Starting up without initial configuration.
JProfiler> Listening on port: 8849.
JProfiler> Instrumenting native methods.
JProfiler> Can retransform classes.
JProfiler> Can retransform any class.
JProfiler> Native library initialized
JProfiler> Protocol version 50
JProfiler> Using JVMTI
JProfiler> JVMTI version 1.1 detected.
JProfiler> Offline profiling mode.
JProfiler> 64-bit library
JProfiler> Using config file /home/.jprofiler9/config.xml (id: 108)
JProfiler> Listening on port: 8849.
JProfiler> Instrumenting native methods.
JProfiler> Can retransform classes.
JProfiler> Can retransform any class.
JProfiler> Native library initialized
JProfiler> VM initialized
JProfiler> Using sampling (1 ms)
JProfiler> Time measurement: elapsed time
**JProfiler> CPU profiling enabled**
JProfiler> VM initialized
JProfiler> Using sampling (1 ms)
JProfiler> Time measurement: elapsed time
JProfiler> CPU profiling enabled
<PATH>/startWebLogic.sh: line 192:  3372 Segmentation fault      (core dumped) ${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WLS_POLICY_FILE} ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS}
Stopping Derby server...

1) 在使用 GUI 的在线模式下,服务器启动,我可以获取配置文件。但是,当服务器启动时,我将 Jprofiler 从服务器上分离,一旦服务器启动,我再次附加并获取配置文件。 那么离线模式下有分离和附加功能吗?

注意服务器起始堆大小为 8GB

2) 所以在离线模式下,服务器实际上是在尝试捕获 CPU profile ,因为在日志中它说 "JProfiler> CPU profiling enabled" 。这是否是服务器启动失败并出现分段错误的原因

谢谢

【问题讨论】:

  • 被分析的JVM的工作目录中是否有hserr_pid...文件?
  • 不,你没有 hserr_pid 文件,核心转储的 gdb 显示了这一点。这是在服务器启动时出现的Core was generated by /home/jdk/bin/java -server -Xms768m -Xmx1536m -XX:PermSize=256m -XX:M'. Program terminated with signal 11, Segmentation fault. #0 0x00007f4d7ed8a9f0 in ?? () "/home/core.PID" is a core file. Please specify an executable to debug. (gdb) bt #0 0x00007f4d7ed8a9f0 in ?? () #1 0x00007f4d7ed8aa1b in ?? () #2 0x0000000000000000 in ?? () (gdb)

标签: java performance jvm segmentation-fault jprofiler


【解决方案1】:

您加载了两次本地代理库。这意味着您传递了两个 -agentlib:jprofilerti 参数或另一个加载代理库的 -agentpath 参数。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多