问题描述
总结
我正在尝试在我的 raspBerry pi 上构建 springboot 应用程序,但出现 SIGBUS (0x7) 错误
错误:
# A Fatal error has been detected by the Java Runtime Environment:
#
# SIGBUS (0x7) at pc=0xb3de3a84,pid=7,tid=32
#
# JRE version: OpenJDK Runtime Environment AdoptOpenJDK (14.0.2+12) (build 14.0.2+12)
# Java VM: OpenJDK Server VM AdoptOpenJDK (14.0.2+12,mixed mode,sharing,g1 gc,linux-arm)
# Problematic frame:
# v ~Stubroutines::atomic_load_long
#
# Core dump will be written. Default location: /server/core
#
# An error report file with more information is saved as:
# /server/hs_err_pid7.log
重现步骤
copY .mvn .mvn
copY pom.xml .
RUN ./mvnw dependency:go-offline
copY src src
RUN ./mvnw package -DskipTests # <------- Fails here
在我的另一台装有 ubuntu 的主机上运行良好。 但是在使用 raspbian 的 RaspBerry Pi 4 上失败。
预期结果
期待与我的另一台机器类似的成功构建
实际结果
由于以下错误跟踪失败。
[thread 52 also had an error]
#
# A Fatal error has been detected by the Java Runtime Environment:
#
# SIGBUS (0x7) at pc=0xb3de3a84,linux-arm)
# Problematic frame:
# v ~Stubroutines::atomic_load_long
#
# Core dump will be written. Default location: /server/core
#
# An error report file with more information is saved as:
# /server/hs_err_pid7.log
#
# If you would like to submit a bug report,please visit:
# https://github.com/AdoptOpenJDK/openjdk-support/issues
#
Aborted (core dumped)
The command '/bin/sh -c ./mvnw package -DskipTests' returned a non-zero code: 134
ERROR: Service 'server' Failed to build
分类信息
Java 版本:14.0.2+12
您的操作系统和平台是什么? Raspbian [完整] 最新。树莓派 4
你是如何安装Java的? 上面分享的 Dockerfile 片段。
以前有用吗? 否
您是否使用其他 Java 版本进行过测试? 是的 v11
解决方法
这是一个空间不足的问题,现在阅读此https://confluence.atlassian.com/confkb/java-vm-dies-with-sigbus-0x7-when-temp-directory-is-full-on-linux-815584538.html要解决它,您必须在 /tmp 文件夹中留出可用空间或使用更大的空间存储设备并将空间分配给 /tmp 文件夹。
编辑:另见这个 https://bugs.java.com/bugdatabase/view_bug.do?bug_id=6563308