1

Summary

I'm trying to build springboot application on my raspberry pi and I get SIGBUS (0x7) error

Error:

# 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

Steps to reproduce

I have a docker file with following snippet.

COPY .mvn .mvn

COPY pom.xml .

RUN ./mvnw dependency:go-offline

COPY src src

RUN ./mvnw package -DskipTests  # <------- Fails here

Builds fine on my other primary machine with ubuntu on it. But fails on Raspberry Pi 4 with raspbian.

Expected results

Expected a successful build similar to my other machine

Actual results

Fails with following error trace.

[thread 52 also had an error]
#
# 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
#
# 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

Triaging info

Java version: 14.0.2+12

What is your operating system and platform? Raspbian [full] latest. Raspberry Pi 4

How did you install Java? Dockerfile snippet shared above.

Did it work before? No

Did you test with other Java versions? yes with v11

Nikhil.Nixel
  • 555
  • 2
  • 11
  • 25

2 Answers2

1

This is an insufficient space issue read this https://confluence.atlassian.com/confkb/java-vm-dies-with-sigbus-0x7-when-temp-directory-is-full-on-linux-815584538.html now to solve it you have to make space available in your /tmp folder or use bigger space storage device and allocate space to /tmp folder.

edit: also see this https://bugs.java.com/bugdatabase/view_bug.do?bug_id=6563308

Akash Jain
  • 316
  • 2
  • 10
  • 1
    I found no /tmp partition in my raspbian os. I added `tmpfs /tmp tmpfs defaults,noatime 0 0 tmpfs /var/log tmpfs defaults,noatime,size=64m 0 0` to fstab. Now on using `df -h` I found 1GB of /tmp with 0 used space. Still I found the same error and no space is being used during this build process. – Nikhil.Nixel Feb 28 '21 at 05:36
  • maybe your jar files are big but still that error means the space insufficiency or you might need to reinstall os on your raspberry pie and change /etc storage space during installation. but obviously this is a bug so it's according to documentation. there might be another reasons to this error I don't know of.(/tmp is a folder in your root directory not a partition) – Akash Jain Feb 28 '21 at 05:45
0

Answering my own question, I tried a openjdk instead of adoptopenjdk and it worked. If it doesnt work for you, then try different versions of openjdk as well.

Nikhil.Nixel
  • 555
  • 2
  • 11
  • 25