Java 运行时环境检测到致命错误[SIGBUS (0x7) at pc=0x00007f5c1f9dc200, pid=367, tid=0x00007f5ba8c4a640]

问题描述 投票:0回答:1

我有一个使用 Java 8 和 tomcat 8 制作的 spring 应用程序。该应用程序正在运行,我开始面临“SIGBUS”问题。我在网上查了一下,发现这是一个内存问题,但无法理解其原因。我上传的时候出现这个问题。这是 hs_err_pid367.log 文件

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0x7) at pc=0x00007f5c1f9dc200, pid=367, tid=0x00007f5ba8c4a640
#
# JRE version: Java(TM) SE Runtime Environment (8.0_201-b09) (build 1.8.0_201-b09)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.201-b09 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.so+0x7dc200]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x00007f5c187fc000):  JavaThread "http-nio-8443-exec-9" daemon [_thread_in_vm, id=417, stack(0x00007f5ba8b4b000,0x00007f5ba8c4b000)]

siginfo: si_signo: 7 (SIGBUS), si_code: 2 (BUS_ADRERR), si_addr: 0x00007f5b662127aa

Registers:
RAX=0x00007f5b66213a0a, RBX=0x00007f5c187fc000, RCX=0x00000000e9a179f0, RDX=0xfffffffffffffdb7
RSP=0x00007f5ba8c43ba8, RBP=0x00007f5ba8c43bf0, RSI=0x00000000e9a16790, RDI=0x00007f5b662127aa
R8 =0x0000000000000935, R9 =0x0000000000000010, R10=0x00007f5c09c5e167, R11=0x00000000e9a16780
R12=0x000000000000126a, R13=0x00007f5ba8c43c20, R14=0x0000000000000010, R15=0x0000000000000000
RIP=0x00007f5c1f9dc200, EFLAGS=0x0000000000010286, CSGSFS=0x002b000000000033, ERR=0x0000000000000004
  TRAPNO=0x000000000000000e

Top of Stack: (sp=0x00007f5ba8c43ba8)
0x00007f5ba8c43ba8:   00007f5c1fca3867 00007f5b6734f3b8
0x00007f5ba8c43bb8:   00007f5b662127aa 00007f5c187fcd78
0x00007f5ba8c43bc8:   000000000000126a 0000000000000000
0x00007f5ba8c43bd8:   0000000000000010 0000000000000000
0x00007f5ba8c43be8:   00007f5c187fc000 00007f5ba8c43c40
0x00007f5ba8c43bf8:   00007f5c09c5e1e1 000000000000126a
"hs_err_pid367.log" 75L, 3721B    ```

// the code gets executed until the system.out.pringln and crashes while executing the File.copy. I it due to the inputStream() ?
Path copyLocation = Paths.get(uploadDir + File.separator + StringUtils.cleanPath(fileName)); 
System.out.println("copyLocation of Files:" + copyLocation); Files.copy(file.getInputStream(), copyLocation, StandardCopyOption.REPLACE_EXISTING);

Thank you.


I tried to refactor the code which I think causing the issue but was unsuccessful.
java spring-boot tomcat8
1个回答
0
投票

考虑更新您的 OpenJDK 版本。您可以使用包管理器安装更新版本或直接从 OpenJDK 网站下载。 sudo apt install openjdk-8-jdk

© www.soinside.com 2019 - 2024. All rights reserved.