调试随机的SIGSEGV崩溃

时间:2019-06-20 10:45:37

标签: java linux docker jvm apache-kafka-connect

在分布式模式下运行Kafka Connect应用程序时,我们遇到随机JVM崩溃。 connect应用程序运行带有自定义任务实现的自定义连接器。该应用程序在以Alpine Linux为基础映像的Docker容器上运行。崩溃是完全随机的,我的意思是:

  1. 对于每次崩溃,错误日志都不会指向相同的堆栈跟踪(请参见下文)
  2. 崩溃在不同机器上的随机时间点发生
  3. 按基础VM(高CPU负载,高内存负载,高IO磁盘负载)对崩溃频率没有任何影响

Machine 1 Crash

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fc1e92df777, pid=48, tid=0x00007fc1d899eae8
#
# JRE version: OpenJDK Runtime Environment (8.0_151-b12) (build 1.8.0_151-b12)
# Java VM: OpenJDK 64-Bit Server VM (25.151-b12 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 3.6.0
# Distribution: Custom build (Tue Nov 21 11:22:36 GMT 2017)
# Problematic frame:
# V  [libjvm.so+0x4c4777]  JVM_FindSignal+0x52586
#
# Core dump written. Default location: /home/kafka/core or core.48

Machine 2 Crash

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f7825f1da82, pid=48, tid=0x00007f78179bbae8
#
# JRE version: OpenJDK Runtime Environment (8.0_151-b12) (build 1.8.0_151-b12)
# Java VM: OpenJDK 64-Bit Server VM (25.151-b12 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 3.6.0
# Distribution: Custom build (Tue Nov 21 11:22:36 GMT 2017)
# Problematic frame:
# j  io.prometheus.jmx.shaded.io.prometheus.client.exporter.common.TextFormat.write004(Ljava/io/Writer;Ljava/util/Enumeration;)V+115
#
# Core dump written. Default location: /home/kafka/core or core.48

Machine 3 Crash

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fe4463fc2bc, pid=48, tid=0x00007fe435e06ae8
#
# JRE version: OpenJDK Runtime Environment (8.0_151-b12) (build 1.8.0_151-b12)
# Java VM: OpenJDK 64-Bit Server VM (25.151-b12 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 3.6.0
# Distribution: Custom build (Tue Nov 21 11:22:36 GMT 2017)
# Problematic frame:
# C  [libjvm.so+0x27b2bc]
#
# Core dump written. Default location: /home/kafka/core or core.48

Machine 4 Crash

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f130fcb1b93, pid=48, tid=0x00007f130d65a700
#
# JRE version: OpenJDK Runtime Environment (8.0_212-b03) (build 1.8.0_212-8u212-b03-2~deb9u1-b03)
# Java VM: OpenJDK 64-Bit Server VM (25.212-b03 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.so+0x760b93]
#
# Core dump written. Default location: /home/kafka/core or core.48

列表会像这样继续。 要提及的其他一些事情:

  • 没有应用程序日志
  • 未写入核心转储(检查了错误文件中提到的位置,但其中没有任何内容)

到目前为止,我们尝试的所有操作均无效:

  • 从基于Alpine的docker映像切换到Debian
  • 不包括Prometheus Agent
  • 将打开的JDK版本从8.0.151更新到8.0.212

任何发现问题的技巧将不胜感激!

1 个答案:

答案 0 :(得分:0)

似乎使用JRE 11运行应用程序已解决了该问题。该项目仍是使用Java 8构建的,但是与Java 11一起运行已停止了崩溃。