【问题标题】:Java Virtual Machine crashes Multiple timesJava 虚拟机多次崩溃
【发布时间】:2014-01-19 16:29:21
【问题描述】:

这是完整的错误信息

http://pastebin.com/bDgye0rt

错误日志太大,我不能在这里附上。我不太熟悉 jvm 在后台的工作方式以及它使用的寄存器。我希望有人可以查看此错误日志并向我解释它的含义。

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007ffd18cbcafe, pid=29906, tid=140725158119168
#
# JRE version: 6.0_27-b27
# Java VM: OpenJDK 64-Bit Server VM (20.0-b12 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea6 1.12.6
# Distribution: Debian GNU/Linux 7.1 (wheezy), package 6b27-1.12.6-1~deb7u1
# Problematic frame:
# C  [libresolv.so.2+0x7afe]  __libc_res_nquery+0x19e
#
# If you would like to submit a bug report, please include
# instructions how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

我不明白为什么以及如何创建它。它一直在发生。

PS: 我有我的机器上发生的另外 3 次崩溃的错误日志,如果您认为有必要,我可以分享。

编辑

我有大约 8 条日志,在 8 条日志中,很明显程序崩溃前的最后一次调用是

java.net.Inet6AddressImpl.lookupAllHostAddr

我不认为输入有那么大的相关性,因为有一个静态的输入列表被串行解析,并且错误发生在不同的时间范围内(有时在程序运行后 1 小时,有时在 6 小时后,它似乎是随机的)。

【问题讨论】:

  • 您使用 JNI?调用一些本机代码?
  • 鲍里斯可能有它。要查看的关键部分是您在此处发布的错误底部的The crash happened outside the Java Virtual Machine in native code 行。
  • @Boris the Spider 我不在我的程序中使用 JNI,但也许我使用的其中一个库可以做到这一点。
  • 从java栈我们看到java.net.Inet6AddressImpl.lookupAllHostAddr(Ljava/lang/String;)调用了glibc方法__libc_res_nquery。什么样的主机名给你 HttpURLConnection ?
  • @mpromonet 这是我不知道的事情。它是来自大量主机名的主机名。

标签: java crash runtime-error


【解决方案1】:

这是一个与 glibc 和 IPv6 相关的问题。

添加 -Djava.net.preferIPv4Stack=true 以要求 JVM 先使用 IPv4 以避免此问题是安全的。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-12-07
    • 1970-01-01
    • 2023-04-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多