I have no experience in Java and I can run my code successfully from the development. But only when I built the project and runs it from docker, I got an error like this.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00000000000200a6, pid=1, tid=0x00007ff7227f9b10
#
# JRE version: OpenJDK Runtime Environment (8.0_212-b04) (build 1.8.0_212-b04)
# Java VM: OpenJDK 64-Bit Server VM (25.212-b04 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 3.12.0
# Distribution: Custom build (Sat May 4 17:33:35 UTC 2019)
# Problematic frame:
# C 0x00000000000200a6
#
# 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:
# /opt/my_project/hs_err_pid1.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# https://icedtea.classpath.org/bugzilla
#
I have followed the error message to use ulimit -c unlimited by adding it in the docker command: docker run --ulimit core=-1 --env-file -t my_project but still not helping and got another similar error
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00000000000200a6, pid=1, tid=0x00007eff79c95b10
#
# JRE version: OpenJDK Runtime Environment (8.0_212-b04) (build 1.8.0_212-b04)
# Java VM: OpenJDK 64-Bit Server VM (25.212-b04 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 3.12.0
# Distribution: Custom build (Sat May 4 17:33:35 UTC 2019)
# Problematic frame:
# C 0x00000000000200a6
#
# Core dump written. Default location: /opt/my_project/core or core.1
#
# An error report file with more information is saved as:
# /opt/my_project/hs_err_pid1.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# https://icedtea.classpath.org/bugzilla
#
Here's my Dockerfile
FROM openjdk:8-jre-alpine
ADD ./build/libs/ /opt/my_project
RUN apk update && apk add --no-cache libc6-compat && ln -s /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2
WORKDIR /opt/my_project
CMD ["java", "-jar", "my_project.jar"]
I have no idea if the error is related to the java environment or the docker or something else. Appreciate the help!
EDIT:
The error occurred when running on this line:
Logging logging = LoggingOptions.newBuilder().setCredentials(googleCredentials).setProjectId(projectId).build().getService();
This is solved by using the debian based image instead of alpine.
Thanks to the folks in the comment section!
Just documenting our own experience here, which corroborates rahmathd's answer.
We were using an alpine-based Amazon Corretto:
FROM amazoncorretto/amazoncorretto:11-alpine-jre
RUN apk --update --no-cache add tzdata && apk add --no-cache libstdc++ && apk add --no-cache libc6-compat && ln -s /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2
ENV TZ Asia/Tokyo
One of the following two messages accompanied the crash that happened every time when running the app for a couple of seconds.
1)
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fbd3196c5d6, pid=1, tid=60
#
# JRE version: OpenJDK Runtime Environment Corretto-11.0.8.10.1 (11.0.8+10) (build 11.0.8+10-LTS)
# Java VM: OpenJDK 64-Bit Server VM Corretto-11.0.8.10.1 (11.0.8+10-LTS, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C [ld-musl-x86_64.so.1+0x235d6] free+0x28
#
# Core dump will be written. Default location: //core
#
# An error report file with more information is saved as:
# //hs_err_pid1.log
[thread 301 also had an error]
[thread 37 also had an error]
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
2)
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Switching to either a Ubuntu and Amazon Linux based Corretto both solved the issue for us as well.
Related
I'm trying to run my mcp (minecraft coder pack) client in eclipse. I'm on macos catalina and I get this error all the time
Here is my error
[19:41:45] [Client thread/INFO]: (Session ID is token:0:Player380)
[19:41:48] [Client thread/INFO]: LWJGL Version: 2.9.2
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGILL (0x4) at pc=0x00007fff2dba7abc, pid=21640, tid=9731
#
# JRE version: OpenJDK Runtime Environment (16.0.1+9) (build 16.0.1+9-24)
# Java VM: OpenJDK 64-Bit Server VM (16.0.1+9-24, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-amd64)
# Problematic frame:
# C [AppKit+0x3e5abc] -[NSOpenGLContext setView:]+0xe5
#
# No core dump will be written. 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:
# /Users/palmtrww/Desktop/ce poopy/jars/hs_err_pid21640.log
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#``
I tried to export my android application and it just crashed with the following code. Tried several times still the error stays glued. Anyway out of this?
Following is the Log:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGBUS (0x7) at pc=0x00007fea9e58ee3e, pid=4241, tid=140644277511936
#
# JRE version: OpenJDK Runtime Environment (7.0_55-b14) (build 1.7.0_55-b14)
# Java VM: OpenJDK 64-Bit Server VM (24.51-b03 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libc.so.6+0x98e3e] envz_strip+0x61e
#
# 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:
# /opt/adt-bundle-linux-x86_64-20140624/eclipse/hs_err_pid4241.log
#
# If you would like to submit a bug report, please include
# instructions on 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.
#
First right click on the project and refresh it. Then export it using archive file.
I hope this solves your problem.
I am using Eclipse, Juno version. It loads well. But when it tries to use the autofill features for methods pop-down, it crashes. With the following log:
# A fatal error has been detected by the Java Runtime Environment:
# SIGSEGV (0xb) at pc=0x00007f66acbd82a1, pid=6895, tid=140080532424448
#
# JRE version: OpenJDK Runtime Environment (7.0_55-b14) (build 1.7.0_55-b14)
# Java VM: OpenJDK 64-Bit Server VM (24.51-b03 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libsoup-2.4.so.1+0x6c2a1] soup_session_feature_detach+0x11
#
# 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:
# /home/nithin/hs_err_pid6895.log
#
# If you would like to submit a bug report, please include
# instructions on 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.
Tried the answer by the BugZilla as the log inicated. But still it's the same. Any ideas to resolve this?
I also had this problem. However, thanks to THIS thread, I fixed it by adding -Dorg.eclipse.swt.browser.DefaultType=mozilla to my eclipse.ini file.
I'm trying to call showSaveDialog in the following way:
FileChooser fileChooser = new FileChooser();
fileChooser.setTitle(title);
return fileChooser.showSaveDialog(null);
But the whole program is aborted with the following output:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f7d783e3500, pid=22008, tid=140176664483584
#
# JRE version: Java(TM) SE Runtime Environment (7.0_51-b13) (build 1.7.0_51-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.51-b03 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libgdk-x11-2.0.so.0+0x6a500] gdk_window_set_geometry_hints+0x0
#
# 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:
# /home/sk_/projects/mjolnirr/hs_err_pid22008.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
How can I get it working?
Had this when using vlcj and fixed it by adding JVM option -DVLCJ_INITX=no
Found solution here
I'm trying to run jetty inside a Centos 5.7 vagrant box (it runs fine on "real" computers; tested with centos and linux mint). This is the header error:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00002abb2551a8b1, pid=4299, tid=1105414464
#
# JRE version: 6.0_37-b06
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.12-b01 mixed mode linux-amd64 )
# Problematic frame:
# V [libjvm.so+0x87a8b1] YieldingFlexibleWorkGang::start_task(YieldingFlexibleGangTask*)+0x11
#
# An error report file with more information is saved as:
# /usr/local/jetty-7.6.7/bin/hs_err_pid4299.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted
I've pasted the log here: https://gist.github.com/favrik/4067152
I'm trying to get some hints. :) Already searched google and the bug database at http://bugs.sun.com/.
Thanks!
If you are able to reproduce this easily, you should configure your system to create a core dump.
Using ulimit -c unlimited will enable your system to produce such a dump on the next SIGSEGV event. Once the core dump file will be created you will be able to examine it, using gdb.
See Determining Where the Crash Occurred for details on what options to use to determine the cause.