【问题标题】:Jenkins Java compile causes Java crashJenkins Java 编译导致 Java 崩溃
【发布时间】:2014-01-17 03:39:42
【问题描述】:

当我尝试在我的 Jenkins 服务器中使用 Gradle 编译一些 Java 代码时,我经常遇到 Java 崩溃。有人知道任何可能的解决方案吗?似乎 libzip 有某种问题...

我正在使用 Ubuntu 服务器。完整错误报告:http://pastebin.com/dnmFTbLg

:reobf#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0x7) at pc=0x00007f54df18218d, pid=17194, tid=140002619074304
#
# JRE version: 7.0_25-b30
# Java VM: OpenJDK 64-Bit Server VM (23.7-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libzip.so+0x518d]  Java_java_util_zip_ZipFile_getZipMessage+0x114d
#
# 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:
# /var/lib/jenkins/workspace/ICBM/hs_err_pid17194.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
#   https://bugs.launchpad.net/ubuntu/+source/openjdk-7/
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

有谁知道为什么 Java 在尝试执行编译时崩溃?

【问题讨论】:

  • 从堆栈跟踪看来,在 gradle 构建 - net.minecraftforge.gradle.tasks.user.reobf.ObfArtifact.applySpecialSource(Ljava/io/File;Ljava/io/File;Ljava/io/File;) 期间找不到文件。你的gradle 构建是什么,詹金斯调用它的命令是什么?此外,如果您在同一环境中手动运行相同的命令,是否会出现相同的错误?
  • 该错误似乎是由错误的 zip 实现引起的,它在本机代码中崩溃,而不是给你一个适当的异常。如果你 google Java_java_util_zip_ZipFile_getZipMessage+0x114d 你会发现有几个人提到了无效的 zip 文件或访问尚未完成的文件。如果更新 JDK 有帮助,我会尝试,然后检查 jar 是否完好无损,也许其中有邪恶的无效字节。

标签: java compilation jenkins gradle libzip


【解决方案1】:

我看到您正在使用 OpenJDK。尝试使用 Oracle JDK:https://help.ubuntu.com/community/Java

【讨论】:

  • Rick - 您是否遇到过同样的问题并且切换到 Oracle JDK 有帮助?我问的原因 - 堆栈跟踪显示一个 jar 正在被检索的过程中,并且试图遍历导致堆栈跟踪的 jar。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2019-05-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-09-06
相关资源
最近更新 更多